Forum Discussion
Issue with Perl iControl script to get Enable State of GTM Virtual Server
With SOAP::Lite, you need to pass your parameters in using the SOAP::Data with the parameter name and value as you have commented out. Under the seams, the code gets converted to SOAP/XML across the wire and the server needs to determine elements by name for the case when methods take multiple parameters. You've omitted the "virtual_servers" so the server doesn't know how to extract that parameters content. Thus the "could not find element by name" error.
For an example, you can see the Perl Virtual Show example in the CodeShare at https://devcentral.f5.com/wiki/iControl.PerlVirtualShow.ashx. It uses the LocalLB.VirtualServer.get_enabled_state() method, but the parameter names are the same.
The definition for that method is:
EnabledState [] GlobalLB.VirtualServer.get_enabled_state(
in GlobalLB.VirtualServerDefinition [] virtual_servers
);Something like this should work for you...
$VirtualServerDefinition = {
name => "VS_Name_in_GTM",
address => "VS_IP_in_GTM",
port => "443"
};
$soapResponse = $VSSTATE->get_enabled_state(
SOAP::Data->name(virtual_servers => [$VirtualServerDefinition])
);
parse response hereHope this helped...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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