Perl Development FAQ

Welcome to the Perl Development FAQ for iControl. This FAQ will focus on issues surrounding development of iControl applications using the SOAPLite perl module.

How do I remove warnings from

There are a couple of problems with this example. Some warnings are a result of using potentially undefined variables in the deserializer if statement. Update:
if (defined ($urnMap->{$type}))

if ( defined ($urnMap) && defined ($type) && defined ($urnMap->{$type}))

This gets rid of most warnings, but you will still get something similar to: Subroutine SOAPDeserializertypecast redefined–> This warning can be removed by wrapping the subroutine in a BEGIN block with “no warnings” declared.
    no warnings;
  sub SOAP__Deserializer__typecast-->

I’m passing correct data, but I am still seeing SOAP errors. How do I fix this?

You may be passing the right data, but the format that you are sending may be incorrect. Try the following.
$param = SOAP__Data->name(variable_name)->value(variable_value);

It sure would be nice to see the raw xml output of my transactions. How can I get more information about what’s going on behind the scenes?

There are a couple of things to do. You can set the outputxml flag for a particular SOAPLite object by doing this:

You can also try this as part of your use statement:
use SOAP__Lite ( outputxml => 1, );

Or even better (but much more verbose):
use SOAP__Lite +trace => 'all', readable => 1, outputxml => 1;

I only have operator access to a specific partition on the F5. Many of the sample scripts don’t seem to work.

The default partition that is used is “Common”. If you need to access a different partition, you have to set the active partition:
my $Partition = SOAP__Lite
    -> uri('urn<!--:iControl:Management/Partition')-->
    -> proxy("https://yourBigIP/"."/iControl/iControlPortal.cgi");
    'Authorization' =>
        'Basic ' . MIME__Base64__encode($user.":".$password, '')-->

my $results = $Partition->set_active_partition(

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.