You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Shantanu Sen <ss...@pacbell.net> on 2004/06/30 11:02:45 UTC

WSDL2Java error question

If I have the following snippet in my WSDL

xmlns:MyDataTypes="urn:BigTicket">
 <wsdl:types>
 <xsd:schema targetNamespace="urn:BigTicket">
  
     <xsd:element name="BigTicket100">
         <xsd:complexType>
             <xsd:sequence>
                 <xsd:element name="Version" type="xsd:string"/>
                 <xsd:element name="ID" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
     </xsd:element>  

 </xsd:schema>
</wsdl:types> 
   
 <wsdl:message name="sayHello2Request">
      <wsdl:part name="in0" type="MyDataTypes:BigTicket100"/>
   </wsdl:message>

I get the following error when running WSDL2Java

java.io.IOException: Type {urn:BigTicket}BigTicket100 is referenced but not defined

If I change the type declaration as follows, WSDL2Java runs fine. 
<xsd:complexType name="BigTicket100">
    <xsd:sequence>
        <xsd:element name="Version" type="xsd:string"/>
        <xsd:element name="ID" type="xsd:string"/>
    </xsd:sequence>
 </xsd:complexType>
This is both on Axis 1.1 and the latest checked in code-base. The declaration that causes the error seems to be legit schema to me. Can anyone comment on this? Else, I'll file a bug.

Thanks,

Shantanu Sen