Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to do a SOAP call to http://www.webservicex.net/ConvertSpeed.asmx
My code as follows :
use SOAP::Lite; my $client = SOAP::Lite->new; $client = $client->service( "http://www.webservicex.net/ConvertSpee +d.asmx?wsdl" ); my $soapResp = $client->call( "ConvertSpeed", 100, "kilometersPerhour" +, "milesPerhour" ); if ( $soapResp->fault ) { print $soapResp->faultstring; } else { print $soapResp->result; }
This gives me the following error :
A service address has not been specified either by using SOAP::Lite->proxy() or a service description)
As far as I understand it the service address is obtained from the WSDL. I did however try using
$client->proxy("http://www.webservicex.net/ConvertSpeed.asmx"), but then I got the following error :
Server did not recognize the value of HTTP Header SOAPAction: #ConvertSpeed
Since the WSDL is supposed to handle the service address I removed the $client->proxy() bit and tried
other stuff. I have been struggling with this for 2 days now so I can't recall everything I tried, but
I did reduce method chaining a lot from my initial code to what I posted above. I also tried using
$client->ConvertSpeed(100, "kilometersPerhour", "milesPerhour") directly as I have seen it done this way
elsewhere, but it seems to not return anything.
This is running on Perl 5.10 and version 0.714 of SOAP::Lite.
I have also tested on Perl 5.22.1 and version 1.19.
I have also confirmed that this SOAP call works in other languages.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with SOAP call using SOAP::Lite and wsdl
by rahed (Scribe) on Jan 19, 2018 at 10:54 UTC | |
by Anonymous Monk on Jan 19, 2018 at 11:45 UTC | |
by rahed (Scribe) on Jan 19, 2018 at 13:48 UTC | |
by Anonymous Monk on Jan 22, 2018 at 11:29 UTC |