I am using the latest release axis 0.93

 

Rgds

Kheng kok

 

 


From: Ajith Ranabahu [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 04, 2006 5:01 PM
To: [email protected]
Subject: Re: WSDL2Java cannot handle schema with include statement

 

Hi,
Since this talks about XMLBeans, I guess this is a Axis2 issue. There was a problem with included schemas earlier but now it is fixed. What is the version (od Axis2) you are using ?

Ajith

On 1/4/06, Mar, Kheng Kok <[EMAIL PROTECTED]> wrote:

Hi,

 

I am trying to use WSDL2Java to generate Java classes from a WSDL, which imports a couple of schemas, and in one of the schema, it does an include of other schema files.

The WSDL2Java throw an exception during XmlBeans.compileXmlBeans in the XMLBeansExtension class.

 

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException : java.lang.RuntimeException : org.apache.xmlbeans.XmlException : error: Could not load resource "DocumentIdentification.xsd" (network downloads disabled).

      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate( CodeGenerationEngine.java:105 )

      at org.apache.axis2.wsdl.WSDL2Code.main( WSDL2Code.java:30 )

      at org.apache.axis2.wsdl.WSDL2Java.main( WSDL2Java.java:21 )

Caused by: java.lang.RuntimeException : org.apache.xmlbeans.XmlException : error: Could not load resource "DocumentIdentification.xsd" (network downloads disabled).

      at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage( XMLBeansExtension.java:195 )

      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate( CodeGenerationEngine.java:76 )

      ... 2 more

Caused by: org.apache.xmlbeans.XmlException : error: Could not load resource "DocumentIdentification.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:585 )

      at org.apache.xmlbeans.XmlBeans.compileXmlBeans( XmlBeans.java:665 )

      at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage( XMLBeansExtension.java:171 )

      ... 3 more

 

I modified the schema to remove the schema includes and it compiles properly this time. By stepping through the code, it looks like when the schema is retrieved, it is not expanded to include the "included" schemas files.

 

Please let me know if this is a bug.

 

I have attached the WSDL/schema files for your testing.

 

Best Regards

Kheng Kok

 





--
Ajith Ranabahu

Reply via email to