Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

SOAP::Lite Quickstart demo Use of uninitialized value in pattern match (m//)

by philosophia (Sexton)
on Jul 10, 2006 at 18:59 UTC ( [id://560201]=perlquestion: print w/replies, xml ) Need Help??

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

I'm trying to run the SOAP::Lite Quickstart demo at

http://guide.soaplite.com/#quick%20start%20guide%20with%20soap%20and%20soap::lit\ e

My hibye.pl looks like

#!/usr/bin/perl -w # -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; print SOAP::Lite -> uri('http://server.com/cgi-bin/soaplite/Demo') -> proxy('http://server.com/cgi-bin/soaplite/hibye.cgi') -> hi() -> result;



-I'm getting a 500 internal server error when I try to run the script. hibye.cgi has not been modified except the path to perl.

My machine is ubuntu dapper drake, with apache2 and SOAP::Lite installed. My apache2 error logs look like

#this gives me the following in my error log

[Fri Jul 07 16:15:39 2006] [error] [client 1.1.1.1] Use of uninitialized value in pattern match (m//) at /usr/local/share/perl/5.8.7/SOAP/Transport/HTTP.pm line 411. [Fri Jul 07 16:15:39 2006] [error] [client 1.1.1.1] Premature end of script headers: hibye.pl


I've tried googling that error, but couldn't find a way to fix it.

Any advice appreciated.

Replies are listed 'Best First'.
Re: SOAP::Lite Quickstart demo Use of uninitialized value in pattern match (m//)
by Joost (Canon) on Jul 10, 2006 at 19:11 UTC
      I get the same message in my apache2 error log when I try to run it from the command line
      perl hibye.pl
      [Mon Jul 10 14:15:11 2006] [error] [client 128.135.0.88] Use of uninit +ialized value in pattern match (m//) at /usr/local/share/perl/5.8.7/S +OAP/Transport/HTTP.pm line 411.
      The URL seems ok. the only thing I changed is the domain name.
Re: SOAP::Lite Quickstart demo Use of uninitialized value in pattern match (m//)
by duckyd (Hermit) on Jul 10, 2006 at 20:29 UTC
    You can turn on SOAP::Lite debugging using
    use SOAP::Lite +trace => [qw/ debug method fault /];
    which may help you track down the issue
      I'm getting the following output with debugging:

      perl hibye.pl SOAP::Serializer::envelope: hi SOAP::Transport::HTTP::Client::send_receive: POST http://tangerine.uch +icago.edu/cgi-bin/soaplite/hibye.cgi HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 448 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://tangerine.uchicago.edu/cgi-bin/soaplite/Demo#hi" <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xm +lsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema +" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmln +s:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><hi xml +ns="http://tangerine.uchicago.edu/cgi-bin/soaplite/Demo" xsi:nil="tru +e" /></soap:Body></soap:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Ser +ver Error Connection: close Date: Mon, 10 Jul 2006 20:45:10 GMT Server: Apache/2.0.55 (Ubuntu) PHP/4.4.2-1build1 mod_ssl/2.0.55 OpenSS +L/0.9.8a Content-Length: 557 Content-Type: text/xml; charset=utf-8 Client-Date: Mon, 10 Jul 2006 20:45:10 GMT Client-Peer: 128.135.0.88:80 Client-Response-Num: 1 SOAPServer: SOAP::Lite/Perl/0.68 <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xm +lsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema +" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmln +s:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:F +ault><faultcode>soap:Client</faultcode><faultstring>Failed to access +class (cgi-bin::soaplite::Demo) at /usr/local/share/perl/5.8.7/SOAP/L +ite.pm line 2463. </faultstring></soap:Fault></soap:Body></soap:Envelope> >

      does this mean my uri line is wrong? I'm not sure what would be the correct uri value.
        one other thing is that the quickstart files also contain a file called 'Demo.pm' - which is in the same directory

        package Demo; # -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul Kulch +enko -- sub hi { return "hello, world"; } sub bye { return "goodbye, cruel world"; } sub languages { return ("Perl", "C", "sh"); } 1;
        so if hibye.pl's uri parameter is looking for a .pm called 'Demo' in the soaplite directory, it is there.
Re: SOAP::Lite Quickstart demo Use of uninitialized value in pattern match (m//)
by Ieronim (Friar) on Jul 10, 2006 at 20:27 UTC
    Try to turn off warnings, i.e. remove the -w switch from the shebang line.

    Does the error Premature end of script headers: hibye.pl still appear in the log?

      yes I still receive the same message in the logs even when I remove -w

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://560201]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-19 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found