Forum Discussion
haeoraki_127471
Nimbostratus
Apr 09, 2004get_availability() and get_state()?
get_availability and get_state method exists in iControl-4.5\iControl-4.5\sdk\support\java\ITCM\lib\ITCM.jar file, which is for CORBA.
I couldn't find any get_availability and get_state...
Apr 13, 2004
Apache SOAP is not strongly bound on the client. It relies on attrbutes to the "Call" object to set method names. As I mentioned in my last message, the LocalLBNode.java file contains a reference to the "get_state()" method. This sample used a wrapper method to retrieve attributes of the Node.
The getProperty method in this class is overloaded to call mulitple property accessors. Look in the method for getNodeState for the line this.getProperty("state", Integer.class);
I'm not too happy with the format of this sample application because it's use of overloading the property method makes it a bit more difficult to read. I'm going to look into making this application a bit more uniform like the other ones. In the meantime, here is a snippet of how to use the get_state() method:
.
.
.
Call call;
Vector params = new Vector();
URL urii;
String uri_ns;
IPPortDefinition nodeDef = new IPPortDefinition("10.10.10.10", 80);
uri = new URL("https://bigip_address/iControl/iControlPortal.cgi");
uri_ns = new String("urn:iControl:ITCMLocalLB/Node");
// Set Call Attributes
params.addElement(new Parameter("node_def", IPPortDefinition.class, nodeDef, null));
call.setParams(params);
call.setMethodName("get_state");
// Invoke Method
Response soapResponse = call.invoke(uri, uri_ns);
// Extract Results
Integer result = (Integer)soapResponse.getReturnValue().getValue();
if ( 1 == result.longValue() )
{
System.out.println("State : ENABLED\n");
}
else if ( 0 == result.logValue() )
{
System.out.println("State : DISABLED\n");
}
.
.
.
Hope this helps..
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
