Subject: | Namespace set in server code is changed by apache in response |
Date: | Tue, 3 Dec 2013 14:30:08 -0500 |
To: | <bug-SOAP-Lite [...] rt.cpan.org> |
From: | "Richard Tomasso" <richard.tomasso [...] exfo.com> |
I have a SOAP service that uses different WSDL files to implement the
API, each with its own namespace. Working fine, but lately we are seeing
Responses that come back with the wrong namespace.
The code in the Handler module looks at the SOAPAction in the header and
parses that for the proper namespace. The last lines of the handler()
method are
$server->configure(@_);
$server->serializer->ns($ns, 'ourNS');
$server->SUPER::handler(@_);
@_ is an Apache2::RequestRec
If I run a typical session, first Request is an Auth, then a Utility
action and then some Provisioning action, based on those WSDLs. So the
namespaces returned should be our.server.com/auth, ourserver.com/util,
ourserver.com/prov. But when I run it with SOAPUI, I'm seeing
our.server.com/auth, ourserver.com/util, ourserver.com/auth in the
Response Headers.
The correct namespace is being sent to the ns() call. Doing some further
debugging, what I've narrowed it down to is the httpd process running.
Once ourNS gets set in that, it stays that way. In the problem example,
I checked the pid and when Requests gets handled by the same pid as the
first Auth, the Response ourNS is always our.server.com/auth. When the
first request handled by the second pid is the Util, all Responses
handled by that httpd process after that have an ourNS that is always
our.server.com/util. And so on.
It's not at all clear why the httpd process is doing something to
override what is explicitly set in the SOAP object. Is this some weird
side-effect of the problematic way SOAP::Lite handles namespaces to
begin with?