Forum Discussion

f5TechieAA_7448's avatar
f5TechieAA_7448
Icon for Nimbostratus rankNimbostratus
Nov 14, 2008

Error while generating clien stubs using axis wsdl2java

I was trying to generate java class from webservices but it keeps complaining about soapenc array. Need help. I need icontrol.jar (java version) if anyone has it.

 

 

 

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(CodeGener

 

ationEngine.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.InvocationTargetExcepti

 

on

 

at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp

 

leDBExtension.java:53)

 

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(Native Method)

 

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

 

java:39)

 

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

 

sorImpl.java:25)

 

at java.lang.reflect.Method.invoke(Method.java:585)

 

at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp

 

leDBExtension.java:50)

 

... 3 more

 

Caused by: org.apache.axis2.schema.SchemaCompilationException: can not find type

 

{http://schemas.xmlsoap.org/soap/encoding/}Array from the parent schema urn:iCo

 

ntrol

 

at org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCo

 

mpiler.java:1296)

 

at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCo

 

mpiler.java:1258)

 

at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaComp

 

iler.java:1153)

 

at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompi

 

ler.java:1097)

 

at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(

 

SchemaCompiler.java:1017)

3 Replies

  • The iControl.jar file for v9.6.0 of the SDK is available on the iControl Assembly Labs page

     

     

    http://devcentral.f5.com/Default.aspx?tabid=68

     

    Click here

     

     

     

    The issue you are seeing is with Axis2. At this point we are not compatible with Axis2 so you'll have to revert back to Axis1 to use this library. The reason is that the Axis2 folks decided not to support rpc/encoded as an encoding method and thus our array formats are not compatible. Our WSDL definitions are going on 6 years old and for us to revamp the way we are encoding would be a significant development effort and it would break existing client applications.

     

     

    If you need the prerequisite libraries for Axis1, I've bundled them up in this zip file:

     

     

    http://devcentral.f5.com/LinkClick.aspx?link=http%3a%2f%2fdevcentral.f5.com%2fdownloads%2fiControl%2fiControlJavaLibs.zip&tabid=73&mid=656

     

    Click here

     

     

     

    Keep in mind that we don't support these 3rd party libraries but are making them available for you if you can't get a working copy yourself.

     

     

    I understand the arguments for doc/lit vs. rpc/enc and WS-I's decision to support doc/lit but it hurts interfaces like ours that have been around awhile.

     

     

    -Joe
  • Thanks Joe for the binaries. I am running into this error while executing the code.

     

     

    "Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file"

     

     

    1)Which JDK/JRE did you use to generate the stubs and compile the classes?

     

    2) Can I get the *.java classes generated from WSDL? This will help me in troubleshooting without worrying about the JRE version.

     

     

    I appreciate for your help in this regard.

     

     

     

  • That library was built with 1.6. Here's a build with 1.5.

     

     

    http://devcentral.f5.com/LinkClick.aspx?link=http%3a%2f%2fdevcentral.f5.com%2flabs%2fiControlAssembly%2fiControl-JDK15.zip&tabid=73&mid=433

     

    Click here

     

     

     

    Let me know if you still need the sources and I'll see if I can get them packaged up and uploaded.

     

     

    -Joe