Databases Reference
In-Depth Information
Importing our wrapper elements
The next step is to import the schema containing the wrapper elements into our
WSDL; we do this by using an import statement within the types section of our
WSDL, as shown in the following code snippet:
<types>
<xsd:schemaelementFormDefault="qualified">
<xsd:import schemaLocation="OrderFulfilmentEBM_v1_0.xsd"
namespace="http://rubiconred.com/obay/ebm/OrderFulfilment"/>
</xsd:schema>
<types>
Before we can refer to the wrapper elements contained within this schema, we
must also declare its namespace and corresponding prefix within the definitions
element of the WSDL, as highlighted in the following code snippet:
<definitionsname="OrderFulfillment"
targetNamespace="http://rubiconred.com/obay/svc/OrderFulfillment"
xmlns:tns="http://rubiconred.com/obay/svc/OrderFulfillment"
xmlns:ebm="http://rubiconred.com/obay/ebm/OrderFulfillment"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
Defining the 'message' elements
Once we have defined and imported our wrapper elements, it's pretty straightforward
to define our message elements. We should have one message element per wrapper
element. From a naming perspective, we use the same name for the message element
as we did for our wrapper elements. So for our setShippingInstruction operation,
we have defined the following message elements:
<messagename="setShippingInstruction">
<partname="payload"element="ebm:setShippingInstruction"/>
</message>
<messagename="setShippingInstructionResponse">
<partname="payload"element="ebm:setShippingInstructionResponse"/>
</message>
 
Search WWH ::




Custom Search