NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problem with boolean type


Joined: 03 Apr 2007
Posts: 1
Reply with quote
Hi all,

I have a similar problem to this one: http://bugs.php.net/bug.php?id=33753&edit=1.

My environment is the following:
- Web service server with access only through a WSDL
- PHP client using nusoap
- soap value sent from client to server is a complex type with int, string and boolean values

For ex.
function mySoapVal($name, $value) {
return new soapval($name, $name , $value, false , MY_NAMESPACE);
}
$param = array('searchCriteria' => array('crit1' => mySoapVal('crit1', true), 'crit2' => mySoapVal('crit2', 'a search string'), 'crit3' => mySoapVal('crit3', 1234));
$soapclient->call('searchThis', $param);

If the value for crit1 is true, everything is fine, the server gets a boolean true and gives data back.
If the value for crit1 is false, I get the following message: "soap:Server: Invalid boolean value: ".

Some tests:
- changing mySoapVal() so that I can give the type new soapval($name, $type, $value, false, MY_NAMESPACE), and setting $type to 'boolean' or 'xsd:boolean' gives me the following message from the server: "wsdl error: http://mymyserver:boolean (boolean) is not a supported type." or "[...]xsd:boolean (boolean) is not a supported type."
- with a local Java server, I can see that crit1=false on the PHP client side gives null on the server side

So my question is: how can I do on the PHP client side to transfer a boolean FALSE value to the server? (I have no access/control on the server.)
Thanks for your help.
View user's profileFind all posts by sevenoftuSend private message
Problem with boolean type
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic