Forum Discussion
Vince_Marco_969
Nimbostratus
Dec 10, 2007Generic Axis method execution...
Is it possible to send a generic Axis service call to iControl? Perhaps someone can help me find my problem. I am basically adapting a "get_pool_status" to 9.x. What I am getting is:
13:16:36,220 ERROR [STDERR] AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Unknown method "{urn:iControl:ITCMGlobalLB/Pool}:get_enabled_state"
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Unknown method "{urn:iControl:ITCMGlobalLB/Pool}:get_enabled_state"
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
My code is as follows:
String endpoint = "https://" + host + ":443/iControl/iControlPortal.cgi";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
if (f5update)
{
call.setOperationName(new QName("urn:iControl:ITCMGlobalLB/Pool", "get_enabled_state"));
call.setUsername(user);
call.setPassword(passwd);
call.addParameter("pool_name", XMLType.SOAP_ARRAY, ParameterMode.IN);
call.setReturnType(XMLType.SOAP_ARRAY);
Integer[] reply = (Integer[]) call.invoke(new Object[] { pool });
result = (reply[1] == 1);
}
I tried building the iControl sdk, but ran into numerous errors due to "enum" being used as a variable, and I'm on JDK 1.5. Is there a known way around this?
Vince
- Vince_Marco_969
Nimbostratus
Ok. I found my first issue and that is the parameter name "pool_name" instead of "pool_names". Still no dice. Still battling with this. Any ideas? - The error "Unknown method" is the main indicator here. First, I'm assuming you are looking at GlobalLB Pools, Not LocalLB Pools. Either way, there is a get_enabled_state() method for each. The real problem you have is with the namespace "ITCMGlobalLB". The "ITCM" prefix was for v4.x. For v9.x, it's just GlobalLB.
call.setOperationName(new QName("urn:iControl:GlobalLB/Pool", "get_enabled_state"));
- Vince_Marco_969
Nimbostratus
The only reason is lack of awareness of the iControl Assembly Lab project. F5 integration is just a small aspect of my project and the Lab area just wasn't my first stop. I am migrating from 4.x code which used generic WS calls and there isn't much to those either. But you have to get them exactly right. I do prefer the Assembly Lab API. It was very easy to integrate (15 minutes) and solved my problems exceptionally well. You're a lifesaver Joe. Thanks. - Glad to help! There are certain situations where users want full control of the iControl code and can't have another .jar included so that's why I asked. The whole reason I wrote the java library was mailing self-serving in that it greatly reduces the number of questions asked regarding namespace prefixing and parameter packing which is a major pain if doing by hand.
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