[Xml-compile] WSDL confusion

Mark Overmeer mark at overmeer.net
Mon Oct 6 20:32:18 BST 2008


* Tobias Henoeckl (hoeni-xmlcompile at sisyphus.de) [081002 13:01]:
> When building a simple, WSDL based service for examination I get an
> error when parsing the WSDL with XML::Compile::WSDL11->new('x.wsdl'):
> 
>   error: element `{http://schemas.xmlsoap.org/wsdl/}binding' not
>   processed at {http://schemas.xmlsoap.org/wsdl/}definitions

Sorry that it took so long to answer... I had not a minute to spare, in
the last few days.

Running in debug mode, with

   use Log::Report mode => 3;

shows

   trace: misfit {http://schemas.xmlsoap.org/wsdl/}anyTopLevelOptionalElement (0..unbounded) element `{http://schemas.xmlsoap.org/wsdl/}input' not processed at {http://schemas.xmlsoap.org/wsdl/}definitions/binding/operation
   error: element `{http://schemas.xmlsoap.org/wsdl/}binding' not processed at {http://schemas.xmlsoap.org/wsdl/}definitions

So, the error is not on the 'binding' top-level but on 'input'

The WSDL schema says:

  <xs:complexType name="tBindingOperation">
    <xs:complexContent>
      <xs:extension base="wsdl:tExtensibleDocumented">
        <xs:sequence>
          <xs:element name="input" type="wsdl:tBindingOperationMessage" minOccurs="0"/>
          <xs:element name="output" type="wsdl:tBindingOperationMessage" minOccurs="0"/>
          <xs:element name="fault" type="wsdl:tBindingOperationFault" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:NCName" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

Which means that the order of elements is input, output, fault.
Your WSDL file says:

  <operation name="getRand">
    <soap:operation soapAction="urn:#getRand"/>
    <output>
      <soap:body use="literal"/>
    </output>
    <input>
      <soap:body use="literal"/>
    </input>
  </operation>

Wrong order.  Many (Open Source) XML implementations are sloppy.

The confusion may be that the "portType" order can either be input/output
or output/input... the binding order cannot.
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list