You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org> on 2006/04/21 11:23:06 UTC

[jira] Resolved: (AXIS2-560) WSDL2Java: org.apache.ws.commons.schema.XmlSchemaException when encountering cascaded schema imports

     [ http://issues.apache.org/jira/browse/AXIS2-560?page=all ]
     
Ajith Harshana Ranabahu resolved AXIS2-560:
-------------------------------------------

    Resolution: Fixed

Even when the schema's are patched to have the correct addressing namespace, the codegen failed. The fault has been found to be in the XmlSchema code and has been fixed.

> WSDL2Java: org.apache.ws.commons.schema.XmlSchemaException when encountering cascaded schema imports
> ----------------------------------------------------------------------------------------------------
>
>          Key: AXIS2-560
>          URL: http://issues.apache.org/jira/browse/AXIS2-560
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: databinding
>     Versions: 1.0
>  Environment: Mac OS X 10.4.6, Java 1.5.0_05, Java 1.4.2_09, Axis 1.0 RC1
> Error shows up independent from Java version
>     Reporter: Michel.Drescher
>     Assignee: Ajith Harshana Ranabahu
>     Priority: Critical
>  Attachments: Archive.zip
>
> The following is a terminal window capture when trying to generate classes and an XMLBeans databinding.
> Note that cascaded XML Schema imports and includes are very common in higher level / more complex WS interface scenarios.
> ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ----------
> > ./WSDL2Java.sh -uri ./rbyteio-service.wsdl -o ./ -s -p com.fujitsu.nextgrid.byteio -ss -sd -d xmlbeans -g
> the classpath :../lib/XmlSchema-SNAPSHOT.jar:../lib/annogen-0.1.0.jar:../lib/axiom-api-1.0-RC1.jar:../lib/axiom-dom-1.0-RC1.jar:../lib/axiom-impl-1.0-RC1.jar:../lib/axis-wsdl4j-1.2.jar:../lib/axis2-adb-1.0-RC1.jar:../lib/axis2-codegen-1.0-RC1.jar:../lib/axis2-jibx-1.0-RC1.jar:../lib/axis2-kernel-1.0-RC1.jar:../lib/backport-util-concurrent-2.0_01_pd.jar:../lib/commons-codec-1.3.jar:../lib/commons-httpclient-3.0.jar:../lib/commons-logging-1.0.4.jar:../lib/geronimo-spec-activation-1.0.2-rc4.jar:../lib/geronimo-spec-javamail-1.3.1-rc5.jar:../lib/geronimo-spec-jms-1.1-rc4.jar:../lib/jaxen-1.1-beta-7.jar:../lib/jaxme2-0.5.1.jar:../lib/jaxmejs-0.5.1.jar:../lib/jaxmexs-0.5.1.jar:../lib/jibx-run-SNAPSHOT.jar:../lib/log4j-1.2.13.jar:../lib/maven-itest-plugin-1.0.jar:../lib/policy-1.0.1-RC.jar:../lib/servletapi-2.3.jar:../lib/stax-api-1.0.jar:../lib/wstx-asl-2.9.2.jar:../lib/xbean-2.1.0.jar:../lib/xercesImpl-2.7.1.jar:../lib/xml-apis-1.3.02.jar
> Retrieving document at './rbyteio-bindings.wsdl', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/./'.
> Retrieving document at './rbyteio.wsdl', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio-bindings.wsdl'.
> Retrieving document at './rpw-2.wsdl', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving document at './rw-2.wsdl', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rpw-2.wsdl'.
> Retrieving schema at './r-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rw-2.wsdl'.
> Retrieving schema at './bf-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/r-2.xsd'.
> Retrieving schema at './xml.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/bf-2.xsd'.
> Retrieving schema at './ws-addr.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/bf-2.xsd'.
> Retrieving schema at './rp-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rpw-2.wsdl'.
> Retrieving schema at './bf-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rp-2.xsd'.
> Retrieving document at './rlw-2.wsdl', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving document at './rw-2.wsdl', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rlw-2.wsdl'.
> Retrieving schema at './r-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rw-2.wsdl'.
> Retrieving schema at './rl-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rlw-2.wsdl'.
> Retrieving schema at './bf-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rl-2.xsd'.
> Retrieving document at './rw-2.wsdl', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving schema at './r-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rw-2.wsdl'.
> Retrieving schema at './byteio.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving schema at './bf-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/byteio.xsd'.
> Retrieving schema at './bf-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving schema at './rl-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving schema at './ws-addr.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving schema at './rp-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving schema at './rbyteio.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.wsdl'.
> Retrieving schema at './bf-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.xsd'.
> Retrieving schema at './rp-2.xsd', relative to 'file:/Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/rbyteio.xsd'.
> log4j:WARN No appenders could be found for logger (org.apache.axis2.i18n.ProjectResourceBundle).
> log4j:WARN Please initialize the log4j system properly.
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:94)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> Caused by: org.apache.axis2.AxisFault: /Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/byteio.xsd/bf-2.xsd (Not a directory); nested exception is: 
>         org.apache.ws.commons.schema.XmlSchemaException: /Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/byteio.xsd/bf-2.xsd (Not a directory)
>         at org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:212)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:87)
>         ... 2 more
> Caused by: org.apache.ws.commons.schema.XmlSchemaException: /Users/mDrescher/Desktop/ByteIO/Axis2/axis2-std-1.0-RC1-bin/bin/byteio.xsd/bf-2.xsd (Not a directory)
>         at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:204)
>         at org.apache.ws.commons.schema.SchemaBuilder.getXmlSchemaFromLocation(SchemaBuilder.java:1902)
>         at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1705)
>         at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:124)
>         at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:57)
>         at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:238)
>         at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:200)
>         at org.apache.ws.commons.schema.SchemaBuilder.getXmlSchemaFromLocation(SchemaBuilder.java:1902)
>         at org.apache.ws.commons.schema.SchemaBuilder.getXmlSchemaFromLocation(SchemaBuilder.java:1887)
>         at org.apache.ws.commons.schema.SchemaBuilder.handleInclude(SchemaBuilder.java:1737)
>         at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:119)
>         at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:233)
>         at org.apache.axis2.description.WSDL2AxisServiceBuilder.getXMLSchema(WSDL2AxisServiceBuilder.java:900)
>         at org.apache.axis2.description.WSDL2AxisServiceBuilder.copyExtensibleElements(WSDL2AxisServiceBuilder.java:1010)
>         at org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:189)
>         ... 3 more
> ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ---------- SNIP ----------

-- 
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