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 George Austin <ga...@benefitsxml.com> on 2003/05/06 14:47:23 UTC
WSDL2Java Error (Element is referenced but not defined)
I'm trying to run the WSDL2Java code generator on the WSDL returned from the
sample message service
(http://localhost:7001/axis/services/MessageService?wsdl) and get the
following error:
C:\axis-1_1RC2>java org.apache.axis.wsdl.WSDL2Java -s MessageService.wsdl
java.io.IOException: Element {http://schemas.xmlsoap.org/wsdl/}echoElements
is referenced but not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.j
ava:527)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
at java.lang.Thread.run(Unknown Source)
The MessageService.wsdl contains:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://localhost:7001/axis/services/MessageService"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:7001/axis/services/MessageService"
xmlns:intf="http://localhost:7001/axis/services/MessageService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:types><schema
targetNamespace="" xmlns="http://www.w3.org/2001/XMLSchema"><import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><element
name="echoElements" type="xsd:anyType"/><element name="echoElementsReturn"
type="xsd:anyType"/></schema></wsdl:types>
<wsdl:message name="echoElementsRequest">
<wsdl:part element="echoElements" name="part"/>
</wsdl:message>
<wsdl:message name="echoElementsResponse">
<wsdl:part element="echoElementsReturn" name="echoElementsReturn"/>
</wsdl:message>
<wsdl:portType name="MessageService">
<wsdl:operation name="echoElements">
<wsdl:input message="intf:echoElementsRequest"
name="echoElementsRequest"/>
<wsdl:output message="intf:echoElementsResponse"
name="echoElementsResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MessageServiceSoapBinding" type="intf:MessageService">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echoElements">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="echoElementsRequest">
<wsdlsoap:body
namespace="http://localhost:7001/axis/services/MessageService"
use="literal"/>
</wsdl:input>
<wsdl:output name="echoElementsResponse">
<wsdlsoap:body
namespace="http://localhost:7001/axis/services/MessageService"
use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MessageServiceService">
<wsdl:port binding="intf:MessageServiceSoapBinding"
name="MessageService">
<wsdlsoap:address
location="http://localhost:7001/axis/services/MessageService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I first noticed this error using the WSDL from a service I wrote and
deployed under Axis. So I thought I would try one of the generated WSDLs
from the samples, but I get the same error. Any thoughts?
Thanks,
George
RE: WSDL2Java Error (Element is referenced but not defined)
Posted by Bhanu Pabreja <pa...@infigroup.com>.
great I am not the only one who is getting this bug I have posted a similar
post
with subject:Document Style Web Service bug ...
If you get any hint please make a detailed post ...
BP
-----Original Message-----
From: George Austin [mailto:gaustin@benefitsxml.com]
Sent: Tuesday, May 06, 2003 8:47 AM
To: Axis-User
Subject: WSDL2Java Error (Element is referenced but not defined)
I'm trying to run the WSDL2Java code generator on the WSDL returned from the
sample message service
(http://localhost:7001/axis/services/MessageService?wsdl) and get the
following error:
C:\axis-1_1RC2>java org.apache.axis.wsdl.WSDL2Java -s MessageService.wsdl
java.io.IOException: Element {http://schemas.xmlsoap.org/wsdl/}echoElements
is referenced but not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.j
ava:527)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
at java.lang.Thread.run(Unknown Source)
The MessageService.wsdl contains:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://localhost:7001/axis/services/MessageService"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:7001/axis/services/MessageService"
xmlns:intf="http://localhost:7001/axis/services/MessageService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:types><schema
targetNamespace="" xmlns="http://www.w3.org/2001/XMLSchema"><import
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><element
name="echoElements" type="xsd:anyType"/><element name="echoElementsReturn"
type="xsd:anyType"/></schema></wsdl:types>
<wsdl:message name="echoElementsRequest">
<wsdl:part element="echoElements" name="part"/>
</wsdl:message>
<wsdl:message name="echoElementsResponse">
<wsdl:part element="echoElementsReturn" name="echoElementsReturn"/>
</wsdl:message>
<wsdl:portType name="MessageService">
<wsdl:operation name="echoElements">
<wsdl:input message="intf:echoElementsRequest"
name="echoElementsRequest"/>
<wsdl:output message="intf:echoElementsResponse"
name="echoElementsResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MessageServiceSoapBinding" type="intf:MessageService">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echoElements">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="echoElementsRequest">
<wsdlsoap:body
namespace="http://localhost:7001/axis/services/MessageService"
use="literal"/>
</wsdl:input>
<wsdl:output name="echoElementsResponse">
<wsdlsoap:body
namespace="http://localhost:7001/axis/services/MessageService"
use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MessageServiceService">
<wsdl:port binding="intf:MessageServiceSoapBinding"
name="MessageService">
<wsdlsoap:address
location="http://localhost:7001/axis/services/MessageService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I first noticed this error using the WSDL from a service I wrote and
deployed under Axis. So I thought I would try one of the generated WSDLs
from the samples, but I get the same error. Any thoughts?
Thanks,
George