Hi All

I'm trying to use the WSDL2Java tool to generate both client stubs and
server-side skeletons from a wsdl file that I have written and I'm getting a
confusing error.  The error message is
java.io.IOException: Element {urn:formTypeWs}Transactions is referenced but
not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.j
ava:670)

My full wsdl file is attached below.  I know the error is specifically
generated from the point where I use the Transactions element in the
'getFormTypesOut' message (because by commenting this part of the file out,
I can negate the error and hit errors from later in the file) and it seems
to be claiming that Transactions hasn't been defined when, as you can see I
have defined it within the schema at the top of the file.  There may be a
mistake in how I've defined Transactions but what makes it really confusing
is that the FormTypesRequest element is defined in exaclty the same way and
doesn't cause an error (minor differences such as Transactions containing a
max="unbounded" flag aren't the cause as the error still occurs with
max="1"), so I'm a little stumped as to what the object is about.  Any
suggestions would be very much appreciated.  Thanks

Chris Mannion
IT Junction
020 8452 4274

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:formTypeWs"
 xmlns:impl="urn:formTypeWs"
 xmlns:intf="urn:formTypeWs"
 xmlns:apachesoap="http://xml.apache.org/xml-soap";
 xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
 xmlns:xsd="http://www.w3c.org/2001/XMLSchema";
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
 <wsdl:types>
  <xsd:schema targetNamespace="urn:formTypeWs">
   <xsd:element name="FormTypesRequest">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element minOccurs="0" maxOccurs="1" name="TransactionType"
type="xsd:string"/>
      <xsd:element minOccurs="1" maxOccurs="1" name="From" type="xsd:date"/>
      <xsd:element minOccurs="1" maxOccurs="1" name="Until"
type="xsd:date"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>

   <xsd:element name="Transactions">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element minOccurs="0" maxOccurs="unbounded" name="FormType"
type="xsd:string"/>
     </xsd:sequence>
    </xsd:complexType>
   </xsd:element>
  </xsd:schema>
 </wsdl:types>

 <wsdl:message name="getFormTypesIn">
  <wsdl:part name="parametersIn" element="impl:FormTypesRequest"/>
 </wsdl:message>

 <wsdl:message name="getFormTypesOut">
  <wsdl:part name="parametersOut" element="impl:Transactions"/>
 </wsdl:message>

 <wsdl:portType name="TransactionTypes">
  <wsdl:operation name="getFormTypes">
   <wsdl:input message="impl:getFormTypesIn"/>
   <wsdl:output message="impl:getFormTypesOut"/>
  </wsdl:operation>
 </wsdl:portType>

 <wsdl:binding name="TransactionTypesSoapBinding"
type="impl:TransactionTypes">
  <wsdlsoap:binding style="document"
transport="http://schemas.xml.org/soap/http"/>
  <wsdl:operation name="getFormTypes">
   <wsdlsoap:operation soapAction="" style="document"/>
   <wsdl:input>
    <wsdlsoap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <wsdlsoap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
 </wsdl:binding>

 <wsdl:service name="TransactionTypesService">
  <wsdl:port name="TransactionTypes"
binding="impl:TransactionTypesSoapBinding">
   <wsdlsoap:address location="http://server:8081/services/formTypeWs"/>
  </wsdl:port>
 </wsdl:service>
</wsdl:definitions>

Reply via email to