Share via


Web Services Quiz: Issue 9

YAWSQ (Yet Another Web Services Quiz)

This issue is really interesting. It beautifully demonstrates one of the over-engineered but poorly specified parts of the WSDL 1.1 specification. The following WSDL is very similar to the one I got from one of my customers. He simply had trouble to generate proxies or stubs based on it. After some investigation, I found finally the reason for his troubles. Do you have any idea what’s wrong? As always, answer and explanation will follow…

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

<definitions targetNamespace="uri.beatsch.issue9"  

      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.beatsch.issue9"

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

  <types>

  <xsd:schema elementFormDefault="qualified" targetNamespace="uri.beatsch.issue9">

  <xsd:element name="AddRequest" type="tns:AddRequestType"/>

  <xsd:element name="AddResponse" type="tns:AddResponseType"/>

  <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>

  </types>

  <message name="AddRequestMsg">

  <part name="AddRequestPart" element="tns:AddRequest" />

  </message>

  <message name="AddResponseMsg">

  <part name="AddResponsePart" element="tns:AddResponse" />

  </message>

  <portType name="CalculatorPort">

  <operation name="Add">

  <output name="AddResponse" message="tns:AddResponseMsg" />

  <input name="AddRequest" message="tns:AddRequestMsg" />

  </operation>

  </portType>

  <binding name="Calculator" type="tns:CalculatorPort">

  <soap:binding transport="https://schemas.xmlsoap.org/soap/http" style="document"/>

  <operation name="Add">

  <soap:operation soapAction="uri.beatsch.issue9/Add"/>

  <input name="AddRequest">

  <soap:body use="literal"/>

  </input>

  <output name="AddResponse">

  <soap:body use="literal" />

  </output>

  </operation>

  </binding>

</definitions>

Comments

  • Anonymous
    October 07, 2004
    Change <input> element and the <output> element into the 'right' order and it works.
  • Anonymous
    October 07, 2004
    There is no Protocol in the WSDL.The WSDL needs to be specified with the protocol HTTPGET HTTPPOST or SOAPOVERHTTP to be compiled using wsdl
  • Anonymous
    October 07, 2004
    This looks like a solicit-response style operation :)

    -- dims