[Xml-compile] Help with compiling serializers and de-serializers
Mark Overmeer
mark at overmeer.net
Wed May 25 06:40:45 GMT 2011
* Bill Moseley (moseley at hank.org) [110525 00:57]:
> I took your suggestion and used the approach used in XML::Compile::Daemon.
> Thanks very much for the help. It was easier to start fresh than work
> backwards from the Catalyst::Controller::SOAP code.
Great. Is it code to share?
> I essentially build handler callback subs that call out to methods in a
> Catalyst controller (e.g. sub createPerson {} ). In my callback sub I wrap
> the call out to the Catalyst controller method in an eval and on an
> exception I return { Fault => { ... } } hash. This results in a nice SOAP
> fault response -- well a nice generic server error message.
You can change all components of the fault produced, so not only the
generic default
> My question is if I have a fault condition *before* I call the handler code
> is there an existing method that will create a fault document? For example,
> if an invalid SOAPHeader is provided, I can't parse the XML, or the request
> method is not a POST. Is there a method to build the SOAP fault response?
All problem situations before the handler is called are handled
automatically.
>
> XML::Compile::SOAP::Daemon has a few methods at the bottom that just return
> non-200 HTTP status codes and a text message, it seems.
There is no way to pass a document back. Both sides are considered to
speak XML with each other. If one failes, there is no person looking
at documents, is there? Or do you mean something else (please example)
--
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