[Xml-compile] handling decode errors in server responses
(XML::Compile::WSDL11)
Mark Blackman
m.blackman at fairfx.com
Fri Nov 25 22:21:29 GMT 2011
On 25 Nov 2011, at 21:44, Mark Overmeer wrote:
> * Mark Blackman (m.blackman at fairfx.com) [111125 16:55]:
>> So, I've upgraded to XML-Compile-SOAP-2.25 (from 2.08) and I'm
>> finding that decode errors are handled a bit differently, so I
>> wondered what the suggested handling should be now.
>
> Thanks a big jump... 2,5 years development.
> First answer, but I may need to study it a little further, after the
> weekend.
>
> If I remember correctly, decoding errors did not get handled, and
> therefore escaped into the user's program, were all other errors got
> flagged by an undefined answer and info in the trace. Consequently:
>
> my ($answer, $trace) = $call->($data);
> if(!$answer)
> { # find error in $trace
> die;
> }
>
> This cleaner handling was required, because one may wish to
> see the whole collected trace upon error. Without catching
> the decode errors, I cannot return the trace object.
Indeed, with 2.08, I had to resort to capturing the XML on the wire to
find the source of the decode error. So it sounds like one should
treat an undef $answer as an error condition for which the trace
object will provide elucidation.
>
> Hum, $answer not undef but an empty HASH?
Well, an empty hash ref. Anyway, thanks for the pointers!
- Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1723 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20111125/b027a253/smime.bin
More information about the Xml-compile
mailing list