norme SOAP

norme W3C: http://www.w3.org/TR/SOAP/



1. Exemples de messages SOAP

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:doSpellingSuggestion xmlns:ns1="urn:GoogleSearch" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<key>cmYEU..................6aXqlf</key>
<phrase>gemany</phrase>
</ns1:doSpellingSuggestion>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:doSpellingSuggestionResponse xmlns:ns1="urn:GoogleSearch" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:string">germany</return>
</ns1:doSpellingSuggestionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

2. la structure du message SOAP

3. le Header optionnel

4. le Body

<SOAP-ENV:Body>
<tns:getTemp xmlns:tns="urn:xmethods-Temperature" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<zipcode>55406</zip>
</tns:getTemp>
</SOAP-ENV:Body>
 --- PRODUIT LA REPONSE :-----
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>parsing error: org.xml.sax.SAXParseException: The element type 
&quot;zipcode&quot; must be terminated by the matching end-tag 
&quot;&lt;/zipcode&gt;&quot;.</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

5. l'encodingStyle de Soap

6. RPC encapsulé dans Soap

7. SOAP encapsulé dans HTTP

POST /soap/servlet/rpcrouter HTTP/1.1
Host: services.xmethods.net
Connection: Keep-Alive, TE
TE: trailers, deflate, gzip, compress
User-Agent: RPT-HTTPClient/0.3-3
SOAPAction: ""
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
Content-type: text/xml; charset=utf-8
Content-length: 435

[page suivante] [index]