Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5061

"No element type is defined for message" while using wsdl2java on valid WSDL.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 1.5.4
    • None
    • codegen, wsdl
    • Windows 7 x86. Java 1.6.25

    Description

      Hi,

      my problem happens while using wsdl2java on WSDL (pasted below) generated from example WebService project created using Tibco BusinessWorks. When I use this command "wsdl2java.bat -o output -uri ZipInfo.wsdl", I get an error with stacktrace. WSDL seems to be valid.

      [ERROR] No element type is defined for messagecityInfoRequest
      org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: No element type is defined for messagecityInfoRequest
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameReference(WSDL11ToAxisServiceBuilder.java:1192)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameReference(WSDL11ToAxisServiceBuilder.java:1091)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(WSDL11ToAxisServiceBuilder.java:688)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoint(WSDL11ToAxisServiceBuilder.java:537)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WSDL11ToAxisServiceBuilder.java:488)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:362)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Caused by: org.apache.axis2.AxisFault: No element type is defined for messagecityInfoRequest
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:396)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      ... 2 more
      Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: No element type is defined for messagecityInfoRe
      quest
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameReference(WSDL11ToAxisServiceBuilder.java:1192)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameReference(WSDL11ToAxisServiceBuilder.java:1091)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(WSDL11ToAxisServiceBuilder.java:688)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoint(WSDL11ToAxisServiceBuilder.java:537)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WSDL11ToAxisServiceBuilder.java:488)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:362)
      ... 4 more

      WSDL:
      <?xml version="1.0" encoding="UTF-8"?>
      <!-Created by TIBCO WSDL->
      <wsdl:definitions xmlns:tns="http://xmlns.example.com/1134523930893" xmlns:ns0="http://xmlns.example.com/unique/default/namespace/1134438639123" xmlns:jndi="http://www.tibco.com/namespaces/ws/2004/soap/apis/jndi" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:jms="http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Untitled" targetNamespace="http://xmlns.example.com/1134523930893">
      <wsdl:types>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.example.com/unique/default/namespace/1134438639123" targetNamespace="http://xmlns.example.com/unique/default/namespace/1134438639123" elementFormDefault="qualified" attributeFormDefault="unqualified">
      <xsd:element name="cityDistances">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="fromCity">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element ref="ns0:cityInfo"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="toCity">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element ref="ns0:cityInfo"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="distance" type="xsd:decimal"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="cityInfo">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="city" type="xsd:string"/>
      <xsd:element name="state" type="xsd:string"/>
      <xsd:element name="location" type="xsd:string"/>
      <xsd:element name="latitude" type="xsd:decimal"/>
      <xsd:element name="longitude" type="xsd:decimal"/>
      <xsd:element name="zip" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="fromToZips">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element ref="ns0:fromZip"/>
      <xsd:element ref="ns0:toZip"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="fromZip" type="xsd:string"/>
      <xsd:element name="toZip" type="xsd:string"/>
      </xsd:schema>
      </wsdl:types>
      <wsdl:service name="ZipInfo-service1">
      <wsdl:port name="ZipPortEndpoint1" binding="tns:ZipPortEndpoint1Binding">
      <soap:address location=""/>
      <jms:connectionFactory>QueueConnectionFactory</jms:connectionFactory>
      <jms:targetAddress destination="queue">queue.sample</jms:targetAddress>
      </wsdl:port>
      </wsdl:service>
      <wsdl:portType name="ZipPort">
      <wsdl:operation name="getCityInfo">
      <wsdl:input message="tns:cityInfoRequest"/>
      <wsdl:output message="tns:cityInfoResponse"/>
      </wsdl:operation>
      <wsdl:operation name="getCityDistance">
      <wsdl:input message="tns:cityDistanceRequest"/>
      <wsdl:output message="tns:cityDistanceResponse"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="ZipPortEndpoint1Binding" type="tns:ZipPort">
      <soap:binding style="document" transport="http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS"/>
      <jms:binding messageFormat="Text"/>
      <wsdl:operation name="getCityInfo">
      <soap:operation style="document" soapAction="/Service/ZipInfo-service1.serviceagent/ZipPortEndpoint1/getCityInfo"/>
      <wsdl:input>
      <soap:body use="literal" parts="zip"/>
      </wsdl:input>
      <wsdl:output>
      <soap:body use="literal" parts="zipCode"/>
      </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="getCityDistance">
      <soap:operation style="document" soapAction="/Service/ZipInfo-service1.serviceagent/ZipPortEndpoint1/getCityDistance"/>
      <wsdl:input>
      <soap:body use="literal" parts="zips"/>
      </wsdl:input>
      <wsdl:output>
      <soap:body use="literal" parts="part1"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:message name="cityInfoRequest">
      <wsdl:part name="zip" type="xs:string"/>
      </wsdl:message>
      <wsdl:message name="cityInfoResponse">
      <wsdl:part name="zipCode" element="ns0:cityInfo"/>
      </wsdl:message>
      <wsdl:message name="cityDistanceRequest">
      <wsdl:part name="zips" element="ns0:fromToZips"/>
      </wsdl:message>
      <wsdl:message name="cityDistanceResponse">
      <wsdl:part name="part1" element="ns0:cityDistances"/>
      </wsdl:message>
      </wsdl:definitions>

      Attachments

        Activity

          People

            Unassigned Unassigned
            szeldon szeldon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: