LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2019, 03:23 PM   #1
hartyshow
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Rep: Reputation: Disabled
Perl.cgi soap request HTTP ERROR 411


Hello! I'm trying to learn SoapUI, but when running the code below I'm getting HTTP ERROR 411
all files are in /var/www/html/ not sure what's the issue

Quote:
#!/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";
}
Linux: CentOS 6.8
Appache: Apache/2.2.15
Perl: v5.10.1

<Directory "/var/www/html/">
Order allow,deny
Allow from all
Options +ExecCGI
AddHandler cgi-script .cgi .pl
AllowOverride None
Options Indexes FollowSymLinks
</Directory>

any idea how to fix that?

Last edited by hartyshow; 08-01-2019 at 03:36 PM.
 
Old 08-01-2019, 04:45 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
411 Length Required
The request did not specify the length of its content, which is required by the requested resource

From CPAN re: SOAP::Transport::HTTP::CGI

Quote:
handler(SafeClassHash, OptionalDispatcher)

This is the only method on the class, and you must pass a hash reference whose keys contain the collection of classes that may be invoked at this endpoint....
So I'm guessing that the error is because you've not used the module correctly...but that's just a guess...

Last edited by scasey; 08-01-2019 at 05:38 PM.
 
Old 08-02-2019, 11:46 AM   #3
hartyshow
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
411 Length Required
The request did not specify the length of its content, which is required by the requested resource

From CPAN re: SOAP::Transport::HTTP::CGI



So I'm guessing that the error is because you've not used the module correctly...but that's just a guess...
thanks for the response but this is a very basic code in a file script.cgi and I call the file through the browser nothing fancy. like so Palmcity.net/script.cgi I'm not using SmartBear client
 
Old 08-02-2019, 01:04 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by hartyshow View Post
thanks for the response but this is a very basic code in a file script.cgi and I call the file through the browser nothing fancy. like so Palmcity.net/script.cgi I'm not using SmartBear client
Is that the code you posted in the quote tags in your OP?
If you use code tags instead, the code would be more readable.

That said, my answer is the same...you do not seem to be using the perl module as it is designed to be used.
CPAN is your friend. That's where the documentation for all perl modules resides.
 
Old 08-02-2019, 01:26 PM   #5
hartyshow
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Is that the code you posted in the quote tags in your OP?
If you use code tags instead, the code would be more readable.

That said, my answer is the same...you do not seem to be using the perl module as it is designed to be used.
CPAN is your friend. That's where the documentation for all perl modules resides.
Can you provide a little bit more detail, on what exactly you think I should change in my code? I'm very new at this, I will appreciate if I can have a clear guidance on what is the problem and how to fix it.
I tried to add these handler(SafeClassHash, OptionalDispatcher) it didn't work, I also added more modules, but the problem remains

Last edited by hartyshow; 08-02-2019 at 01:55 PM.
 
Old 08-02-2019, 01:56 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by hartyshow View Post
Can you provide a little bit more detail, on what exactly you think I should change in my code? I'm very new at this, I will appreciate if I can have a clear guidance on the what is the problem and how to fix it.
I tried to add these handler(SafeClassHash, OptionalDispatcher) it didn't work, I also added more modules, but the problem remains
Sorry, no. I've no interest in reading the documentation for/to you. And, besides, I don't know what you're trying to accomplish...what your goal is.

Again. CPAN. Contains excellent documentation and examples.
 
  


Reply

Tags
apache2, cgiperl, perl, soap



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php / SOAP - is it possible to return many values in a soap request? eantoranz Programming 1 04-25-2012 03:21 PM
soap WSDL generator? Thinking Programming 0 09-21-2005 04:21 AM
advx php soap support? schallig Mandriva 1 07-15-2005 01:15 AM
C++ SOAP API for HP-Unix deiussum Programming 1 09-17-2004 08:56 AM
Can't modify PATH globally for SOAP interaction... crazybio Linux - Newbie 2 12-03-2003 01:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration