77 lines
3.1 KiB
HTML
77 lines
3.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
|
|
|
|
<title>Soap examples</title>
|
|
</head>
|
|
|
|
<BODY>
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
<h5><A NAME="wssoapexam">Soap examples</A></h5>
|
|
<p><strong>SOAP request example</strong></p>
|
|
|
|
<p>The SOAP request that follows indicates that the OrderItem() method, from the Some-URI namespace, should be invoked from http://www.somesupplier.com/Supplier. Upon receiving this request, the supplier application at www.somesupplier.com runs the business logic that corresponds to OrderItem.</p>
|
|
<p><strong>Note:</strong> For legal information about this code example, see the <a href="../program/codex.htm" target="_">Code example disclaimer</a>.</p>
|
|
<pre>
|
|
Sample SOAP Request
|
|
POST /Supplier HTTP/1.1
|
|
Host: www.somesupplier.com
|
|
Content-Type: text/xml; charset="utf-8"
|
|
Content-Length: nnnn
|
|
SOAPAction: "Some-URI"
|
|
|
|
<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:OrderItem xmlns:m="Some-URI">
|
|
<RetailerID>557010</RetailerID>
|
|
<ItemNumber>1050420459</ItemNumber>
|
|
<ItemName>AMF Night Hawk Pearl M2</ItemName>
|
|
<ItemDesc>Bowling Ball</ItemDesc>
|
|
<OrderQuantity>100</OrderQuantity>
|
|
<WholesalePrice>130.95</WholeSalePrice>
|
|
<OrderDateTime>2000-06-19 10:09:56</OrderDateTime>
|
|
</m:OrderItem>
|
|
</SOAP-ENV:Body>
|
|
</SOAP-ENV:Envelope>
|
|
</pre>
|
|
|
|
<p>The SOAP protocol does not specify how to process the order. The supplier could run a CGI script, invoke a servlet, or perform any other process that generates the response.</p>
|
|
|
|
|
|
|
|
|
|
|
|
<p><strong>SOAP response example</strong></p>
|
|
<p>The response to a SOAP Request is an XML document that contains the results of the processing. In this example, this is the order number for the order placed by the retailer.</p>
|
|
<p><strong>Note:</strong> For legal information about this code example, see the <a href="codex.htm" target="_">Code example disclaimer</a>.</p>
|
|
<pre>
|
|
HTTP/1.1 200 OK
|
|
Content-Type: text/xml; charset="utf-8"
|
|
Content-Length: nnnn
|
|
|
|
<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:OrderItemResponse xmlns:m="Some-URI">
|
|
<OrderNumber>561381</OrderNumber>
|
|
</m:OrderItemResponse>
|
|
</SOAP-ENV:Body>
|
|
</SOAP-ENV:Envelope>
|
|
</pre>
|
|
|
|
<p>The response does not include a SOAP-specified header. The results are placed in an element whose name matches the method name (OrderItem) with the suffix (Response), such as <tt>OrderItemResponse</tt>.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|