aspose file tools*
The moose likes Web Services and the fly likes Axis2 XMLBean Duplicate global element Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2 XMLBean Duplicate global element Error" Watch "Axis2 XMLBean Duplicate global element Error" New topic
Author

Axis2 XMLBean Duplicate global element Error

Expert Software Developer
Greenhorn

Joined: Mar 29, 2011
Posts: 2
I am unable to create XMLBean Client of a web service. Whereas I am able to create ADB client of the same web service. I get following exception when attempting to create XMLBean client:

------------------------------------------------------------------------------------------------------------------
C:\axis2-1.5.4\bin>wsdl2java -uri http://localhost/PSIGW/PeopleSoftServiceLis
teningConnector/SAD_ADMISSIONS.1.wsdl -d xmlbeans -s
Using AXIS2_HOME: C:\axis2-1.5.4
Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_22
Retrieving document at 'http://localhost/PSIGW/PeopleSoftServiceListeningConn
ector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SAD_CREATEAPPL_REQ.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SAD_CREATEAPPL_RESP.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SCC_ENTITY_CONSTITUENT.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_CREATEAPPL_RESP.V1.xsd'.
Retrieving schema at 'SCC_ENTITY_APPLICATION.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_CREATEAPPL_RESP.V1.xsd'.
Retrieving schema at 'SAD_FAULT_RESP.V1.xsd', relative to 'http://localhost/P
SIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SAD_GETAPPL_REQ.V1.xsd', relative to 'http://localhost/
PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SAD_GETAPPL_RESP.V1.xsd', relative to 'http://localhost
/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SCC_ENTITY_CONSTITUENT.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_GETAPPL_RESP.V1.xsd'.
Retrieving schema at 'SCC_ENTITY_APPLICATION.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_GETAPPL_RESP.V1.xsd'.
Retrieving schema at 'SAD_GETAPPLS_REQ.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SAD_GETAPPLS_RESP.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SCC_ENTITY_CONSTITUENT.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_GETAPPLS_RESP.V1.xsd'.
Retrieving schema at 'SAD_GETATTACH_REQ.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SAD_GETATTACH_RESP.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SCC_ENTITY_ADM_APPL_ATCH.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_GETATTACH_RESP.V1.xsd'.
Retrieving schema at 'SAD_SAVEAPPL_REQ.V1.xsd', relative to 'http://localhost
/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SCC_ENTITY_CONSTITUENT.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_SAVEAPPL_REQ.V1.xsd'.
Retrieving schema at 'SCC_ENTITY_APPLICATION.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_SAVEAPPL_REQ.V1.xsd'.
Retrieving schema at 'SAD_SAVEAPPL_RESP.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SAD_SUBMITAPPL_REQ.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
Retrieving schema at 'SCC_ENTITY_CONSTITUENT.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_SUBMITAPPL_REQ.V1.xsd'.
Retrieving schema at 'SCC_ENTITY_APPLICATION.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_SUBMITAPPL_REQ.V1.xsd'.
Retrieving schema at 'SAD_SUBMITAPPL_RESP.V1.xsd', relative to 'http://localhost/PSIGW/PeopleSoftServiceListeningConnector/SAD_ADMISSIONS.1.wsdl'.
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_CREATEAPPL_REQ.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_CREATEAPPL_RESP.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_FAULT_RESP.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_GETAPPL_REQ.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_GETAPPL_RESP.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_GETAPPLS_REQ.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_GETAPPLS_RESP.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_GETATTACH_REQ.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_GETATTACH_RESP.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_SAVEAPPL_REQ.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_SAVEAPPL_RESP.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_SUBMITAPPL_REQ.V1.xsd]
[INFO] Resolving schema with publicId [http://xmlns.oracle.com/Enterprise/HCM/se
rvices] and systemId [SAD_SUBMITAPPL_RESP.V1.xsd]
[INFO] Resolving schema with publicId [null] and systemId [SCC_ENTITY_CONSTITUEN
T.V1.xsd]
[INFO] Resolving schema with publicId [null] and systemId [SCC_ENTITY_APPLICATIO
N.V1.xsd]
[INFO] Resolving schema with publicId [null] and systemId [SCC_ENTITY_ADM_APPL_A
TCH.V1.xsd]
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationExcept ion
: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine .generate(CodeGener
ationEngine.java:271)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.jav a:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.jav a:24)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExcepti
on
at org.apache.axis2.wsdl.codegen.extension.XMLBeansEx tension.engage(XMLB
eansExtension.java:126)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine .generate(CodeGener
ationEngine.java:224)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis2.wsdl.codegen.extension.XMLBeansEx tension.engage(XMLB
eansExtension.java:115)
... 3 more
Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: C:\axis
2-1.5.4\bin\SAD_SUBMITAPPL_RESP.V1.xsd:2:1: error: sch-props-correct.2: Duplicat
e global element: SAD_SUBMITAPPL_RESP@http://xmlns.oracle.com/Enterprise/HCM/ser
vices (Original global element found in file: SAD_SAVEAPPL_RESP.V1.xsd)
at org.apache.axis2.xmlbeans.CodeGenerationUtility.pr ocessSchemas(CodeGe
nerationUtility.java:325)
... 8 more
Caused by: org.apache.xmlbeans.XmlException: C:\axis2-1.5.4\bin\SAD_SUBMITAPPL_R
ESP.V1.xsd:2:1: error: sch-props-correct.2: Duplicate global element: SAD_SUBMIT
APPL_RESP@http://xmlns.oracle.com/Enterprise/HCM/services (Original global eleme
nt found in file: SAD_SAVEAPPL_RESP.V1.xsd)
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCo mpiler.compile(Sche
maTypeSystemCompiler.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBe ans.java:667)
at org.apache.axis2.xmlbeans.CodeGenerationUtility.pr ocessSchemas(CodeGe
nerationUtility.java:189)
... 8 more
C:\axis2-1.5.4\bin>
------------------------------------------------------------------------------------------------------------------

Kindly suggest how can I resolve this issue.
Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis2 XMLBean Duplicate global element Error