Hallo.

Ich hätte gerne mal eure Meinung hierzu:

Ich habe die W3C Beispiele "GetStockQuote" der WSDL- und SOAP-Spezifikation umgeschrieben, so dass sie zu meinen Beispielen passen. Ich finde allerdings dass die Body-Entries der folgenden beiden SOAP-Nachrichten statt m:GetWaterGaugeData und m:GetWaterGaugeDataResponse eigentlich m:WaterGaugeDataRequest und m:WaterGaugeDataResponse heißen müssten.

Was ist richtig?

MfG
DAB268


SOAP Request

Code:
POST /WaterGaugeData HTTP/1.1
Host: www.pegel-kaub.de
Content-Type: text/xml; charset="utf-8"
Content-Length: 364
SOAPAction: "http://www.pegel-kaub.de/getwatergaugedata"

<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 SOAP-ENV:encodingStyle=
  "http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Body>
  <m:GetWaterGaugeData
   xmlns:m="http://www.pegel-kaub.de/watergaugedata.wsdl">
   <m:time>2010-01-26T17:53:00+01:00</m:time>
  </m:GetWaterGaugeData>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

SOAP Response

Code:
HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Content-Length: 390

<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 SOAP-ENV:encodingStyle=
  "http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Body>
  <m:GetWaterGaugeDataResponse
   xmlns:m="http://www.pegel-kaub.de/watergaugedata.wsdl">
   <m:value>169.5</m:value>
   <m:unit>cm</m:unit>
  </m:GetWaterGaugeDataResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

WSDL-Datei

Code:
<?xml version="1.0"?>
<definitions name="WaterGaugeData"
 targetNamespace="http://www.pegel-kaub.de/watergaugedata.wsdl"
 xmlns:tns="http://www.pegel-kaub.de/watergaugedata.wsdl"
 xmlns:xsd1="http://www.pegel-kaub.de/watergaugedata.xsd"
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns="http://schemas.xmlsoap.org/wsdl/">

 <types>
  <schema 
   targetNamespace="http://www.pegel-kaub.de/watergaugedata.xsd"
   xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="WaterGaugeDataRequest">
    <complexType>
     <all>
      <element name="time" type="dateTime" />
     </all>
    </complexType>
   </element>
   <element name="WaterGaugeData">
    <complexType>
     <all>
      <element name="value" type="float" />
      <element name="unit" type="string" />
     </all>
    </complexType>
   </element>
  </schema>
 </types>

 <message name="GetWaterGaugeDataInput">
  <part name="body" element="xsd1:WaterGaugeDataRequest" />
 </message>
 <message name="GetWaterGaugeDataOutput">
  <part name="body" element="xsd1:WaterGaugeData" />
 </message>

 <portType name="WaterGaugeDataPortType">
  <operation name="GetWaterGaugeData">
   <input message="tns:GetWaterGaugeDataInput" />
   <output message="tns:GetWaterGaugeDataOutput" />
  </operation>
 </portType>

 <binding name="WaterGaugeDataSoapBinding"
  type="tns:WaterGaugeDataPortType">
  <soap:binding style="document"
   transport="http://schemas.xmlsoap.org/soap/http" />
  <operation name="GetWaterGaugeData">
   <soap:operation
    soapAction="http://www.pegel-kaub.de/getwatergaugedata" />
   <input>
    <soap:body use="literal" />
   </input>
   <output>
    <soap:body use="literal" />
   </output>
  </operation>
 </binding>

 <service name="WaterGaugeDataService">
  <documentation>My first service</documentation>
  <port name="WaterGaugeDataPort"
   binding="tns:WaterGaugeDataSoapBinding">
   <soap:address
    location="http://www.pegel-kaub.de/watergaugedata" />
  </port>
 </service>

</definitions>