[ http://issues.apache.org/jira/browse/AXIS2-527?page=comments#action_12373718 ]
Jens Schumann commented on AXIS2-527: ------------------------------------- It seems that there is some confusion regarding relative resources in WSDL2Java/XmlBeans.compileXmlBeans. If I specify a relative url in my wsdl using xs:import the included fooBar.xsd will be found. If fooBar.xsd imports another relative xsds everything works fine. However using xs:includes will cause the above error message. So if I use an import in my wsdl all imported .xsds will be found, the first include will break everything. If I use include in my wsdl, the include itself fails. There is one existing workaround: If I use an absolute File URL (file://) in my wsdl everything works as expected, no matter it's an include or import. I will try to come up with a few wsdl/xsd examples. > Command-line XMLBeans databinding code generation fails for Axis2, but works > in XMLBeans stand-alone > ---------------------------------------------------------------------------------------------------- > > Key: AXIS2-527 > URL: http://issues.apache.org/jira/browse/AXIS2-527 > Project: Apache Axis 2.0 (Axis2) > Type: Bug > Components: databinding > Versions: 0.95 > Environment: Windows XP+SP2, Sun JDK1.4.2_08 > Reporter: Prabha Pillay > Assignee: Ajith Harshana Ranabahu > Attachments: Assessments.wsdl > > For the following WSDL, when I attempt to run WSDL2Java on the command line > with the "-d xmlbeans" argument, I get the following error: > > Exception in thread "main" > org.apache.axis2.wsdl.codegen.CodeGenerationException > : java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: > Could not load resource "../CPO/PersonName.xsd" (network downloads disabled). > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:146) > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) > at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) > Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: > error: > Could not load resource "../CPO/PersonName.xsd" (network downloads disabled). > at > org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:212) > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:101) > ... 2 more > Caused by: org.apache.xmlbeans.XmlException: error: Could not load resource > "../ CPO/PersonName.xsd" (network downloads disabled). > at > org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:665) > at > org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:185) > ... 3 more > > Contrary to the error message, there are no download restrictions on the > network. > If I run XMLBeans standalone (scomp on the command line), I'm able to > generate the databinding classes and the .xsb files, and thereby manually > setup an Axis2 web service and client. -- 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
