Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   soap lite question. (http://www.velocityreviews.com/forums/t894714-soap-lite-question.html)

carex@skynet.be 10-15-2005 08:37 PM

soap lite question.
 
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)


axel@white-eagle.invalid.uk 10-16-2005 04:43 PM

Re: soap lite question.
 
carex@skynet.be wrote:
> 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.


> #!/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




All times are GMT. The time now is 08:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.