axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fire fox <fyr3...@gmail.com>
Subject Duplicate global type exception while generating stubs using Axis2 (XMLBeans databinding)
Date Wed, 25 May 2011 07:50:40 GMT
Hi all,

----*>* My WSDL contains two external schema imports.

 <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"
schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
 <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="
http://schemas.xmlsoap.org/wsdl/"/>

----*>* When I try generating stubs using Axis2 1.5.4 with the following
command

-  wsdl2java.bat -u -d *xmlbeans *-uri sugar.wsdl

----*> *I get the following error. I'm suspicious on the emphasized areas
below, but could not solve it.

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
        at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:126)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        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:597)
        at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:115)
        ... 3 more
Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException:
http://schemas.xmlsoap.org/soap/encoding/:48:1: error:
sch-props-correct.2:*Duplicate global type: Array@
http://schemas.xmlsoap.org/soap/encoding/ (Original global type found in
file: null)*
        at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325)
        ... 8 more
Caused by: org.apache.xmlbeans.XmlException:
http://schemas.xmlsoap.org/soap/encoding/:48:1: error: sch-props-correct.2:
Duplicate global type:
Array@http://schemas.xmlsoap.org/soap/encoding/(Original global type
found in file: null)
        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:597)
        at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
        at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:189)
        ... 8 more



Please help.

Mime
View raw message