|
Building Blocks, by Murali Janakiraman
WSJ Vol 02 Issue 07 - pg.36
Listing 1: Simple WSDL grammar
<definitions name="StockQuote" >
<!...Assumes GetLastTradePrice is defined in XMLSchema ...>
<message name="GetLastTradePriceRequest">
<part name="body" element="xsd1:GetLastTradePrice" />
</message>
<!-- similarly define a message for "GetLastTradePriceResponse" -->
<portType name="StockQuotePortType">
<operation name="GetLastTradePrice">
<input message="tns:GetLastTradePriceRequest" />
<output message="tns: GetLastTradePriceResponse" />
</operation>
</portType>
<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<soap:binding style="document" />
<operation name="GetLastTradePrice">
<soap:operation soapAction="http://my.org/GetLastTradePrice" />
</operation>
</binding>
<service name="StockQuoteService">
<documentation>My First Stock Service</documentation>
<port name="StockQuotePort" binding="tns:StockQuoteBinding">
<soap:address location="http://my.org/stockquote" />
</port>
</service>
</definitions>
Listing 2: SOAP with attachments
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml;
start="<claim061400a.xml@claiming-it.com>"
--MIME_boundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <claim061400a.xml@claiming-it.com>
<?xml version='1.0' ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
..
<theSignedForm href="cid:claim061400a.tiff@claiming-it.com"/>
..
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--MIME_boundary
Content-Type: image/tiff
Content-Transfer-Encoding: binary
Content-ID: <claim061400a.tiff@claiming-it.com>
...binary TIFF image...
--MIME_boundary-
|