Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

troubles writing mod_soap clients

by jeffa (Bishop)
on Aug 16, 2001 at 20:49 UTC ( #105439=perlquestion: print w/replies, xml ) Need Help??
jeffa has asked for the wisdom of the Perl Monks concerning the following question:

I am working with mod_soap and can't seem to find out how to get my client to communicate. The docs explain how to configure Apache, but do not specify any examples of how the client accesses a 'SOAPed' module.

Here is my http.conf info:

<Location /mod_soap> SetHandler perl-script PerlHandler Apache::SOAP PerlSetVar dispatch_to "/usr/local/apache/lib/soap" </Location>
Here is the module i am trying to access (/usr/local/apache/lib/soap/
package Demo; sub foo { return "foo\n" } sub bar { return "bar\n" } 1;
And finally, the client:
use strict; use SOAP::Lite; my $soap = SOAP::Lite ->uri('http://localhost/Demo') ->proxy('http://localhost/mod_soap/') ; print $soap->foo()->result();
When i run the client (webserver is active), i get the following error:
500 unexpected EOF before status line seen
And this line is reported in the web server error log:
[notice] child pid 18225 exit signal Segmentation fault (11)
Any help is greatly apprectiated - it might be time for me to break out the packet sniffer . . . .


    A flute with no holes is not a flute . . .
a doughnut with no holes is a danish.
                                - Basho,
                                  famous philosopher

Replies are listed 'Best First'.
(jeffa) Re: troubles writing mod_soap clients
by jeffa (Bishop) on Aug 22, 2001 at 21:49 UTC
    Found the problem!

    First off, thanks to chromatic for the tip - turns out that my build of Apache was not linked with expat.

    RedHat7.0 includes an rpm of expat-1.95, i erased it and built expat from source. Then i rebuilt Apache and mod_perl and mod_soap is now a happy camper!

    Update: Aug 28, 2001
    I broke it again!!! Looks like XML::Parser was using my expat rpm, so i reinstalled XML::Parser and sometime later i noticed that mod_soap was broken again.

    This time maverick came to my rescue and showed me Apache ToolBox.

    During install, ToolBox gives you an opportunity to configure the Apache installation config file - i added this line:

    --disable-rule=expat \
    which (roughly) tells Apache not to use expat-lite (which is used by default).


      Thanks for the follow-up on this jeffa - I just ran into this one myself and your post was quite instrumental in helping me solve my own dilemma. I did come across one additional issue which may be of interest to others with regard to the specification of service dispatch within the configuration in the httpd.conf file.

      Where the service dispatch is specified in a dynamic manner, @INC is disabled and as such modules outside of the service dispatch location are unavailable to the script. As a result, I found that the following mixed pattern for service dispatch specification was more flexible with regard to permitting access to both service location and core/installed modules.

      # Dynamic service dispatch specification <Location /trusted_delivery> SetHandler perl-script PerlHandler Apache::SOAP PerlSetVar dispatch_to "/usr/local/soap-app" </Location> # Mixed service dispatch specification <Location /trusted_delivery> SetHandler perl-script PerlHandler Apache::SOAP PerlSetVar dispatch_to "/usr/local/soap-app, MyApp" </Location>

      Besides this obvious advantage of access to core and installed modules with mixed service dispatch specification, this approach also allows you to limit what code within the service dispatch location is accessible from the SOAP interface.

      There was another really obscure error which I did also come across with regard to permission to access classes within the service dispatch location, but unfortunately, I haven't been able to replicate this to explain it's causation fully.


      perl -le 'print+unpack"N",pack"B32","00000000000000000000001001111101"'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://105439]
Approved by root
[Tux]: found and fixed. now waiting on feedback :)
[Tux]: I think I earned myself a nice dram

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2018-04-26 20:24 GMT
Find Nodes?
    Voting Booth?