axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko" <dkishe...@gmail.com>
Subject wsdl2java crushes
Date Wed, 06 Jun 2007 12:52:42 GMT
Hi all

I am really interested in wsdl2java tool but have some problems.

On the following link you can find a lot of *good* wsdl files
http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/index.html
unfortunately wsdl2java crushes on the most of them (about 70%) with exceptions

For example, see
http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/index.html

getBalance.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:description xmlns:tns="http://example.org/getBalance/"
	xmlns:wsdl="http://www.w3.org/ns/wsdl"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://example.org/getBalance/">

	<wsdl:documentation>
		This test shows how to use elements from an included no-target
		namespace xsd (i.e. chameleon include)
	</wsdl:documentation>

	<wsdl:types>
		<xsd:schema targetNamespace="http://example.org/getBalance/"
			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
			<xsd:include schemaLocation="getBalance.xsd" />
		</xsd:schema>
	</wsdl:types>

	<wsdl:interface name="getBalanceInf">
		<wsdl:operation name="getBalance"
			pattern="http://www.w3.org/ns/wsdl/in-out">
			<wsdl:input element="tns:custInfo" />
			<wsdl:output element="tns:accInfo" />
		</wsdl:operation>
	</wsdl:interface>
</wsdl:description>

C:\axis2-1.2\bin>wsdl2java.bat -uri
C:\wsdl-test-suite\documents\good\Chameleon-1G\getBalance.wsdl
Using AXIS2_HOME:   C:\axis2-1.2
Using JAVA_HOME:    C:\Program Files\Java\jdk1.6.0
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing
WSDL
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:140)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: javax.wsdl.WSDLException: WSDLException (at
/wsdl:description): faultCode=INVALID_WSDL: Expected element
'{http://schemas.xmlsoap.org/wsdl/
}definitions'.
        at com.ibm.wsdl.xml.WSDLReaderImpl.checkElementName(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:308)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:97)
        ... 2 more

Why this tool doesn't understand this file?

Thanks,
Denis

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message