Forum Discussion
Bryce_Klimoski
Nimbostratus
Oct 08, 2009Help with query_rule in java
I'm having trouble getting query_rule to work with java.
Here is my code.
iControl.GlobalLBRuleBindingStub iRuleQuery = (iControl.GlobalLBRuleBindingStub) new iControl.GlobalLBRuleLocator().getGlobalLBRulePort(new java.net.URL(url));
iRuleQuery.setTimeout(60000);
GlobalLBRuleRuleDefinition[] rule = iRuleQuery.query_rule(new String[] {"foobar"});
It always returns with the GTM not being able to find the iRule, even though it exists and I can use query_rule in perl just fine.
- What exactly is the error? I just ran the code and it returned what was expected
public void getGtmRule(String rulename) throws Exception { iControl.GlobalLBRuleRuleDefinition [] rule_defs = m_interfaces.getGlobalLBRule().query_rule(new String[] { rulename }); for(int i=0; i { System.out.println(rule_defs[ i ].getRule_name()); System.out.println(rule_defs[ i ].getRule_definition()); System.out.println("-----------------------"); } }
- Bryce_Klimoski
Nimbostratus
I am using the WSDLs. I figure out what I had wrong, needed to be making the call to local and not global.iControl.LocalLBRuleBindingStub iRuleQuery = (iControl.LocalLBRuleBindingStub) new iControl.LocalLBRuleLocator().getLocalLBRulePort(new java.net.URL(url)); iRuleQuery.setTimeout(60000); LocalLBRuleRuleDefinition[] rule = iRuleQuery.query_rule(new String[] {"foobar"});
- That would do it...
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