Boring has asked for the wisdom of the Perl Monks concerning the following question:

i Monks,

I am new to SOAP.

I have set up 2 machines, 1 client(Ubuntu), 1 server(centos).

And try to test the SOAP by using SOAP::Lite:

Server:

#!perl -w use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> dispatch_to('Demo') -> handle; package Demo; sub hi { return "hello, world"; } sub bye { return "goodbye, cruel world"; }

Client:

#!perl -w use SOAP::Lite; print SOAP::Lite -> uri('http://www.mysite.com/Demo') -> proxy('http://www.mysite.com/hibye.cgi') -> hi() -> result;

However, when I run my client script 'testclient.pl', I get the following errors:

500 Can't read entity body: Connection reset by peer at ./testclient.pl line 3

Please help. Thanks.

Replies are listed 'Best First'.
Re: Need Help On SOAP::Lite
by Corion (Patriarch) on Oct 04, 2010 at 09:39 UTC

    What does the server script output when you request the URL using wget or curl or lwp-get or GET?

      If I use wget on "proxy('http://www.mysite.com/hibye.cgi')":

      wget 'http://www.mysite.com/hibye.cgi' Connecting to www.mysite.com... connected. HTTP request sent, awaiting response... 200 No headers, assuming HTTP/ +0.9 Length: unspecified 100%[====================================================>] 20 + --.--K/s 09:23:53 (699.52 KB/s) - Read error at byte 20 (Connection reset by pe +er).Retrying.

      Please help. Thanks
        09:23:53 (699.52 KB/s) - Read error at byte 20 (Connection reset by pe +er)

        There is an error in your server, your server configuration, or your network setup. Consult with your network administrator about whether the network is a problem. Debug what the server is sending - maybe it is an error message. Look into the (web)server error logs. Apply some elimination to find out what causes the problem.