soap lite question.

Discussion in 'Perl Misc' started by carex@skynet.be, Oct 15, 2005.

  1. Guest

    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)
     
    , Oct 15, 2005
    #1
    1. Advertising

  2. Guest

    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
     
    , Oct 16, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Saqib Ali

    SOAP:Lite Limitations re: https??

    Saqib Ali, Sep 12, 2003, in forum: Perl
    Replies:
    1
    Views:
    3,052
    Serge Dubrouski
    Sep 16, 2003
  2. Blaine Everingham

    SOAP::Lite

    Blaine Everingham, Dec 9, 2003, in forum: Perl
    Replies:
    0
    Views:
    727
    Blaine Everingham
    Dec 9, 2003
  3. Aaron Brady

    SQL, lite lite lite

    Aaron Brady, Dec 29, 2008, in forum: Python
    Replies:
    15
    Views:
    773
    Aaron Brady
    Jan 1, 2009
  4. Henry

    Question about SOAP::Lite

    Henry, Jun 27, 2007, in forum: Perl Misc
    Replies:
    1
    Views:
    178
    Henry
    Jun 27, 2007
  5. droesler
    Replies:
    2
    Views:
    536
    droesler
    Aug 31, 2010
Loading...

Share This Page