You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Algirdas Veitas <ap...@yahoo.com> on 2001/08/02 02:34:06 UTC

boolean value interpretation by Apache SOAP

soap-user,

We have a scenario where a Apache SOAP Client is
talking to a non-Apache SOAP Server.  The server
replies with a boolean value 1, i.e. "true".  An
example of the response is shown below:

<SOAP-ENV:Body>
<xyzResponse>
<xyz xsi:type="xsd:boolean">1</xyz>
</xyzResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When the Apache SOAP Client receives this message, the
instance of the BooleanDeserializer class creates an
instance of a Boolean class like so:

new Boolean("1")

which in Java is interpreted as "false".

In this case, is Apache SOAP behaving properly?  We
have tried a GLUE client which "does the right thing"
(returns "true") . We also used the generic client
located at http://soapclient.com and it too "does the
right thing".  What are the valid values for boolean
in the SOAP specification?

Thanks,
  Al



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: boolean value interpretation by Apache SOAP

Posted by William Brogden <wb...@bga.com>.

Algirdas Veitas wrote:
> 
> soap-user,
> 
> We have a scenario where a Apache SOAP Client is
> talking to a non-Apache SOAP Server.  The server
> replies with a boolean value 1, i.e. "true".  An
> example of the response is shown below:
> 
> <SOAP-ENV:Body>
> <xyzResponse>
> <xyz xsi:type="xsd:boolean">1</xyz>
> </xyzResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> When the Apache SOAP Client receives this message, the
> instance of the BooleanDeserializer class creates an
> instance of a Boolean class like so:
> 
> new Boolean("1")
> 
> which in Java is interpreted as "false".
> 
> In this case, is Apache SOAP behaving properly?  We
> have tried a GLUE client which "does the right thing"
> (returns "true") . We also used the generic client
> located at http://soapclient.com and it too "does the
> right thing".  What are the valid values for boolean
> in the SOAP specification?
> 
> Thanks,
>   Al
> 

According to XML Schema 

3.2.2.1 Lexical representation
An instance of a datatype that is defined as ·boolean· can have the
following legal literals {true, false, 1, 0}. 

so is seems to me that Apache SOAP is wrong. Thats from:


http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/ 

-- 
WBB - wbrogden@lanw.com
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

Re: boolean value interpretation by Apache SOAP

Posted by William Brogden <wb...@bga.com>.

Algirdas Veitas wrote:
> 
> soap-user,
> 
> We have a scenario where a Apache SOAP Client is
> talking to a non-Apache SOAP Server.  The server
> replies with a boolean value 1, i.e. "true".  An
> example of the response is shown below:
> 
> <SOAP-ENV:Body>
> <xyzResponse>
> <xyz xsi:type="xsd:boolean">1</xyz>
> </xyzResponse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> When the Apache SOAP Client receives this message, the
> instance of the BooleanDeserializer class creates an
> instance of a Boolean class like so:
> 
> new Boolean("1")
> 
> which in Java is interpreted as "false".
> 
> In this case, is Apache SOAP behaving properly?  We
> have tried a GLUE client which "does the right thing"
> (returns "true") . We also used the generic client
> located at http://soapclient.com and it too "does the
> right thing".  What are the valid values for boolean
> in the SOAP specification?
> 
> Thanks,
>   Al
> 

According to XML Schema 

3.2.2.1 Lexical representation
An instance of a datatype that is defined as ·boolean· can have the
following legal literals {true, false, 1, 0}. 

so is seems to me that Apache SOAP is wrong. Thats from:


http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/ 

-- 
WBB - wbrogden@lanw.com
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2