axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe PINON <christophepi...@yahoo.fr>
Subject RE: WSDL2Java Error (Element is referenced but not defined)
Date Tue, 06 May 2003 17:10:06 GMT

Hi George,

this WSDL has some problems! (==>Axis has problem ???)

I've just made a fex changes to this WSDL,
so that you can generate Java Classes 

This line :
>   <schema targetNamespace="" 
>xmlns="http://www.w3.org/2001/XMLSchema">
should be :
>   <schema xmlns="http://www.w3.org/2001/XMLSchema">
(Remove the Empty Target Namespace.

This one :
<wsdl:part element="impl:echoElements" name="part"/>
should be :
<wsdl:part element="impl:echoElements" name="part"/>
("impl" prefix added)

This one :
<wsdl:part element="echoElementsReturn"
name="echoElementsReturn"/>
should be :
<wsdl:part element="impl:echoElementsReturn"
name="echoElementsReturn"/>
("impl" prefix added)

With theses modifs, i succeed to generate Java classes
(Axis 1.0 RC1), but didn't test them ...

Hope It Helps.
Christophe

PS : Below, the whole WSDL corrected 
---------- START    ----------------------------

<?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>
		<!-- Modif  -->
		<!--
targetNamespace="http://localhost:7001/axis/services/MessageService"
 -->
		<schema 
				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">
			<!-- Modif -->
		<wsdl:part element="impl:echoElements" name="part"/>
	</wsdl:message>
	<wsdl:message name="echoElementsResponse">	
			<!-- Modif -->
		<wsdl:part element="impl: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>


---------- END ----------------------------




 --- Bhanu Pabreja <pabreja@infigroup.com> a écrit : > I
think the attachment bounced here is the copy of
> test.wsdl
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="urn:test"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="urn:test"
> xmlns:intf="urn:test"
> 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="in0" type="xsd:string"/>
>    <element name="getTheWorkDoneReturn"
> type="xsd:string"/>
>   </schema>
>  </wsdl:types>
> 
>    <wsdl:message name="getTheWorkDoneRequest">
> 
>       <wsdl:part element="in0" name="in0"/>
> 
>    </wsdl:message>
> 
>    <wsdl:message name="getTheWorkDoneResponse">
> 
>       <wsdl:part element="getTheWorkDoneReturn"
> name="getTheWorkDoneReturn"/>
> 
>    </wsdl:message>
> 
>    <wsdl:portType name="TestIFace">
> 
>       <wsdl:operation name="getTheWorkDone"
> parameterOrder="in0">
> 
>          <wsdl:input message="intf:getTheWorkDoneRequest"
> name="getTheWorkDoneRequest"/>
> 
>          <wsdl:output
> message="intf:getTheWorkDoneResponse"
> name="getTheWorkDoneResponse"/>
> 
>       </wsdl:operation>
> 
>    </wsdl:portType>
> 
>    <wsdl:binding name="TestServiceSoapBinding"
> type="intf:TestIFace">
> 
>       <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> 
>       <wsdl:operation name="getTheWorkDone">
> 
>          <wsdlsoap:operation soapAction=""/>
> 
>          <wsdl:input name="getTheWorkDoneRequest">
> 
>             <wsdlsoap:body namespace="urn:test"
> use="literal"/>
> 
>          </wsdl:input>
> 
>          <wsdl:output name="getTheWorkDoneResponse">
> 
>             <wsdlsoap:body namespace="urn:test"
> use="literal"/>
> 
>          </wsdl:output>
> 
>       </wsdl:operation>
> 
>    </wsdl:binding>
> 
>    <wsdl:service name="TestIFaceService">
> 
>       <wsdl:port binding="intf:TestServiceSoapBinding"
> name="TestService">
> 
>          <wsdlsoap:address
>
location="http://localhost:8080/ftaApp/services/TestService"/>
> 
>       </wsdl:port>
> 
>    </wsdl:service>
> 
> </wsdl:definitions>
> 
> Hope this helps ..
> BP
> 
> -----Original Message-----
> From: Bhanu Pabreja [mailto:pabreja@infigroup.com]
> Sent: Tuesday, May 06, 2003 12:49 PM
> To: axis-user@ws.apache.org
> Subject: RE: WSDL2Java Error (Element is referenced but
> not defined)
> 
> 
> This is what I am using from my command prompt:
> -v -W -s C:\project\test.wsdl
> 
> still I am gettting this error ...
> 
> If u want I can post you my .wsdl file and you can run
> the same and have a
> look ...
> 
> I have attahed my .wsdl file run it and have a look using
> the WSDL2Java
> utility and if you can find me solution it can be great
> ...
> 
> Thanx a ton ...
> 
> Bhanu
> 
> 
> 
> -----Original Message-----
> From: ALI,HANEEF (HP-Cupertino,ex1)
> [mailto:haneef.ali@hp.com]
> Sent: Tuesday, May 06, 2003 12:35 PM
> To: 'axis-user@ws.apache.org'
> Subject: RE: WSDL2Java Error (Element is referenced but
> not defined)
> 
> 
> Use -W option to generate the stubs.
> 
> Haneef
> 
> -----Original Message-----
> From: Bhanu Pabreja [mailto:pabreja@infigroup.com]
> Sent: Tuesday, May 06, 2003 7:37 AM
> To: axis-user@ws.apache.org
> Subject: RE: WSDL2Java Error (Element is referenced but
> not defined)
> 
> 
> 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
> 
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Mime
View raw message