You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Babul <bs...@gmail.com> on 2010/03/10 20:55:53 UTC
Re: COntract First web service, issue in Axis2 xmlbeans binding
I had to change the following in xsd:
<xs:element name="ZipCode" type="xs:int"/>
to
<xs:element name="ZipCode">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="args0" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
and it worked
I think we should organize the xsd properly.
Babul wrote:
>
> Hi,
>
> I tried creating a webservice, the contract first approach. when i try to
> generate server side code
> and corresponding xmlbeans binding code, i get the followig error:
> 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: java.lang.ArrayStoreException
> at
> org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325)
> ... 8 more
> Caused by: java.lang.ArrayStoreException
> at java.lang.System.arraycopy(Native Method)
> at java.util.ArrayList.toArray(ArrayList.java:306)
> at
> org.apache.axis2.xmlbeans.CodeGenerationUtility.convertToSchemaArray(CodeGenerationUtility.java:562)
> at
> org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:189)
>
> i checked some forums, where it was written that it could be a classpath
> issue, i have checked that as well and that doesn't seem to be a problem.
>
> I have attached the xsd and wsdl file and i use the following command for
> code generation:
>
> wsdl2java -uri SchoolService.wsdl -ss -d xmlbeans -ssi -o service
>
> Please help http://old.nabble.com/file/p27734586/school.xsd school.xsd
> http://old.nabble.com/file/p27734586/SchoolService.wsdl SchoolService.wsdl
>
--
View this message in context: http://old.nabble.com/COntract-First-web-service%2C-issue-in-Axis2-xmlbeans-binding-tp27734586p27854978.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org