[Xml-compile] Adding HTTP header in SOAP response
Alex Bernier
alex.bernier at free.fr
Mon Dec 3 17:23:38 GMT 2012
On Mon, Dec 03, 2012 at 05:34:47PM +0100, Mark Overmeer wrote:
> * Alex Bernier (alex.bernier at free.fr) [121203 15:54]:
> > I plan to implement a SOAP server using XML::Compile::SOAP::Daemon. To
> > be compliant with the spec, the server should be able to send a cookie
> > embeeded it in the "Set-Cookie" HTTP response header.
>
> Never thought of that. SOAP has other session ideas in its spec, for
> instance via its own header. And in the daemon context, you have
> a "connection" with multiple request as 1 session. Anyway...
>
> > Is it possible to do so using XML::Compile::SOAP::* ? If yes, could
> > you please send me a link to the right place in the documentation or to
> > sample code ?
>
> Depends on your daemon. One of the LWP based?
>
> ::LWPutil::lwp_run_request has a postproc parameter which can be
> a code-ref, called just before the response is sent. It is set via
>
> ::Daemon::???->new(postprocess => \&post);
Thank you for your answer. I plan to use the PSGI daemon, because PSGI has the reputation to offer the best performances (am I correct ?).
>
> It depends on the backend which parameters are passed in. For LWP:
>
> sub post($$$$)
> { my ($request, $response, $rc, $ref_body) = @_;
> ... here you can modify the $response headers (I guess)
> }
Will it work the same with PSGI ?
Kind regards,
Alex
More information about the Xml-compile
mailing list