[Xml-compile] XML::Compile::SOAP and PSGI

Mark Overmeer solutions at overmeer.net
Wed Jan 19 13:39:18 GMT 2011


* Chris Andrews (chris at nodnol.org) [110119 11:27]:
> There was some traffic here a few weeks ago about wrapping an
> XML::Compile::SOAP service up as a PSGI app. I needed to do this in
> the last few days, so I've started such a module:

I have not been sitting on my spot either... I have rewritten
XML::Compile::SOAP::*Daemon a bit and added code from Patrick Powell to
support CGI.pm   This has resulted in a 3.00 implementation which should
make your code even simpler.

In 3.00, the following modules have emerged:

   XML/Compile/SOAP/Daemon/LWPutil.pm
   XML/Compile/SOAP/Daemon/NetServer.pm
   XML/Compile/SOAP/Daemon/CGI.pm

The ::Daemon::NetServer is a rename of ::HTTPDaemon.  The "old"
HTTPDaemon was based on a Net::Server daemon implementation, not
on the HTTP::Daemon of LWP.  The parts of LWP which where used
got abstracted into LWPUtil which is also used by CGI. It should
suffice to base your implementation on ::Daemon.

You offer people a wsdl_file parameter. That's insufficient: many
WSDLs require additional XSDs, hooks etc.  So, at least there
should also be a way to pass in a prepared wsdl object.

On a few spots, I see that you dive into the HASH which contains
the data from the operation. DON'T DO THAT!  I will not guarantee
that these storage structures will stay the same. You break the OO
encapsulation. Please suggest additional methods for my ::Operation
object to collect the facts you need.

> I have a question - the name. Would XML::Compile::SOAP::PSGI be
> appropriate, or should it live elsewhere?

The whole XML::Compile suite uses

  . a standard way of documentation (OODoc) to get a homogeneous
    set of man-pages in POD and HTML
    http://perl.overmeer.net/xml-compile/html/manuals

  . a standard logging infrastructure using Log::Report (not eval)

  . a standard way of naming methods, f.i. soap_method() should be
    renamed into soapMethod()  The naming convensions of LibXML are
    used everywhere.

  . and a few minor nags.

All these differences could be solved if you simply donate your
implementation and let me maintain it (only applying bugfixes)
It is simple to do that rewrite.  I did the same for the CGI code.

However, you use the convensions of Plack (i presume). The code
is a Plack::Component. It seems more logical to take a name in
that namespace.

One other issue is that all my modules must strive for a 100% 
implementation. I think that you probably fulfill that requirement.
But an other module therefore has been released in the XML::CompileX
namespace.

I will send you my 3.00 module under development off-list. It is in
"raw", which means that the OODoc extension of POD is still merged
with the code. Not released, because it needs to be tested. Some docs,
tests and examples may still need to be adapted. If you have time,
you can help me with that (at least do some reallife tests)
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net



More information about the Xml-compile mailing list