axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pétur Runólfsson <>
Subject RE: [Axis2] Improve error handling in BeanUtil (AXIS2-4398)
Date Mon, 22 Jun 2009 14:25:21 GMT


Pétur Runólfsson
From: Deepal Jayasinghe []
Sent: Monday, June 22, 2009 13:25
Subject: Re: [Axis2] Improve error handling in BeanUtil (AXIS2-4398)

Thank you very much for submitting the patch, but I would recommend you to create a JIRA and
attach the patch, I remember you send some more patchs sometimes ago, and not sure anyone
has applied them. So please create JIRA.


On Mon, Jun 22, 2009 at 9:08 AM, Pétur Runólfsson <<>>

This patch changes BeanUtil to give better error messages when the value found in a request
can't be converted to the expected type. The result is that instead of the cryptic 'For input
string: "xxx"', the error message is now 'Invalid value "xxx" for element yy'.

This error handling is done by wrapping calls to SimpleTypeMapper.getSimpleTypeObject with
a private method that catches NumberFormatException and throws an AxisFault instead. It might
be possible to make this change in SimpleTypeMapper instead, but that would require changing
the signature, since getSimpleTypeObject doesn't have a throws clause.

In order to set the correct fault code for the AxisFault, MessageContext.getCurrentMessageContext()
is called to get soap version information. It would be more convenient if it was possible
to specify the sender/receiver fault code on AxisFault in a version independent way.


Pétur Runólfsson

The content of this e-mail, together with any of its attachments, is for the exclusive and
confidential use of the named addressee(s) and it may contain legally privileged and confidential
information and/or copyrighted material. Any other distribution, use or reproduction without
the sender's prior consent is unauthorized and strictly prohibited. If you have by coincidence,
mistake or without specific authorization received this e-mail in error, please notify the
sender by e-mail immediately, uphold strict confidentiality and neither read, copy, transfer,
disseminate, disclose nor otherwise make use of its content in any way and delete the material
from your computer.

The content of the e-mail and its attachments is the liability of the individual sender, if
it does not relate to the affairs of Betware.
Betware does not assume any civil or criminal liability should the e-mail or it´s attachments
be virus infected.

View raw message