Statische WSDLs verwenden
Laden Sie die statische WSDL in einen SOAP-Client, um Anforderungen an den SOAP Web Service zu stellen.
Der Webservice-Client bietet
- Das Projekt „FakeStockValue“.
- Den Webservice „StockQuoteBinding“.
- Die SOAP-Funktion „GetLastTradePrice“. Diese Funktion generiert bei der Ausführung Anforderungsdatensätze.
Sie können die Standardanforderungs-XML in der statischen WSDL so ändern, dass sie ein Aktiensymbol enthält.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:stoc="http://example.com/stockquote.xsd">
<soapenv:Header/>
<soapenv:Body>
<stoc:TradePriceRequest>IBM</stoc:TradePriceRequest>
</soapenv:Body>
</soapenv:Envelope>Wenn Sie eine SOAP-Anforderung an diesen Webservice-Endpunkt senden, wird Folgendes an den anfordernden SOAP-Client zurückgegeben.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<GetLastTradePriceOutput xmlns="https://www.service-now.com/vws/FakeStockValue">
<message>admin2, You were looking for a quote on IBM</message>
</GetLastTradePriceOutput>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>