WSDL2Java fails with imported schemas in WSDL with file not found.
------------------------------------------------------------------
Key: AXIS2-796
URL: http://issues.apache.org/jira/browse/AXIS2-796
Project: Apache Axis 2.0 (Axis2)
Type: Bug
Components: Tools
Versions: 1.0
Reporter: Jeff U
When using WSDL2Java as ant task schemas that are imported as relative and
contained in the same directory as the WSDL cause the task to fail. It finds
them early on and then looks in a different directory later on according to the
output. This same WSDL and xsd's will work fine in the Eclipse AxisCodegen
plugin.
I believe this is possibly due to the basedir not being set correctly. The
Eclipse tool specifically sets the basedir early on in the configuration
whereas WSDL2Java does not.
Stack trace produced.
wsdl2java:
[delete] Deleting directory D:\Documents and
Settings\uchitjj\workspace\PaintContractorWS\target\generated-sources\java
[java] Retrieving schema at 'CustomerHeaderData.xsd', relative to
'file:/D:/Documents%20and%20Settings/uchitjj/workspace/PaintContractorWS/src/main/wsdl/'.
[java] Retrieving schema at 'CustomerMessages.xsd', relative to
'file:/D:/Documents%20and%20Settings/uchitjj/workspace/PaintContractorWS/src/main/wsdl/'.
[java] Retrieving schema at 'CustomerData.xsd', relative to
'file:/D:/Documents%20and%20Settings/uchitjj/workspace/PaintContractorWS/src/main/wsdl/CustomerMessages.xsd'.
[java] org.apache.axis2.wsdl.codegen.CodeGenerationException: Error
parsing WSDL
[java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:94)
[java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
[java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
[java] Caused by: org.apache.axis2.AxisFault:
org.apache.ws.commons.schema.XmlSchemaException: D:\Documents and
Settings\uchitjj\workspace\PaintContractorWS\src\CustomerMessages.xsd (The
system cannot find the file specified); nested exception is:
[java] java.lang.RuntimeException:
org.apache.ws.commons.schema.XmlSchemaException: D:\Documents and
Settings\uchitjj\workspace\PaintContractorWS\src\CustomerMessages.xsd (The
system cannot find the file specified)
[java] at
org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:243)
[java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:87)
[java] ... 2 more
[java] Caused by: java.lang.RuntimeException:
org.apache.ws.commons.schema.XmlSchemaException: D:\Documents and
Settings\uchitjj\workspace\PaintContractorWS\src\CustomerMessages.xsd (The
system cannot find the file specified)
[java] at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1916)
[java] at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1929)
[java] at
org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1714)
[java] at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:126)
[java] at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:250)
[java] at
org.apache.axis2.description.WSDL2AxisServiceBuilder.getXMLSchema(WSDL2AxisServiceBuilder.java:959)
[java] at
org.apache.axis2.description.WSDL2AxisServiceBuilder.copyExtensibleElements(WSDL2AxisServiceBuilder.java:1067)
[java] at
org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:221)
[java] ... 3 more
[java] Caused by: org.apache.ws.commons.schema.XmlSchemaException:
D:\Documents and
Settings\uchitjj\workspace\PaintContractorWS\src\CustomerMessages.xsd (The
system cannot find the file specified)
[java] at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:221)
[java] at
org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1911)
[java] ... 10 more
[java] Java Result: 1
[java] Exception in thread "main"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]