Thank you. I was able to generate source using XmlBeans and making some changes to the WSDL.
-----Original Message----- From: robertlazarski . [mailto:robertlazar...@gmail.com] Sent: Wednesday, September 28, 2016 5:44 AM To: java-user@axis.apache.org Subject: Re: using wsdl2java fails Migrating from AXIS to AXIS2 On Wed, Sep 28, 2016 at 1:58 AM, Dinshaw, Afshad <afshad.dins...@hpe.com> wrote: > 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-ut > ility-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-se > cext-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-ut > ility-1.0.xsd', > relative to > 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-se > cext-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(CodeGenera > tionEngine.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(Simpl > eDBExtension.java:53) > > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenera > tionEngine.java:247) > > ... 2 more > > Caused by: java.lang.reflect.InvocationTargetException > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > ava:57) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess > orImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:606) > > at > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simpl > eDBExtension.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(SchemaCompil > er.java:1166) > > at > org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(S > chemaCompiler.java:1092) > > at > org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.ja > va:1002) > > at > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.j > ava:752) > > at > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.j > ava:565) > > at > org.apache.axis2.schema.SchemaCompiler.processElements(SchemaCompiler. > java:2474) > > at > org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:215 > 0) > > at > org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler. > java:2035) > > at > org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompil > er.java:1162) > > at > org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(S > chemaCompiler.java:1092) > > at > org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.ja > va:1002) > > at > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.j > ava:752) > > at > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.j > ava:565) > > at > org.apache.axis2.schema.SchemaCompiler.processElements(SchemaCompiler. > java:2474) > > at > org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:215 > 0) > > at > org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler. > java:2035) > > at > org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompil > er.java:1162) > > at > org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(S > chemaCompiler.java:1092) > > at > org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.ja > va:1002) > > at > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.j > ava:609) > > at > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.j > ava: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> > IIRC (been a while) ADB is the default but doesn't have 100% support for the entire WSDL spec. XMLBeans mostly if not completely does, but hasn't had a release since 2012. Since you are using axis1 - last release 2006 - that probably doesn't matter. I would try that. JIBX hasn't been very active neither for a while AFAIK, best I can tell from their mailing list which I'm subscribed to. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org