Perl Soap 500 Internal Server Error
Contents |
CoolUsesForPerl PerlNews Q&A Tutorials Poetry RecentThreads NewestNodes Donate What'sNew on Sep 17, 2009 at 23:26UTC ( #795994=perlquestion: print w/replies, xml )
Cgi Script Internal Server Error
Need Help?? nedals has asked for the wisdom of internal server error cgi python the Perl Monks concerning the following question: This should be really simple but it's
Python Cgi 500 Internal Server Error
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() internal server error cgi-bin apache -> result; exit; [download] ... 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 perl internal server error -w "goodbye, cruel world"; } 1; exit; [download] 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; [download] 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/); [download] 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. Comment on SOAP::Lite returning 500 errorSelect or Download Code Replies are listed 'Best First'. Re: SOAP::Lite returning 500 error by Anonymous Monk on Sep 18, 2009 at 00:43UTC turn on debugging [reply] Re^2: SOAP::Lite re
run
Cgi Internal Server Error
the perl code below Someone can give me information premature end of script headers perl about the error message and how to solve it Thanks a lot ------------------------------Server
Apache Enable Cgi
side:linux OS World.pm(mode 755) Package World; sub new { bless {}, shift; }; sub HelloWorld { my ($self) = @_; return "Hello World\n"; http://www.perlmonks.org/?node_id=795994 }; sub GoodByeWorld { my ($self,$adjective) = @_; return "Goodbye $adjective World\n"; } 1; ------------------------------Server side:linux OS world.pl(mode 755) #!/usr/bin/perl use SOAP::Transport::HTTP; use World; SOAP::Transport::HTTP::CGI -> dispatch_to('World') -> handle; ------------------------------client side:winXP OS world.pl(ActivePerl) use SOAP::Lite +trace => all; my $s = SOAP::Lite ->uri('World') ->proxy('http://mail.banciao.gov.tw/cgi-bin/pl/world.pl') ->HelloWorld(); print http://www.thecodingforums.com/threads/soap-lite-example-meets-http-server-500-error.896462/ $s->result(); -----------------------------client side: run result D:\>perl world.pl SOAP::Transport::new: () SOAP::Serializer::new: () SOAP:eserializer::new: () SOAP:arser::new: () SOAP::Lite::new: () SOAP::Transport::HTTP::Client::new: () SOAP::Lite::call: () SOAP::Serializer::envelope: () SOAP::Serializer::envelope: HelloWorld SOAP:ata::new: () SOAP:ata::new: () SOAP:ata::new: () SOAP:ata::new: () SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x1b9a994) SOAP::Transport::HTTP::Client::send_receive: POST http://mail.banciao.gov.tw/cgi -bin/pl/world.pl Accept: text/xml Accept: multipart/* Content-Length: 435 Content-Type: text/xml; charset=utf-8 SOAPAction: "World#HelloWorld"
here for a quick overview of the site Help Center Detailed answers to any http://stackoverflow.com/questions/5656983/soaptransporthttpclientsend-receive-http-1-1-500-internal-server-error questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about https://bugs.debian.org/403311 hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack internal server Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error up vote 0 down vote favorite I tried to connect server (I implemented the client side) using SOAP::Lite module during my debug, I internal server error encounter with error of SOAP version which solved by: -> soapversion('1.2') -> envprefix('soap12'); Now, I have issue that I got below error: SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error and then is also write after: The security context token is expired or is not valid. The message was not processed Is there any connection between both? My code is: my $soap = SOAP::Lite -> uri('$uri_address') -> on_action( sub { join '/', '$uri_address', $_[1] } ) -> proxy('$url_address') -> soapversion('1.2') -> envprefix('soap12'); - Overriding the constant $SOAP::Constants::DEFAULT_HTTP_CONTENT_TYPE = 'application/soap+xml'; my $method = SOAP::Data->name('HelloWorld') ->attr({xmlns => '$uri_address'}); The parameters are held in @params my @params = ( SOAP::Data->name(MyData => $my_string)); my $result = $soap ->call($method => @params); if ($result->fault) { print "\n\n==========fault happened===========\n\n"; print $result->faultstring; } else { print $result->result; } It printed the envelope and then it prints: SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x3749874) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error Date: Wed, 13 Apr 2011 23:36:26 GMT Server: Microsoft-IIS/7.5 Conten
is src:debbugs. Reported by: "Amos Shapira"