Hello, In your example, $ret is really a soap response object (SOM) unless something happened to cause an exception (die or croak) to occur. You can read theMessage 1 of 2 , Apr 6, 2009View SourceHello,
In your example, $ret is really a soap response object (SOM) unless something happened to cause an exception (die or croak) to occur. You can read the data access methods in: http://search.cpan.org/perldoc?SOAP::SOM
But in general you can use XPath methods to retrieve data. Here is an example:
my $resp= $soap->call( $method => @params); # changed ret to resp
die "Fault occurred: " . $resp->faultstring if $resp && $resp->fault;
# grab data from response
print "Cat: " . $resp->match('//cat') if $resp->match('//cat'); ## not a great example...
In your example the 'result' method will only return the data in a method Response block. This is kind of confusing but basically the server needs to return something that looks like:
If it doesn't then the 'result' method will return undef even though there might a SOAP repsonse with data from your service. Otherwise, you can grab the other data in the SOAP response with the method above.