You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Martin Kalén <ma...@curalia.se> on 2002/12/02 18:17:22 UTC

Java2WSDL generates incorrect WSDL when using extraclasses

Hello all,
  could anyone please help me out with this one. Is it a know bug and is 
there a simple work-around?

When generating a WSDL file with Java2WSDL using the "extra classes" to 
include additional classes in the output, the WSDL file has some 
problems with namespaces.

It seems that the emitter writes the namespace declarations before 
generating namespaces for extraclasses. I have a correct WSDL with 3 
namespaces tns1-tns3, when adding two extra classes (A and "B extends 
A") the following XML is added to the WSDL for B:
    <complexType name="B">
     <complexContent>
      <extension base="tns4:A">
       <sequence>
        <element name="stringValue" nillable="true" type="xsd:string"/>
       </sequence>
      </extension>
     </complexContent>
    </complexType>
   </schema>

This is all good, but there is no namespace declaration for "tns4" in 
the header and WSDL2Java will bail out with the following error:
java.io.IOException: Type A is referenced but not defined.

Any comments on this one?

-- 
Regards,
  Martin Kalen
  Curalia AB