What is your Axis2 version ? Try to use Axis2 1.6.1 version I  didn't get
mentioned exception for given WSDL file using Axis2 1.6.1.

Thanks !

On Thu, Feb 9, 2012 at 11:52 AM, luckyjun85 <leewei...@tm.com.my> wrote:

>
> Hi, I get this error when i try to run wsdl2java
>
>
> java.io.IOException: Element Service is referenced but not defined.
>        at
>
> org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:670)
>        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
>        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
>        at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
>        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
>
>
>
> Here is my WSDL
>
> ************************************************************
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:tns="http://www.tm.com.my/hsbb/eai/getCurrentBillStatement/";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/";
> name="getCurrentBillStatement"
> targetNamespace="http://www.tm.com.my/hsbb/eai/getCurrentBillStatement/";>
>  <wsdl:types>
>    <xsd:schema>
>      <xsd:element name="BusinessEvent">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="100"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="ServiceId">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="100"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="ErrorMessage">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="100"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="TotalAmountOutstanding">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="10"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="Adjustment">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="10"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="PreviousPayment">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="10"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="TotalDue">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="10"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="PaymentDueDate">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="10"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="CurrencyCode">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="10"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="ServiceDescription">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="50"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="ServiceCharges">
>        <xsd:simpleType>
>          <xsd:restriction base="xsd:string">
>            <xsd:maxLength value="10"/>
>          </xsd:restriction>
>        </xsd:simpleType>
>      </xsd:element>
>      <xsd:element name="Request">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element ref="BusinessEvent" minOccurs="0"/>
>            <xsd:element ref="ServiceId" minOccurs="0"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>      <xsd:element name="getCurrentBillStatement">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element ref="Request" minOccurs="0"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>      <xsd:element name="Service">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element ref="ServiceDescription" minOccurs="0"/>
>            <xsd:element ref="ServiceCharges" minOccurs="0"/>
>            <xsd:element ref="CurrencyCode" minOccurs="0"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>      <xsd:element name="ListOfService">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element ref="Service" minOccurs="0" maxOccurs="unbounded"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>      <xsd:element name="Response">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element ref="ErrorMessage" minOccurs="0"/>
>            <xsd:element ref="TotalAmountOutstanding" minOccurs="0"/>
>            <xsd:element ref="Adjustment" minOccurs="0"/>
>            <xsd:element ref="PreviousPayment" minOccurs="0"/>
>            <xsd:element ref="TotalDue" minOccurs="0"/>
>            <xsd:element ref="PaymentDueDate" minOccurs="0"/>
>            <xsd:element ref="ListOfService" minOccurs="0"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>      <xsd:element name="getCurrentBillStatementResponse">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element ref="Response" minOccurs="0"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>    </xsd:schema>
>  </wsdl:types>
>  <wsdl:message name="getCurrentBillStatement">
>    <wsdl:part name="parameters" element="getCurrentBillStatement"/>
>  </wsdl:message>
>  <wsdl:message name="getCurrentBillStatementResponse">
>    <wsdl:part name="parameters" element="getCurrentBillStatementResponse"/>
>  </wsdl:message>
>  <wsdl:portType name="getCurrentBillStatementPort">
>    <wsdl:operation name="getCurrentBillStatement">
>      <wsdl:input message="tns:getCurrentBillStatement"/>
>      <wsdl:output message="tns:getCurrentBillStatementResponse"/>
>    </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:binding name="getCurrentBillStatementBinding"
> type="tns:getCurrentBillStatementPort">
>    <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>    <wsdl:operation name="getCurrentBillStatement">
>      <soap:operation
> soapAction="http://www.tm.com.my/hsbb/eai/getCurrentBillStatement"/>
>      <wsdl:input>
>        <soap:body use="literal"/>
>      </wsdl:input>
>      <wsdl:output>
>        <soap:body use="literal"/>
>      </wsdl:output>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:service name="getCurrentBillStatementService">
>    <wsdl:port name="getCurrentBillStatementPort"
> binding="tns:getCurrentBillStatementBinding">
>      <soap:address location="http://localhost/getCurrentBillStatement/"/>
>    </wsdl:port>
>  </wsdl:service>
> </wsdl:definitions>
>
> *****************************************
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://old.nabble.com/Help%3A-Element-is-referenced-but-not-defined-tp33291168p33291168.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org
>
>


-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

Reply via email to