SOAP-Beispiel
- Vorherige Seite SOAP-HTTP-Binding
- Nächste Seite SOAP-Zusammenfassung
Ein SOAP-Beispiel
Im folgenden Beispiel wird eine GetStockPrice-Anfrage an den Server gesendet. Diese Anfrage hat einen StockName-Parameter, und im Antwort wird ein Price-Parameter zurückgegeben. Der Namensraum dieser Funktion wird an dieser Adresse definiert: "http://www.example.org/stock"
SOAP-Anfrage:
POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding" <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
SOAP-Antwort:
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding" <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope>
- Vorherige Seite SOAP-HTTP-Binding
- Nächste Seite SOAP-Zusammenfassung