Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

SOAP::Lite returning 500 error

by nedals (Deacon)
on Sep 17, 2009 at 23:26 UTC ( #795994=perlquestion: print w/replies, xml ) Need Help??
nedals has asked for the wisdom of the Perl Monks concerning the following question:

This should be really simple but it's not working for me. From my DOS window I can run....
## soapclient.pl ## use SOAP::Lite; print SOAP::Lite -> uri('http://www.soaplite.com/Demo') -> proxy('http://services.soaplite.com/hibye.cgi') -> hi() -> result; exit;
... and I get the expected result. However, if I put the 'same' SOAP server script on my server.
## soapserver.cgi ## #!/usr/bin/perl 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"; } 1; exit;
and run....
## soapclient.pl ## use SOAP::Lite; print SOAP::Lite -> uri('http://www.anything.com/Demo') -> proxy('http://dev.domain.com/cgi-bin/soapserver.cgi') -> hi() -> result; exit;
I get a '500 Internal ServerError at soapclient.pl line 2'
I do not have access to the logs (don't ask), so I added
use CGI::Carp(qw/warningsToBrowser fatalsToBrowser/);
to my .cgi script and got this error..
Unexpected Content-Type 'text/html; charset=ISO-8859-1' returned.

The problem is possibly with the uri. I just don't understand how it's constructed.
My reading tells me it can be almost anything followed by a package name where the package path is relative to the proxy script.

Replies are listed 'Best First'.
Re: SOAP::Lite returning 500 error
by Anonymous Monk on Sep 18, 2009 at 00:43 UTC
    turn on debugging
      require SOAP::Lite; SOAP::Lite::import(+trace => 'debug');
Re: SOAP::Lite returning 500 error
by snoopy (Deacon) on Sep 18, 2009 at 00:59 UTC
    I think you want may the call method on the client:
    print SOAP::Lite -> uri('http://www.anything.com/Demo') -> proxy('http://dev.domain.com/cgi-bin/soapserver.cgi') -> call('hi') -> result;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://795994]
Approved by broomduster
help
Chatterbox?
[Corion]: ... coworkers have. But I guess I've gone more mellow since I get to relax more, and such stuff doesn't make me as angry as it used to.
[Corion]: $boss will still get to listen to my interpretation :-D
[Eily]: hey, I'm just behind Larry in SioB \o/
[Corion]: Eily: Wheee ;)
[Eily]: I'll add that to my résumé

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2018-01-22 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (233 votes). Check out past polls.

    Notices?