Utiliser le WSDL statique
Chargez le WSDL statique dans un client SOAP pour effectuer des demandes au service Web SOAP.
Le client de service Web fournit
- Le projet FakeStockValue.
- Le service Web StockQuoteBinding.
- La fonction SOAP GetLastTradePrice. Cette fonction génère des enregistrements de demandes lorsqu’elle est exécutée.
Vous pouvez modifier le code XML de la requête par défaut dans le WSDL statique pour inclure un symbole boursier.
<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>La soumission d’une demande SOAP à ce point de terminaison de service Web renvoie les éléments suivants au client SOAP demandeur.
<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>