in reply to Re^8: Soap::lite - https ?
in thread Soap::lite - https ?
Now, you don't want to be changing SOAP or SOAP::Lite for deployment, so the trick is to invert control;
instead of SOAP::Lite calling HTTP::Daemon, you create a one-shot HTTP::Request handler around SOAP::Lite, and have that handle the request passed to it by HTTP::Daemon::SSL.
So inside your pre-existing HTTP::Daemon::SSL loop...
(where you'd normally parse the HTTP request and construct some HTTP response)
... firstly, construct an HTTP::Request object:
create a one-off soap handler:
then feed the request object to the soap handler:
dispatch the request to your class via SOAP::Lite:
finally, pull out the response it built:
As I implied earlier in this thread, doing it this way gives you more control over the HTTP request life-cycle... which means you can serve more than just SOAP rpc's from the service.
As an example, you can inspect the request (say before constructing the HTTP::Request object) and determine (based on the URI) whether you want to respond as SOAP rpc, respond with WSDL describing the service, or even respond with HTML explaining how to use the service.
(In my webservice framework I do all those, plus JSONRPC and some dynamic web content.)
-David
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Soap::lite - https ?
by ethrbunny (Monk) on Aug 22, 2007 at 22:02 UTC | |
by perlchild (Acolyte) on Aug 12, 2008 at 23:38 UTC |