[ http://issues.apache.org/jira/browse/AXIS2-796?page=comments#action_12424095 ] Mark Lepak commented on AXIS2-796: ----------------------------------
I am having the same problem. When a WSDL is used that has a reletave reference to a schema the schema is not found. The error shows that it is looking for the relative schema in the wrong place. This appears to be similar to ISSUE # 733. My error output is below. C:\Documents and Settings\P51109.000\workspace\EIB_header.xsd is the wrong place. C:/Documents%20and%20Settings/P51109.000/workspace/Self%20Service%20Service/config/EIB_header.xsd is the right place. [java] Retrieving schema at 'EIB_header.xsd', relative to 'file:/C:/Documents%20and%20Settings/P51109.000/workspace/Self%20Service%20Service/config/'. [java] Retrieving schema at 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', relative to 'file:/C:/Documents%20and%20Settings/P51109.000/workspace/Self%20Service%20Service/config/EIB_header.xsd'. [java] Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'. [java] Retrieving schema at 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'. [java] Retrieving schema at 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'. [java] Retrieving schema at 'SelfServices.xsd', relative to 'file:/C:/Documents%20and%20Settings/P51109.000/workspace/Self%20Service%20Service/config/'. [java] Exception in thread "main" 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: C:\Documents and Settings\P51109.000\workspace\EIB_header.xsd (The system cannot find the file specified); nested exception is: [java] java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: C:\Documents and Settings\P51109.000\workspace\EIB_header.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: C:\Documents and Settings\P51109.000\workspace\EIB_header.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: C:\Documents and Settings\P51109.000\workspace\EIB_header.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 I can't send you the actual files because of privacy issues. > 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) > Issue Type: Bug > Components: Tools > Affects Versions: 1.0 > Reporter: Jeff U > Assigned To: Ajith Harshana Ranabahu > > 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]