Forum Discussion
Andreas_Lorenze
Nimbostratus
Aug 11, 2005Problems with Perl samples
Hi Joe (or whoever will maybe answer my questions),
I´m just trying to start with some basic iControl development.
I read the FAQ and Quickstart Guides, as well surfing the forum to fin...
Andreas_Lorenze
Nimbostratus
Aug 18, 2005Hi Joe,
yes, I picked up the ConfigSync stuff. Just check out what I have done. I will have a look at the blogs as well. Didn´t realize it is possible to find something useful in. :-)
cheers
Andreas
use SOAP::Lite;
----------------------------------------------------------------------------
Validate Arguments
----------------------------------------------------------------------------
my $sHost = $ARGV[0];
my $sPort = $ARGV[1];
my $sUID = $ARGV[2];
my $sPWD = $ARGV[3];
my $sFILE = $ARGV[4];
if ( ($sHost eq "") or ($sPort eq "") or ($sUID eq "") or ($sPWD eq "") or ($sFILE eq "") )
{
die ("Usage: Test.pl host port uid pwd filename\n");
}
----------------------------------------------------------------------------
Transport Information
----------------------------------------------------------------------------
sub SOAP::Transport::HTTP::Client::get_basic_credentials
{
return "$sUID" => "$sPWD";
}
$soap = SOAP::Lite
-> uri('urn:iControl:ITCMSystem/ConfigSync')
-> readable(1)
-> proxy("https://$sHost:$sPort/iControl/iControlPortal.cgi");
----------------------------------------------------------------------------
$soap_response =
$soap->save_configuration
(
SOAP::Data->name
(
filename => $sFILE
),
SOAP::Data->name
(
save_flag => 0
)
);
if ( $soap_response->fault )
{
print $soap_response->faultcode, " ", $soap_response->faultstring, "\n";
}
else
{
my $result = $soap_response->result;
print "Configuration saved to: $sFILE";
}
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