mariogolf_57851
Mar 11, 2010Nimbostratus
System::Failover cannot seem to extract result from response data
Using a standard approach to System::Failover and obtaining response data for example:
sub get_failover_mode()
{
$soapResponse = $Failover->get_failover_mode();
print Dumper ($soapResponse);
&checkResponse($soapResponse);
@Response = @{$soapResponse->result};
$i = 0;
foreach $Response (@Response)
{
print "$Response \n";
$i++;
}
return(0);
}
For get_failover_mode or get_failover_state I cannot obtain anything from $soapResponse->result.
here is a data dumper of the ... $soapResponse.
How to extract the ENUM for ACTIVE or STANDBY state/modes.
Thanks
$VAR1 = bless( {
'_content' => [
'E:Envelope',
{
'xmlns:y' => 'http://www.w3.org/2001/XMLSchema',
'E:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/',
'xmlns:E' => 'http://schemas.xmlsoap.org/soap/envelope/',
'xmlns:iControl' => 'urn:iControl',
'xmlns:A' => 'http://schemas.xmlsoap.org/soap/encoding/',
'xmlns:s' => 'http://www.w3.org/2001/XMLSchema-instance'
},
[
[
'E:Body',
{},
[
[
'm:get_failover_stateResponse',
{
'xmlns:m' => 'urn:iControl:System/Failover'
},
[
[
'return',
{
's:type' => 'iControl:System.Failover.FailoverState'
},
'FAILOVER_STATE_ACTIVE',
undef,
'FAILOVER_STATE_ACTIVE',
'return',
{
's:type' => 'iControl:System.Failover.FailoverState',
'{http://www.w3.org/2001/XMLSchema-instance}type' => '{urn:iControl}System.Failover.FailoverState'
}
]
],
undef,
{
'return' => 'FAILOVER_STATE_ACTIVE'
},
'{urn:iControl:System/Failover}get_failover_stateResponse',
{}
]
],
undef,
{
'get_failover_stateResponse' => $VAR1->{'_content'}[2][0][2][0][4]
},
'{http://schemas.xmlsoap.org/soap/envelope/}Body',
{}
]
],
undef,
{
'Body' => $VAR1->{'_content'}[2][0][4]
},
'{http://schemas.xmlsoap.org/soap/envelope/}Envelope',
{
'E:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/',
'{http://schemas.xmlsoap.org/soap/envelope/}encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/'
}
],
'_current' => [
$VAR1->{'_content'}
]
}, 'SOAP::SOM' );