soap lite question.

C

carex

Hello,

Why do I get for answer: "please, enter a proper IP" ?????

Here below the code I am using.
After a few hours I found that the line "on_action....." is needed for
interoperability with .net.
But even so it still does not work.


Any idea ?
Thanks.
carex.


#!/usr/bin/perl -w
use SOAP::Lite +trace => 'all';
$response = SOAP::Lite
-> uri("http://www.webservicex.net")
-> on_action( sub { join '/', 'http://www.webservicex.net', $_[1] } )
-> proxy("http://www.webservicex.net/geoipservice.asmx")
-> GetGeoIP('192.25.206.10') . "\n";
die "Fault: ".$response->faultcode." ".$response->faultdetail."
".$response->faultstring if $response->faultcode;
print $response->result;

### NOT OK


I also tried with other webservices from this site
(www.webservicex.net)
But without success when called within my perl script.
But I am new to webservices and still do not understand the diff
between uri/proxy.
Yes, I did have a look at www.soaplite.com
And yes, the example from the guide is working (hibye.pl)
 
A

axel

Why do I get for answer: "please, enter a proper IP" ?????
Here below the code I am using.
After a few hours I found that the line "on_action....." is needed for
interoperability with .net.
But even so it still does not work.
#!/usr/bin/perl -w
use SOAP::Lite +trace => 'all';
$response = SOAP::Lite
-> uri("http://www.webservicex.net")
-> on_action( sub { join '/', 'http://www.webservicex.net', $_[1] } )
-> proxy("http://www.webservicex.net/geoipservice.asmx")
-> GetGeoIP('192.25.206.10') . "\n";
die "Fault: ".$response->faultcode." ".$response->faultdetail."
".$response->faultstring if $response->faultcode;
print $response->result;
### NOT OK

my $repsonse = SOAP::Lite
-> uri("http://www.webservicex.net")
-> on_action( sub { join '/', 'http://www.webservicex.net', GetGeoIP } )
-> proxy("http://www.webservicex.net/geoipservice.asmx")
-> namespace('soap')
-> GetGeoIP(SOAP::Data->name('IPAddress' => '195.188.53.175'));

Gives a request nearer to that which is required (according to the
the documentation on the site), but does *not* work.

I wanted to test this out more by sending direct requests to
the server, but ran into a bizarre problem which I'll post
on another thread.

Axel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top