Das Notes Forum

Domino 9 und frühere Versionen => ND8: Entwicklung => Thema gestartet von: Mitch am 10.12.13 - 14:57:19

Titel: Fließkommazahlenformat beim Webservice
Beitrag von: Mitch am 10.12.13 - 14:57:19
Hallo zusammen,

mein Webservice trennt Fließkommazahlen (Double) mit einem Komma anstatt einem Punkt.

Ich möchte aber immer einen Punkt haben. Mein Notes-Client zieht sich den Trenner aus dem Betriebssystem, das habe ich gerade mal ausprobiert. Da das z.B. auch bei bestehenden Dokumenten mit Zahlen-Items je nach Einstellung sauber hin und her wechselt, scheint Notes das ja intern ordentlich zu speichern. Mein (lokaler) Server ignoriert meine Systemeinstellungen aber.

Fragen:


Mein Service sieht so aus:
Code
Class DoubleService
	
	Function giveDouble As Double
		giveDouble = 9.99
	End Function
	
End Class

Als Antwort erhalte ich folgendes:
Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <soapenv:Body>
      <ns1:GIVEDOUBLEResponse xmlns:ns1="urn:DefaultNamespace">
         <GIVEDOUBLEReturn>9,99</GIVEDOUBLEReturn>
      </ns1:GIVEDOUBLEResponse>
   </soapenv:Body>
</soapenv:Envelope>

Mein WSDL:
Code
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="urn:DefaultNamespace" 
xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:apachesoap="http://xml.apache.org/xml-soap" 
xmlns:impl="urn:DefaultNamespace" 
xmlns:intf="urn:DefaultNamespace" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <wsdl:types>
  <schema targetNamespace="urn:DefaultNamespace" xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="GIVEDOUBLE">
    <complexType/>
   </element>
   <element name="GIVEDOUBLEResponse">
    <complexType>
     <sequence>
      <element name="GIVEDOUBLEReturn" type="xsd:double"/>
     </sequence>
    </complexType>
   </element>
  </schema>
 </wsdl:types>
 <message name="GIVEDOUBLEResponse">
  <part element="impl:GIVEDOUBLEResponse" name="parameters"/>
 </message>
 <message name="GIVEDOUBLERequest">
  <part element="impl:GIVEDOUBLE" name="parameters"/>
 </message>
 <portType name="DoubleService">
  <operation name="GIVEDOUBLE">
   <input message="impl:GIVEDOUBLERequest" name="GIVEDOUBLERequest"/>
   <output message="impl:GIVEDOUBLEResponse" name="GIVEDOUBLEResponse"/>
  </operation>
 </portType>
 <binding name="DominoSoapBinding" type="impl:DoubleService">
  <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="GIVEDOUBLE">
   <wsdlsoap:operation soapAction="GIVEDOUBLE"/>
   <input name="GIVEDOUBLERequest">
    <wsdlsoap:body use="literal"/>
   </input>
   <output name="GIVEDOUBLEResponse">
    <wsdlsoap:body use="literal"/>
   </output>
  </operation>
 </binding>
 <service name="DoubleServiceService">
  <port binding="impl:DominoSoapBinding" name="Domino">
   <wsdlsoap:address location="http://localhost"/>
  </port>
 </service>
</definitions>

Beste Grüße,

Mitch
Titel: Re: Fließkommazahlenformat beim Webservice
Beitrag von: m3 am 10.12.13 - 15:57:38
http://atnotes.de/index.php/topic,56418.0.html

Mein Rant dazu aus 2007: http://martin.leyrer.priv.at/y2007/m08/Web_Services_with_Domino-Working_around_the_GetValueAsNotesDateTime_bug.html
Titel: Re:
Beitrag von: Mitch am 10.12.13 - 17:14:30
Ohje. Danke.

Schöner Workaround aus dem APAR: Use Java. >:(

Gesendet von meinem Nexus 7 mit Tapatalk 4