You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Brian Neate <bn...@alarmpoint.com> on 2007/07/17 23:26:27 UTC
Incorrect handling of boolean elements on POJO web service
Hey guys,
I'm trying to use axis2 1.1.1 to expose a POJO as a webservice. I'm
having a problem though because it seems that ADB doesn't support
boolean elements with a value of 1. Any time you try to submit a
request with 1 for a boolean element (which should resolve to true) you
get false for that argument in the java class. I think I have tracked
the problem down to the SimpleTypeMapper class and the following lines
of code at line 98:
else if (name.equals(W_BOOLEAN)) {
return Boolean.valueOf(text);
What I was wondering is: Is there any simple way to override this
behaviour so that a boolean element with a value of 1 will be intepreted
as true? And am I on the right track with what needs to be fixed?
Thanks,
Brian
RE: Incorrect handling of boolean elements on POJO web service
Posted by Brian Neate <bn...@alarmpoint.com>.
Thanks that answers my question perfectly.
Brian
-----Original Message-----
From: Deepal Jayasinghe [mailto:deepal@opensource.lk]
Sent: Tuesday, July 17, 2007 10:41 PM
To: axis-user@ws.apache.org
Subject: Re: Incorrect handling of boolean elements on POJO web service
Hi Brian ,
The issues is fixed in Axis2 1.3 release and we have done a 1.3 RC1 [1]
please try it and see.
Thanks
Deepal
[1] : http://people.apache.org/~deepal/axis2/1.3-RC1/
> Hey guys,
>
> I'm trying to use axis2 1.1.1 to expose a POJO as a webservice. I'm
> having a problem though because it seems that ADB doesn't support
> boolean elements with a value of 1. Any time you try to submit a
> request with 1 for a boolean element (which should resolve to true)
> you get false for that argument in the java class. I think I have
> tracked the problem down to the SimpleTypeMapper class and the
> following lines of code at line 98:
>
> else if (name.equals(W_BOOLEAN)) {
> return Boolean.valueOf(text);
>
> What I was wondering is: Is there any simple way to override this
> behaviour so that a boolean element with a value of 1 will be
> intepreted as true? And am I on the right track with what needs to be
> fixed?
>
> Thanks,
> Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Incorrect handling of boolean elements on POJO web service
Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Brian ,
The issues is fixed in Axis2 1.3 release and we have done a 1.3 RC1 [1]
please try it and see.
Thanks
Deepal
[1] : http://people.apache.org/~deepal/axis2/1.3-RC1/
> Hey guys,
>
> I'm trying to use axis2 1.1.1 to expose a POJO as a webservice. I'm
> having a problem though because it seems that ADB doesn't support
> boolean elements with a value of 1. Any time you try to submit a
> request with 1 for a boolean element (which should resolve to true)
> you get false for that argument in the java class. I think I have
> tracked the problem down to the SimpleTypeMapper class and the
> following lines of code at line 98:
>
> else if (name.equals(W_BOOLEAN)) {
> return Boolean.valueOf(text);
>
> What I was wondering is: Is there any simple way to override this
> behaviour so that a boolean element with a value of 1 will be
> intepreted as true? And am I on the right track with what needs to be
> fixed?
>
> Thanks,
> Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org