boolean\n"" /> boolean\n"" /> boolean\n""/>

send bool value in soap body as a parameter

1k Views Asked by At

How to send a bool value in soap body in such a way that it should print as false and true rather than 0 or 1 ?

"<AllDayEvent>boolean</AllDayEvent>\n"

i want the body to print as :

"<AllDayEvent>false</AllDayEvent>\n"

Thanks & Regards

2

There are 2 best solutions below

0
Volodymyr Strontsitskyi On

Boolean lexical forms "1" and "true", "0" and "false" are interchangeable. From the Soap spec:

An instance of a datatype that is defined as boolean:

<xsd:element name="AllDayEvent" type="xsd:boolean"/>

can have the following legal literals {true, false, 1, 0}.

And the canonical representation for boolean is the set of literals {true, false}.

0
Khushal iOS On

just create BOOL variable like

BOOL isAllDayEvent;
isAllDayEvent=true;
<AllDayEvent>isAllDayEvent</AllDayEvent>

try this