1 Reply Latest reply on Feb 5, 2009 8:45 AM by martinmurphy

    wsdl2java has error processing 3rd party WSDL

    sykesd

      I am attempting to create a consumer to call a 3rd party SOAP service, via HTTP. Using the wsdl2java.bat file included in the FUSE Services Framework 2.1.3.2 with the following command line:

       

      wsdl2java.bat -client -d c:\data\temp\servicemg http://test.warrantycentral.net/integrations/service.asmx?WSDL

       

      I receive the error:

      The part does not have a type defined. Every part must specify a type from some type system. The type can be specified using the built in element or type attributes or may be specified using an extension attribute.

       

      The WSDL is not under my control. And using an old version of GLUE (Software AG nee webMethods) I can consume this service successfully.

       

      Any ideas on what can be done to get the client to generate properly?

       

      Thanks in advance,

      David Sykes

        • 1. Re: wsdl2java has error processing 3rd party WSDL
          martinmurphy

          It looks to me like the problem is caused only by the messages used for the HTTP bindings, they have parts defined without types :

          <wsdl:message name="RequestMainXMLHttpGetOut">
              <wsdl:part name="Body"></wsdl:part>
          </wsdl:message>
          

          These are then used later on in the HTTP bindings

          <wsdl:binding name="ServiceHttpGet" type="tns:ServiceHttpGet">
            <http:binding verb="GET"></http:binding>
              <wsdl:operation name="RequestMainXML">
                <http:operation location="/RequestMainXML"></http:operation>
                <wsdl:input>
                  <http:urlEncoded></http:urlEncoded>
                </wsdl:input>
                <wsdl:output>
                  <mime:content part="Body" type="text/xml"></mime:content>
                </wsdl:output>
            </wsdl:operation>
          ...
          

           

          The problem is I don't think the CXF wsdl2java compiler ever supported this binding. Do you intend invoking using this binding? It looks like you have the same service exposed using multiple bindings. If you don't intend invoking using this binding from CXF you could copy the WSDL locally to the client and remove the offending messages and their porttypes/bindings/ports.

           

          You may be able to invoke against these endpoints using CXF the CXF support for JAX-RS, but I haven't used this much.

           

          Regards,

          - Martin