If you need to disambiguate <input> and <output> elements, you should include a @name attribute. From the WSDL 1.1 spec, Section 2.5 Bindings:

An operation element within a binding specifies binding information for the operation with the same name within the binding's portType. Since operation names are not required to be unique (for example, in the case of overloading of method names), the name attribute in the operation binding element might not be enough to uniquely identify an operation. In that case, the correct operation should be identified by providing the name attributes of the corresponding wsdl:input and wsdl:output elements.

<wsdl:definitions .... >
<wsdl:binding name="nmtoken" type="qname"> *
<-- extensibility element (1) --> *
<wsdl:operation name="nmtoken"> *
<-- extensibility element (2) --> *
<wsdl:input name="nmtoken"? > ?
<-- extensibility element (3) -->
</wsdl:input>
<wsdl:output name="nmtoken"? > ?
<-- extensibility element (4) --> *
</wsdl:output>
<wsdl:fault name="nmtoken"> *
<-- extensibility element (5) --> *
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>

The @name references the @name in the associated message.
Anne

On 9/24/05, Filipp Akinfiev <[EMAIL PROTECTED]> wrote:
Hi,
attribute message in <binding> <input...> or <output...> is not allowed...

<binding name="SOAPBinding" type="tns:XKMSPortType">
    <wsdlsoap:binding
      transport=" http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="Pending">
      <wsdlsoap:operation soapAction=""/>
   *   <input>*
        <wsdlsoap:body use="literal"/>
      </input>
*     <output> *
        <wsdlsoap:body use="literal"/>
      </output>
    </operation>
    ....
  </binding>

-----Ursprüngliche Nachricht-----
Von: Vicente David Guardiola Buitrago [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 23. September 2005 20:29
An: [email protected]
Betreff: WSDL2Java: WSDLException INVALID_WSDL

Hello,

I'm trying to use WSDL2Java tool (Axis2) to generate the Java code from
a WSDL file. But when I run the tool, I receive the next error:

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine .<init>(CodeGenerationEngi
ne.java:51)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:29)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:23)
Caused by: WSDLException (at
/wsdl:definitions/binding/operation[1]/input): faultCode=INVALID_WSDL:
Element '{http://schemas.xmlsoap.org/wsdl/}input' contained unexpected
attributes: 'message':
        at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseBindingInput(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseBindingOperation (Unknown
Source)        at com.ibm.wsdl.xml.WSDLReaderImpl.parseBinding(Unknown
Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL (Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at
org.apache.axis2.wsdl.builder.wsdl4j.WSDL1ToWOMBuilder.readInTheWSDLFile (WSD
L1ToWOMBuilder.java:154)
        at
org.apache.axis2.wsdl.builder.wsdl4j.WSDL1ToWOMBuilder.build(WSDL1ToWOMBuild
er.java:121)
        at
org.apache.axis2.wsdl.builder.wsdl4j.WSDL1ToWOMBuilder.build(WSDL1ToWOMBuild
er.java:94)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.getWOM(CodeGenerationEngi
ne.java:118)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngi
ne.java:49)
        ... 2 more


The WSDL part with the supossed error is:


<wsdl:definitions name="XMLKeyManagement"
  targetNamespace=" http://www.w3.org/2002/03/xkms#wsdl"
  xmlns:tns="http://www.w3.org/2002/03/xkms#wsdl"
  xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/"
  xmlns="http://schemas.xmlsoap.org/wsdl/"
  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/ "
  xmlns:xkms="http://www.w3.org/2002/03/xkms#">

  <import namespace="http://www.w3.org/2002/03/xkms# "
    location='http://www.w3.org/TR/xkms2/Schemas/xkms.xsd'/>

    ....

  <binding name="SOAPBinding" type="tns:XKMSPortType">
    <wsdlsoap:binding
      transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="Pending">
      <wsdlsoap:operation soapAction=""/>
   *   <input message="tns:PendingRequest">*
        <wsdlsoap:body use="literal"/>
      </input>
      <output message="tns:PendingResult">
        <wsdlsoap:body use="literal"/>
      </output>
    </operation>
    ....
  </binding>
....
</wsdl:definitions>


Any idea???

Thank you.

Vicente Guardiola




______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 22.09.2005





Reply via email to