Dinshaw, Afshad
2016-09-28 04:58:42 UTC
Hello,
Currently we are using the axistools-maven-plugin 1.4 to generate java stubs/classes etc from our WSDL (which I have modified for privacy and attached).
The plugin is being used in our pom.
We need to move to AXIS2.
The first thing im trying to do is use your CLI tool wsdl2java (downloaded from: http://axis.apache.org/axis2/java/core/download.html) to generate the stubs/classes successfully.
However I am confused which option to use?
ADB/XmlBeans/JBIX ??
How would I know? AXIS did not have all these options.
I tried each of these options and got different errors all related to schema validation. However before I get into those error Id like to find out which option I should use based on my existing WSDL.
Thank you,
Afshad Dinshaw
Some of the errors I get are like:
C:\Temp\axis2\axis2-1.7.3\bin>wsdl2java -uri C:\ temp\uhvnet.wsdl -d adb -s
Using AXIS2_HOME: C:\Temp\axis2\axis2-1.7.3
Using JAVA_HOME: C:\Program Files\Java\jdk1.7.0_79
Retrieving document at 'C:\ temp\uhvnet.wsdl '.
Retrieving schema at 'http://www.w3.org/2003/05/soap-encoding', relative to 'file:/ C:/ temp/uhvnet.wsdl '.
Retrieving schema at 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'file:/ C:/ temp/uhvnet.wsdl '.
Retrieving schema at 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', relative to 'file:/ C:/ temp/uhvnet.wsdl '.
Retrieving schema at 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xs
d'.
Retrieving schema at 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'.
Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'.
log4j:WARN No appenders could be found for logger (org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
log4j:WARN Please initialize the log4j system properly.
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:294)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:50)
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.SimpleDBExtension.engage(SimpleDBExtension.java:53)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:247)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
... 3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: XSD complexType with mix content not supported in ADB
at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1166)
at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092)
at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1002)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:752)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:565)
at org.apache.axis2.schema.SchemaCompiler.processElements(SchemaCompiler.java:2474)
at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2150)
at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:2035)
at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1162)
at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092)
at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1002)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:752)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:565)
at org.apache.axis2.schema.SchemaCompiler.processElements(SchemaCompiler.java:2474)
at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2150)
at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:2035)
at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1162)
at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092)
at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1002)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:609)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:577)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:380)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:340)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:340)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:252)
at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102)
... 8 more
C:\Temp\axis2\axis2-1.7.3\bin>
Currently we are using the axistools-maven-plugin 1.4 to generate java stubs/classes etc from our WSDL (which I have modified for privacy and attached).
The plugin is being used in our pom.
We need to move to AXIS2.
The first thing im trying to do is use your CLI tool wsdl2java (downloaded from: http://axis.apache.org/axis2/java/core/download.html) to generate the stubs/classes successfully.
However I am confused which option to use?
ADB/XmlBeans/JBIX ??
How would I know? AXIS did not have all these options.
I tried each of these options and got different errors all related to schema validation. However before I get into those error Id like to find out which option I should use based on my existing WSDL.
Thank you,
Afshad Dinshaw
Some of the errors I get are like:
C:\Temp\axis2\axis2-1.7.3\bin>wsdl2java -uri C:\ temp\uhvnet.wsdl -d adb -s
Using AXIS2_HOME: C:\Temp\axis2\axis2-1.7.3
Using JAVA_HOME: C:\Program Files\Java\jdk1.7.0_79
Retrieving document at 'C:\ temp\uhvnet.wsdl '.
Retrieving schema at 'http://www.w3.org/2003/05/soap-encoding', relative to 'file:/ C:/ temp/uhvnet.wsdl '.
Retrieving schema at 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'file:/ C:/ temp/uhvnet.wsdl '.
Retrieving schema at 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', relative to 'file:/ C:/ temp/uhvnet.wsdl '.
Retrieving schema at 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xs
d'.
Retrieving schema at 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'.
Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'.
log4j:WARN No appenders could be found for logger (org.apache.axiom.locator.DefaultOMMetaFactoryLocator).
log4j:WARN Please initialize the log4j system properly.
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:294)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:50)
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.SimpleDBExtension.engage(SimpleDBExtension.java:53)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:247)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
... 3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: XSD complexType with mix content not supported in ADB
at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1166)
at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092)
at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1002)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:752)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:565)
at org.apache.axis2.schema.SchemaCompiler.processElements(SchemaCompiler.java:2474)
at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2150)
at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:2035)
at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1162)
at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092)
at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1002)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:752)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:565)
at org.apache.axis2.schema.SchemaCompiler.processElements(SchemaCompiler.java:2474)
at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2150)
at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:2035)
at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1162)
at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092)
at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1002)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:609)
at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:577)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:380)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:340)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:340)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:252)
at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102)
... 8 more
C:\Temp\axis2\axis2-1.7.3\bin>