Udostępnij za pośrednictwem


Web Services Quiz: Issue 7

The following Issue arose out of several enquires. Here is the consolidated question:

How does the corresponding SOAP binding look like if you want to get a WS-I compliant WSDL?

As always, answer and explanation will follow…

<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions targetNamespace="uri.test.com"  

xmlns:wsdl="https://schemas.xmlsoap.org/wsdl/"

xmlns:soap="https://schemas.xmlsoap.org/wsdl/soap/"

xmlns:xsd="https://www.w3.org/2001/XMLSchema"

xmlns:tns="uri.test.com"

xmlns="https://schemas.xmlsoap.org/wsdl/">

   <wsdl:types>

  <xsd:schema elementFormDefault="qualified" targetNamespace="uri.test.com">

  

         <xsd:complexType name="AddRequestType">

   <xsd:sequence>

  <xsd:element minOccurs="1" maxOccurs="1" name="a" type="xsd:int" />

  <xsd:element minOccurs="1" maxOccurs="1" name="b" type="xsd:int" />

  </xsd:sequence>

  </xsd:complexType>

   <xsd:complexType name="AddResponseType">

   <xsd:sequence>

  <xsd:element minOccurs="1" maxOccurs="1" name="c" type="xsd:int" />

  </xsd:sequence>

  </xsd:complexType>

  </xsd:schema>

   </wsdl:types>

   <wsdl:message name="AddRequestMsg">

   <wsdl:part name="AddRequest" type="tns:AddRequestType" />

   </wsdl:message>

   <wsdl:message name="AddResponseMsg">

   <wsdl:part name="AddResponse" type="tns:AddResponseType" />

   </wsdl:message>

   <wsdl:portType name="CalculatorPortType">

   <wsdl:operation name="Add">

      <wsdl:input message="tns:AddRequestMsg" />

      <wsdl:output message="tns:AddResponseMsg" />

   </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="CalculatorSoap" type="tns:CalculatorPortType">

      <!-- soap:binding goes here -->

   </wsdl:binding>

</wsdl:definitions>

Comments