Forum Discussion

Jacob_Gilley_28's avatar
Jacob_Gilley_28
Icon for Nimbostratus rankNimbostratus
Mar 02, 2005

Java SOAP Binding using Apache Axis

I'm using Apache Axis 1.2 WSDL2Java utility to create Java interfaces from the 4.6.2 WSDLs. However, I'm running into problems with data type mapping during bean (de)serialization. Here is the exception that's being thrown:

 
 Mar 2, 2005 12:41:28 PM org.apache.axis.encoding.ser.BeanPropertyTarget set 
  
 SEVERE: Could not convert java.lang.Integer to bean field 'status', type com.f5.icontrol.itcm.globallb.ITCMGlobalLBEnableStatus 
  
 Mar 2, 2005 12:41:28 PM org.apache.axis.client.Call invoke 
  
 SEVERE: Exception: 
  
 java.lang.IllegalArgumentException: argument type mismatch 
  
 at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:142) 
  
 at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249) 
  
 at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509) 
  
 at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083) 
  
 at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171) 
  
 at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140) 
  
 at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:347) 
  
 at org.apache.axis.message.RPCElement.getParams(RPCElement.java:386) 
  
 at org.apache.axis.client.Call.invoke(Call.java:2402) 
  
 at org.apache.axis.client.Call.invoke(Call.java:2301) 
  
 at org.apache.axis.client.Call.invoke(Call.java:1758) 
  
 at com.f5.icontrol.itcm.globallb.ITCMGlobalLBWideipBindingStub.get_wideip_list(ITCMGlobalLBWideipBindingStub.java:1991) 
  
 at com.f5.icontrol.Main.main(Main.java:16) 
 

Any suggestions?
  • Unfortunately, Our WSDL implementation on the 4.x platform is not compatible with Apache Axis. The reason stems from our implementation of enumerated types and that in 4.x we use integers

     

     

     
       
         
           
             
              ENABLE 
             
           
           
             
              DISABLE 
             
           
           
             
              DISABLE_PARENT 
             
           
         
      

     

     

    From my reading of the specification, int was a valid type for enumerations and it worked in VS.NET which at the time was the only toolkit that had WSDL support. We also support Apache SOAP which is the precursor to Axis and we provide all the client bindings needed to use the interfaces.

     

     

    Well, along came Axis and it didn't like the int typed enums and would only support strings. Since we could not break backward compatibility with the current interfaces we couldn't add support for Axis.

     

     

    When 9.0 was introduced, we had to do a redesign of the interfaces anyway and chose at that time to convert our enums from type int to type string for the 9.x platforms.

     

     

    So, unfortunately, we don't support Apache Axis in our 4.x product lines due to (what we believe) is a limitation in Axis). If you are able to upgrade to our 9.x platform, then you are in luck because not only do we fully support Axis, but provide sample code in the SDK as well.

     

     

    -Joe