Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Problem with PerlTransHandler

by rob_au (Abbot)
on Jun 07, 2004 at 05:31 UTC ( #361882=perlquestion: print w/replies, xml ) Need Help??
rob_au has asked for the wisdom of the Perl Monks concerning the following question:

I have a fairly convoluted problem which appears to result from an interaction with a PerlTransHandler and SOAP::Lite.

The scenario is that I have a set of web servers, running Apache 1.3.29/mod_perl 1.29, serving a number of virtual host configurations for various service interfaces. One of these virtual host configurations (virtual host A) employs SOAP::Lite (specifically Apache::SOAP) to provide a SOAP interface to some web services which are currently under development. By itself, this configuration is behaving correctly and without issue.

Upon establishing a configuration for a new virtual host (virtual host B) which employs a PerlTransHandler for service redirection however, errors are returned when attempting to access the SOAP::Lite services on the existing virtual host (virtual host A). The errors returned from the SOAP::Lite interface are of the form "Failed to locate method (MySoapMethod) in class (MySoapClass) at /opt/lib/perl5/site_perl/5.6.2/SOAP/ line 2337". Removing the PerlTransHandler configuration from the new virtual host configuration (for virtual host B) rectifies this problem.

My question is how should I solve this conflict? Both of these virtual host services are required and cannot be omitted from the server configuration.

One thought which I had was to attempt to limit the scope of execution of the PerlTransHandler, but after doing a bit of research, I have found that the <Location> and <Directory> directives cannot be used to reduce the scope of PerlTransHandler execution (although I have not found any documentation as yet which correlates with my observation of PerlTransHandler execution across virtual hosts). Indeed, the recommended manner by by which to limit the application of PerlTransHandler is through the employ of location-specific attributes - For example:

PerlTransHandler MyTranshandler <Location ...> PerlSetVar SkipTransHandler 1 </Location> package MyTransHandler; sub handler { return DECLINED if $r->dir_config('SkipTransHandler'); ... }
This however, is something which I have already put in place into my PerlTransHandler package to no avail and as such am now searching for other suggestions as to how to address this issue.


perl -le "print unpack'N', pack'B32', '00000000000000000000001011100000'"

Replies are listed 'Best First'.
Re: Problem with PerlTransHandler
by rob_au (Abbot) on Jun 07, 2004 at 09:01 UTC
    As a follow-up to this, I would note that I have now got this working - The problem appeared to be related, not to the PerlTransHandler specification line, but rather the PerlModule line which would load in the perl module providing the PerlTransHandler handler. That is, uncommenting the first line in the virtual host configuration below (for virtual host B) results in the errors outlined above being returned through the SOAP::Lite interface (provided by virtual host A):
    # PerlModule TrustedDelivery::Redirect PerlTransHandler TrustedDelivery::Redirect PerlSetVar session_redirect /session.php PerlSetVar session_args _session=%s
    I am however at a loss to explain this observation - If there is interest, I am happy to post the source to the minimal TrustedDelivery::Redirect currently being employed for review and follow-up such that the underlying issue can be identified (and potentially corrected if this is an issue outside the scope of my module).


    perl -le "print unpack'N', pack'B32', '00000000000000000000001011100001'"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://361882]
Approved by cLive ;-)
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2017-02-20 08:59 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (294 votes). Check out past polls.