[Xml-compile] handling decode errors in server responses (XML::Compile::WSDL11)

Mark Overmeer mark at overmeer.net
Fri Nov 25 21:44:05 GMT 2011


* 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.

Hum, $answer not undef but an empty HASH?
-- 
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