You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Nadir Amra <am...@us.ibm.com> on 2007/01/25 07:59:39 UTC
Axis C++: Looking for some guidance - what to do on parser errors?
I have been frustrated somewhat in debugging problems relating to SOAP
deserialization/parsing. It seems that the deserializer ignores parsing
errors by simply returning AXIS_FAIL or NULL or empty array. To me this
hides the underlying problem, be it in the AXIS C/C++ code or in the SOAP
response itself.
In anycase, I was wondering whether there would be anything wrong with
throwing exceptions when:
-- the parser is in error status
-- there is no more data to parse and deserializer asks for more data
-- skipping an end element when it is not an end element
I think that will help in debugging problems and is more reasonable that
for a client application to wonder why an array is not filled with the
SOAP response or why a field is set to NULL.
Any comments would be helpful. I am inclined to go ahead and throw
exceptions on these conditions, unless there is some sort of logical
reason why we should not. At the very least if the parser is in error
status, no reason to continue.
Nadir K. Amra
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
Re: Axis C++: Looking for some guidance - what to do on parser errors?
Posted by Adrian Dick <ad...@uk.ibm.com>.
Nadir,
I would agree that receiving an exception would make more sense than simply
NULL, when a genuine parsing error has occured.
Obviously, need to be careful that this isn't triggered by optional
elements being omitted, and the like.
Regards,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)
Nadir Amra <am...@us.ibm.com> wrote on 25/01/2007 06:59:39:
> I have been frustrated somewhat in debugging problems relating to SOAP
> deserialization/parsing. It seems that the deserializer ignores parsing
> errors by simply returning AXIS_FAIL or NULL or empty array. To me this
> hides the underlying problem, be it in the AXIS C/C++ code or in the SOAP
> response itself.
>
> In anycase, I was wondering whether there would be anything wrong with
> throwing exceptions when:
>
> -- the parser is in error status
> -- there is no more data to parse and deserializer asks for more data
> -- skipping an end element when it is not an end element
>
> I think that will help in debugging problems and is more reasonable that
> for a client application to wonder why an array is not filled with the
> SOAP response or why a field is set to NULL.
>
> Any comments would be helpful. I am inclined to go ahead and throw
> exceptions on these conditions, unless there is some sort of logical
> reason why we should not. At the very least if the parser is in error
> status, no reason to continue.
>
>
>
> Nadir K. Amra
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org