Click here to get back home

XML-RPC over HTTP with SSL

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
XML-RPC over HTTP with SSL Daniel Lieberman 01-17-2005
Posted by Daniel Lieberman on January 17, 2005, 10:08 pm
Please log in for more thread options
I'd like to run an XML-RPC HTTP server using SSL, without involving a
separate web server.

SOAP-Lite's XMLRPC::Transport::HTTP supports integration with
HTTP::Daemon to create a free-standing HTTP server (just requiring the
addition of forking or similar). But since
XMLRPC::Transport::HTTP::Daemon calls HTTP::Daemon->new directly, there
doesn't appear to be a way to get it to use HTTP::Daemon::SSL.

One relatively easy solution is to modify the existing SOAP-Lite
modules to do what I need. This could be done relatively cleanly: I
could create modified versions of XMLRPC::Transport::HTTP and
SOAP::Transport::HTTP (from which most of XMLRPC::Transport::HTTP is
inherited) and create the packages XMLRPC::Transport::HTTP::Daemon::SSL
and SOAP::Transport::HTTP::Daemon::SSL.
XMLRPC::Transport::HTTP::Daemon::SSL would inherit from
SOAP::Transport::HTTP::Daemon::SSL (instead of from
SOAP::Transport::HTTP::Daemon) and SOAP::Transport::HTTP::Daemon::SSL
would call HTTP::Daemon::SSL->new instead of HTTP::Daemon (and the
associated require would change as well).

If this is the best way that's fine, but if there's a good way to do
this using existing packages I'd rather do that. Is there?
Thanks in advance,
-Daniel

Daniel Lieberman
http://www.bitpusher.com/



Posted by Daniel Lieberman on January 18, 2005, 11:51 am
Please log in for more thread options
I ended up going with an approach that's slightly more complex, but
slightly less hackish. I've created packages (with new names) that
started as cut-and-paste copies of XMLRPC::Transport::HTTP::Daemon and
SOAP::Transport::HTTP::Daemon (where my package based on
SOAP::Transport::HTTP::Daemon still inherits from
SOAP::Transport::HTTP::Server) which add support for an argument hash.
Currently, the only parameter supported is "SSL" (boolean). I've
implemented the appropriate branches to select between HTTP::Daemon and
HTTP::Daemon::SSL based on the value of the SSL parameter (in two
places: the "require" and the call to ->new).

I think that if this got folded back into SOAP-Lite it would be a clean
way to do it, but stylistically it would be out of place (stylistically
adding the ...::Daemon::SSL would be a better match, though the number
of packages is starting to get a bit large).
-Daniel

Daniel Lieberman
http://www.bitpusher.com



Similar ThreadsPosted
Using HTTP::Proxy September 23, 2004, 5:41 am
HTTP::ProxySelector March 17, 2006, 9:51 am
HTTP::Proxy and not using 127.0.0.1 May 11, 2006, 6:10 pm
HTTP::TreeBuilder problems July 29, 2004, 12:19 am
HTTP::Cache module September 26, 2004, 8:37 am
http request headers October 1, 2004, 12:47 pm
http headers with CGI.pm and mod_perl (bug?) November 10, 2004, 10:19 pm
HTTP 1.1 Support in LWP / ParallelUA February 11, 2006, 2:20 pm
Help regarding HTTP::Request:POST February 24, 2006, 11:31 pm
Combining HTTP:Daemon and CGI May 27, 2006, 5:07 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap