[Xml-compile] returning Fault response in
XML::Compile::SOAP::HTTPDaemon
Mark Overmeer
solutions at overmeer.net
Wed Apr 28 10:05:12 GMT 2010
* Miroslav Tynovsky (mtynovsky at mms.ag) [100428 09:48]:
> Mark Overmeer wrote:
>
> > return
> > +{ PolicyException =>
> > { faultcode => pack_type(SOAP11ENV, 'Server')
> > , faultstring => 'policy exception'
> > , detail =>
> > { messageId => $error_code
> > , text => $error_message
> > , variables => [ $error_code, $error_message, ]
> > }
> > }
> > };
> >
> >Please try.
>
> Works OK. Thank you very much!
> I wouldn't have figured it out... how did you know that the
> top-level key should be PolicyException and not Fault?
>From the manual page ;-)
There is a good reason for it. This structure follows the declaration
in the WSDL, not the structure of the message. So the "PolicyException"
which you see here is the *name* of the fault part in the WSDL, which
is confusingly the same as the name of the element within the detail
block which you expected to be there.
WSDL parts can be element- or type-style. This way, we can unify
both styles.
--
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