[Xml-compile] Is XML::Compile the right tool for writing a SOAP server?

Petar Shangov pshangov at yahoo.com
Sat Mar 21 15:57:44 GMT 2009


Hi,

The schema is relatively complex, but it is under my control so I can make (minor) modifications where necessary. XML::Compile will be perfect for generating the necessary objects since I have already used it to work with similar data before. 

I spent some time yesterday studying the examples and testing XML::Compile::SOAP::Daemon. I got stuck at one point where XML::C:S was looking for an 'element' in my wsdl message definition where I had a 'type' instead (I am writing from home now and I do not have the code in front of me so I cannot be more specific ...) Does XML::C:S have a specific preference for document-style soap or does it tolerate rpc as well (my current wsdl is based on the older wsdl for the SOAP-Lite based service so it is rpc-literal)?

My second question appears to be about mod_perl support too. The application I am working on has both a web-based user interface and a soap interface for the main functions so that it can be used by other clients as well. The reason I need mod_perl is that everything needs to be packaged and deployed as a single mod_perl based application, so both the soap and the web interface have to use the same apache instance. Furthermore, this is a milti-user application and I do not know how well Net::Daemon can scale for multiple users compared to apache.

Anyway, at the end of the day I decided to try to use SOAP::Lite for the soap layer, and have XML::C handle only the serialization of perl data to XML. SOAP::Lite's SOAP::Data seems suitable only for very simple data structures, but fortunately it can accept raw xml as well. 

There is also SOAP::WSDL, which I have yet to look at.

Regards,

Petar



----- Original Message ----
> From: Mark Overmeer <solutions at overmeer.net>
> To: Petar Shangov <pshangov at yahoo.com>
> Sent: Friday, 20 March, 2009 16:49:25
> Subject: Re: [Xml-compile] Is XML::Compile the right tool for writing a SOAP server?
> 
> * Petar Shangov (pshangov at yahoo.com) [090320 14:25]:
> > I have a SOAP::Lite-based server which currently exposes functions whose
> > input and output types are only strings or arrays of strings. A new
> > version of the application however will require the exchange of rather
> > complex nested objects.
> 
> XML::Compile can handle all complex features of XML schema's cleanly,
> although in some cases, the structure you have to create is not as
> straight-forward as you had hoped for.  Have a look at template() to
> produce examples of those.
> 
> > I have been looking at the documentation of XML::Compile::SOAP::Server
> > but I still cannot figure out if it is the right tool for me - should
> > I be using it in conjunction with SOAP::Lite or should I use it on its
> > own to implement the server?
> 
> The ::Server should be very easy to use (see the example which are
> contained in the distribution) although as above: if you have very
> nasty schema's (optional list of abstract substitutionGroups and
> such), you may need so time to puzzle-out the right nested Perl
> structure. (don't forget to enable debugging ;-)
> -- 
> 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