Forum Discussion
Problem with get_address() method
I'm having trouble figuring out how to get get_address() to return something other than an error and I'm assuming I'm doing something wrong but haven't had any luck figuring out what that is. The relevant code in Perl:
my $request = SOAP::Lite
-> uri('urn:iControl:LocalLB/NodeAddressV2')
-> proxy("https://$bigip:$port/iControl/iControlPortal.cgi");
my $nodelist = $request->get_list();
my $nodeiplist = $request->get_address($nodelist);
$request->get_list() returns the expected result but $request->get_address($nodelist) returns the following errors in SOAP::Lite:
Argument "https://bigip_ip_address:port/iControl/iControlPortal.cgi" isn't numeric in sprintf at /path/to/perl/lib/SOAP/Lite.pm line 1033.
Line 1033 in SOAP::Lite is:
sub gen_id { sprintf "%U", $_[1] }
Can anyone tell me what I'm probably doing wrong with my get_address() method call?
- What_Lies_Bene1Cirrostratus
I wonder if you are not taking into account the 'wrapper' or partition name. Here's what I get back from a curl request on a test box - I suspect this will help;
http://schemas.xmlsoap.org/soap/envelope/" xmlns:A=" xmlns:s=" xmlns:y=" xmlns:iControl="urn:iControl" E:encodingStyle="> /Common/1.1.22.11 <<<<<<<<<<<<
The curl request looked like this;
curl -k -X POST --user "username:password" -H "Content-Type: text/xml;charset=UTF-8" -d @get_nodes.xml
And the get_nodes.xml file contained this;
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" xmlns:soapenv=" xmlns:nodes="urn:iControl:LocalLB/NodeAddressV2" xmlns:soapenc=""> ">http://schemas.xmlsoap.org/soap/encoding/">">
- What_Lies_Bene1Cirrostratus
Seems to work for me using this so I can only assume there's an issue with your array handling;
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" xmlns:soapenv=" xmlns:nodeaddresses="urn:iControl:LocalLB/NodeAddressV2" xmlns:soapenc=""> ">http://schemas.xmlsoap.org/soap/encoding/">"> /Common/1.1.22.11 /Common/test_node
Returns this;
http://schemas.xmlsoap.org/soap/envelope/" xmlns:A=" xmlns:s=" xmlns:y=" xmlns:iControl="urn:iControl" E:encodingStyle="> 1.1.22.11 1.1.22.12
- What_Lies_Bene1Cirrostratus
Ideally you need to see what your requests (and the responses) look like on the wire, using something like ssldump. Here's how I do it, first, reduce the strength of the SSL/TLS cipher strings used for iControl connections, save and restart the httpd;
tmsh modify sys httpd ssl-ciphersuite NONE:RC4+RSA tmsh save sys config tmsh restart sys service httpd
Then use ssldump to capture live traffic;
ssldump -dXnqi eth0 -k/config/httpd/conf/ssl.key/server.key
And that's it, you should be able to see all the XML calls back and forth.
Note this will also capture any traffic generated by management GUI activity so best to ensure nothing is going on there.
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