[Xml-compile] WSDL request and response structure

Mark Overmeer mark at overmeer.net
Wed Mar 9 20:38:52 GMT 2011


* Bill Moseley (moseley at hank.org) [110309 14:47]:
> I now need to understand the logging aspect to make sure it fits in
> with how my Catalyst app logs (which uses log4perl).

Logging works via a dispatcher.  Log::Report understands many kinds of
dispatchers even a proxy to log4perl.

Add to your script something like

 dispatcher Log::Log4perl => 'logger', accept => 'NOTICE-'
   , config => "$ENV{HOME}/.log.conf";
 dispatcher close => 'default';

See man Log::Report::Dispatcher::Log4perl

> What I'm wondering is do I have to create copies of these WSDL files specific
> to my service, trim out the bindings (and portTypes?) that I don't use and
> update the service address location (URL) and the soapAction URLs to point to
> my specific implementation?

This is a very valid wish, but much harder than you wish for. By far the
heaviest are the schema's. It is common for the data structures to be
quite large and complex. To achieve this by hand is not easy.

I have plans to add this feature to XML::Rewrite, but did not start
with it for that code. However, I do have a partial implementation
in an other project... a module which uses XML::Compile to translate
schemas into perl modules, not code refs. But it is complex and far
from ready.

> I also use the same code for similar services (with different domain
> names), so I think it would be helpful if I could use the provided
> WSDL files as-is and somehow filter them on-the-fly to change the URLs
> and filter out what methods I actually support.

The URLs are usually incorrect anyway. So, all applications will have
an option to overrule those values.

> Also, is there a standard way to announce the location of (and a
> standard place to put) the WSDL file for users of our API to find?

That's where UDDI is designed for.

> And to be honest, I'm not sure I quite get SOAP yet.

To help you understand SOAP (1.1): its a sloppy description of what
some people had built. It's not designed, has many weird angles you
do not want to know of... but simple enough to work in most cases.

> For example, the createPerson method mentioned above does not
> have required input fields according to the WDSL file, so I still
> have to validate.  And I'm not quite sure how to return detailed
> fault data about, say, an invalid email address.

People can also produce fortran-like structures in SOAP/XML.  The
fact that things are using SOAP or XML is no guarantee for qualitee.
-- 
               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