iControl 101 - #15 - System Services
Published May 29, 2008
Version 1.0Was this article helpful?
This routine returns a failure: Cannot convert a struct to a string.
can you assist please?
Thank you very much for the previous example. Very helpful!
:)
----------------------------------------------------------------------------
Subroutine: set_service
Purpose: Sets the service status for a service
----------------------------------------------------------------------------
sub set_service()
{
my ($servicetype, $serviceaction) = (@_);
print "servicetype $servicetype, serviceaction $serviceaction\n";
if (!($servicetype)) { &usage(); }
if (!($serviceaction)) { &usage(); }
$soapResponse = $System->set_service
(
SOAP::Data->name(services => [$servicetype]),
SOAP::Data->name(service_action => [$serviceaction])
);
if ( $soapResponse->fault )
{
print $soapResponse->faultcode, " ", $soapResponse->faultstring, "\n";
}
else
{
&get_service_status($servicetype);
}
return(0);
}