in reply to SOAP::Lite & WSDL Problem

There are issues with generating a soap call directly from wsdl.

I get an answer with this code:
$soap = SOAP::Lite->new( uri => ("http://www.webserviceX.NET"), proxy => ('http://www.webservicex.com/globalweather.asmx') +, ); $soap->on_action(sub{join '/',@_ }); my $city = SOAP::Data->name(CountryName => 'Singapore'); my $som = $soap->GetCitiesByCountry($city); if (my $match = $som->match('/Envelope/Body/GetCitiesByCountryResponse +/')) { print "match is OK: $match\n"; my $result = $som->valueof('//GetCitiesByCountryResponse/GetCitiesBy +CountryResult'); print Dumper($result); } else { print "match not OK: $match\n"; }
printing...
match is OK: 1 $VAR1 = '<NewDataSet> <Table> <Country>Singapore</Country> <City>Singapore / Paya Lebar</City> </Table> <Table> <Country>Singapore</Country> <City>Singapore / Changi Airport</City> </Table> </NewDataSet>';

Replies are listed 'Best First'.
Re^2: SOAP::Lite & WSDL Problem
by denny (Novice) on Oct 17, 2008 at 11:35 UTC
    There are issues with generating a soap call directly from wsdl.

    Could you expand on that? I'm banging my head against this particular brick wall right now...

      To be clearer - I have a service that responds fine to my hand-crafted XML sent using LWP, but b0rks when I try to access it via SOAP::Lite. I suspect the WSDL stuff is the key to what's going wrong, but unfortunately I don't have the 'proxy' URL available to me.
      I saw some people had poor results with generating xml code directly from service description.
      I tried several times to verify and wasn't successful as well but didn't dig into.
      I prefer coding the message through SOAP::Data class manually.