Forum Discussion
Puli
Nimbostratus
Mar 20, 2008How to capture return messages in perl
Am trying to capture return messages in a perl variable so i can make decisions based on that.
Specificatlly am want capture return message from
$soapResponse = $PoolMember->get_session_ena...
Mar 21, 2008
Ok, I think I get what you are getting at. If you want to trap HTTP level error messages, you'll need to put an eval around your call and then interrogate the $soap->transport class's members (code, message, & status)
eval {
$soapResponse = $PoolMember->get_session_enabled_state
(
SOAP::Data->name(pool_names => [@pool_list])
);
};
if ( $PoolMember->transport->status != 200 ) {
print "Code : ", $PoolMember->transport->code, "\n";
print "Message: ", $PoolMember->transport->message, "\n";
print "Status : ", $PoolMember->transport->status, "\n";
exit;
}
else
{
...
}
Hopefully this get's you going.
-Joe
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