Thanks for the reply Strausz. I'm not able to create Stubs using -d xmlbeans option. I could create stubs for the same WSDL with out xmlbeans option.
Here is the stack trace. Retrieving document at 'Sugar\Sugar_V1_2.xml'. Retrieving schema at 'http://schemas.xmlsoap.org/soap/encoding/', relative to 'file:/D:/Temp/axis2/bin/Sugar/Sugar_V1_2.xml'. Retrieving schema at 'http://schemas.xmlsoap.org/soap/encoding/', relative to 'file:/D:/Temp/axis2/bin/Sugar/Sugar_V1_2.xml'. [INFO] Resolving schema with publicId [ http://schemas.xmlsoap.org/soap/encoding/] and systemId [ http://schemas.xmlsoap.org/soap/encoding/] 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 I'm wondering if there is any c*hance to edit WSDL file, or set some tricky option*, so that everything works fine without going back to Axis(1). Thanks. On Wed, Apr 13, 2011 at 12:19 PM, Tibor Strausz <ti...@rapidsugar.nl> wrote: > The diff between adb and xmlbeans for your code is small (as far is a can see) > I was just playing with it. Here is my code. The first one is adb the one in comment is xmlbeans: > > log.info("starting"); > final Ifundsmw2_111Stub stub = new Ifundsmw2_111Stub(); > > Ifundsmw2_111Stub.OpenConnection2Mw2 req = new Ifundsmw2_111Stub.OpenConnection2Mw2(); > > req.setCClientLogin("ABC"); > req.setCClientPwd("ABC"); > > Ifundsmw2_111Stub.OpenConnection2Mw2Response result = stub.openConnection2Mw2(req); > > // OpenConnection2Mw2Document openConnection2Mw2Document = OpenConnection2Mw2Document.Factory.newInstance(); > // openConnection2Mw2Document.addNewOpenConnection2Mw2(); > // openConnection2Mw2Document.getOpenConnection2Mw2().setCClientLogin("XXXXXX"); > // openConnection2Mw2Document.getOpenConnection2Mw2().setCClientPwd("DDDDD"); > // OpenConnection2Mw2ResponseDocument result = stub.openConnection2Mw2(openConnection2Mw2Document); > // String result = result.getOpenConnection2Mw2Response().getResult(); > log.debug(result); > > > > > > > > -----Original Message----- > From: fire fox [mailto:fyr3...@gmail.com] > Sent: woensdag 13 april 2011 8:45 > To: axis-...@ws.apache.org; java-user@axis.apache.org > Subject: SOAP encoding for Axis2: Is XMLBeans the only solution? > > Hi All, > When I tried to contact a web-service (SugarCRM) using Axis2, I > was getting following exception - Unsupported type > http://schemas.xmlsoap.org/soap/encoding/ Array. > > After an exhaustive exploration, I came to know that the only solution > is to generate stubs using XMLBeans option, or step back to old - > Axis. > > -> I'm just wondering whether that's the only solution or is there any > tricky setting? > > -> I'm worried of it's effect on performance and complexity of implementation. > > Reference : http://thiamteck.blogspot.com/2008/12/axis2-wsdl2java-error-for-soap-encoding.html > > Thanks. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org > For additional commands, e-mail: java-user-h...@axis.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org > For additional commands, e-mail: java-user-h...@axis.apache.org > >