Forum Discussion

DeVon_Jarvis's avatar
DeVon_Jarvis
Icon for Altostratus rankAltostratus
Apr 06, 2010

iControl with Java?

Need to setup a Java environment for iControl. I downloaded Axis2 and the iControlAssembly, and I compiled the code in this example:

 

http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=115

 

But it won't compile. I get "The type org.apache.axis.client.Stub cannot be resolved. It is indirectly referenced from required .class files"

 

Any ideas?

 

Here is the code:

 

package icontrol;
public class Test1 {
    /**
     * @param args
     */
    public static void main(String[] args) {
        iControl.Interfaces interfaces = new iControl.Interfaces();
        if(interfaces.initialize("bigip1.con-way.com", "admin", "xxxxxxxxx")) {
            iControl.SystemSystemInfoPortType t = interfaces.getSystemSystemInfo();
            String version = t.get_version();
            System.out.println("version=" + version);
        }
    }
}

 

 

  • Unfortunately, iControl isn't compatible with Axis2 as Apache decided to remove support for rpc/enc when they moved from Axis1 to Axis2.

     

     

    If you download the iControl library for Java from the iControl Labs project, it includes a compiled version of all our .WSDL files along with all of the required Axis1 libraries to get you going.

     

     

    When that article was written, Axis2 did have support for the rpc/enc but at some point they removed it. I guess I'll have to get that article updated...

     

     

    -Joe