axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Grafe <ogr...@extremenetworks.com>
Subject [AXIS2] WSDL2Java: SchemaLocation and relative path / circular im ports
Date Sat, 26 Aug 2006 02:26:15 GMT
Hi!

I'm having problems to use Axis2 WSDL2Java with some test WSDL and schema
files I made, see attached files. Some of the schemas are importing each
other, I think that is confusing WSDL2Java.

Command for code generation:

C:\wsdltest>java org.apache.axis2.wsdl.WSDL2Java -uri ord.wsdl > error.txt
2>&1

error.txt:
Retrieving schema at './xsd/ord.xsd', relative to 'file:/C:/wsdltest/'.
Retrieving schema at './prod1.xsd', relative to
'file:/C:/wsdltest/xsd/ord.xsd'.
Retrieving schema at './prod2.xsd', relative to
'file:/C:/wsdltest/xsd/prod1.xsd'.
Retrieving schema at './prod1.xsd', relative to
'file:/C:/wsdltest/xsd/prod2.xsd'.
Retrieving schema at './common.xsd', relative to
'file:/C:/wsdltest/xsd/prod2.xsd'.
Retrieving schema at './common.xsd', relative to
'file:/C:/wsdltest/xsd/prod1.xsd'.
Retrieving schema at './common.xsd', relative to
'file:/C:/wsdltest/xsd/ord.xsd'.
Retrieving schema at './prod2.xsd', relative to
'file:/C:/wsdltest/xsd/ord.xsd'.
Exception in thread "main" java.lang.StackOverflowError
	at java.util.ArrayList.get(Unknown Source)
	at sun.misc.URLClassPath.getLoader(Unknown Source)
	at sun.misc.URLClassPath.findResource(Unknown Source)
	at java.net.URLClassLoader$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findResource(Unknown Source)
	at java.lang.ClassLoader.getResource(Unknown Source)
	at java.lang.ClassLoader.getResource(Unknown Source)
	at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
	at javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.xml.parsers.SecuritySupport.getResourceAsStream(Unknown
Source)
	at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown
Source)
	at javax.xml.parsers.FactoryFinder.find(Unknown Source)
	at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown
Source)
	at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.ja
va:213)
	at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.ja
va:1911)
	at
org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1
708)
	at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuil
der.java:126)
	at
org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:53)
	at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.ja
va:255)
	at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.ja
va:217)
	at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.ja
va:1911)
	at
org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1
708)
	at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuil
der.java:126)
	at
org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:53)
	at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.ja
va:255)
	at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.ja
va:217)
	at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.ja
va:1911)
	at
org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1
708)
	at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuil
der.java:126)
	[... last 6 lines repeated over and over]

Is this a bug or am I doing something wrong here? BTW, these files are
working with Axis 1.4 wsdl2java.
And according to XMLSpy my wsdl and schemas are valid, but that doesn't mean
anything. 

Thanks you very much,
Oliver


Mime
View raw message