< previous
index

WSDL: the messages

next >

The second file defines the messages, for `document' SOAP. (Filename in $msgs). The messages are formed based on the schema components: what is the exact content of a request and its related answer? One portType can handle multiple (related) operations.

   <?xml version="1.0"?>
   <definitions name="StockQuote"
     targetNamespace="http://example.com/stockquote/definitions"
     xmlns:tns="http://example.com/stockquote/definitions"
     xmlns:sq="http://example.com/stockquote/schemas"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns="http://schemas.xmlsoap.org/wsdl/">

     <import namespace="http://example.com/stockquote/schemas"
             location="http://example.com/stockquote/stockquote.xsd"/>

     <message name="GetLastTradePriceInput">
       <part name="body" element="sq:TradePriceRequest"/>
     </message>

     <message name="GetLastTradePriceOutput">
       <part name="body" element="sq:TradePrice"/>
     </message>

     <portType name="StockQuotePortType">
       <operation name="GetLastTradePrice">
          <input message="tns:GetLastTradePriceInput"/>
          <output message="tns:GetLastTradePriceOutput"/>
       </operation>
     </portType>

   </definitions>

YAPC::EU 2007 Vienna, Presentation of XML::Compile second part, by Mark Overmeer.