Skip Menu |

This queue is for tickets about the SOAP-Lite CPAN distribution.

Report information
The Basics
Id: 42847
Status: rejected
Priority: 0/
Queue: SOAP-Lite

People
Owner: Nobody in particular
Requestors: terry.simons [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.710.08
Fixed in: (no value)



Subject: SOAP::SOM object is unblessed.
I'm seeing an issue with a SOAP response where my SOAP::SOM object apparently isn't getting blessed for some reason? Here's the code in question: use strict; use warnings; use SOAP::Lite +trace=>'all'; use Data::Dumper; my $soapyUuid = new SOAP::Data->name("uuid", "<uuid>"); my $soap = SOAP::Lite->service('http://<ip>/rai/services/mu?wsdl')->readable(1); my $soapResponse = $soap->status($soapyUuid); print Dumper($soapResponse); print $soapResponse->valueof('//statusResponse/result/status'); When I execute my code, I get the following reply from the server: <?xml version="1.0" ?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:statusResponse xmlns:ns2="http://services.rai.mu.com"> <result uuid="<uuid>"> <name>Whatever</name> <status>Whatever</status> </result> </ns2:statusResponse> </S:Body> </S:Envelope> And my print Dumper($soapResponse) yields: $VAR1 = { 'status' => 'Whatever', 'name' => 'Whatever' }; But then I get the following error: Can't call method "valueof" on unblessed reference at ./testbedValidator.pl line 42. I have this working on the same system talking to a different WSDL implementation, so I know that my packages are at least reasonably sane... but the only differences I can see are: The WSDL schema for this service is different. I'm using ->service() instead of ->uri() and ->proxy() because I am a SOAP newb and I couldn't figure out how to get ->uri() and ->proxy() to play nice with this new service. The working scripts I mentioned *do* use ->uri() and ->proxy() because I couldn't get ->service() to work with *that* server. Go figure. At any rate, I'm not sure why this is happening. Any ideas?
You should probably check whether the variable you're calling a method on actually contains a value. Best regards, Martin