Home » Web Services » SOAP » Bug #4063
Problem with Null Fields and Java
Details
| Submitted | 2005-04-05 14:45 UTC |
|---|---|
| From | phil_soap at smurfy dot de |
| Assigned | chagenbu |
| Status | Closed |
| Package | SOAP |
| PHP Version | 4.3.10 |
| OS | All |
| Roadmaps | (Not assigned) |
Comments
[2005-04-05 14:45 UTC] phil_soap at smurfy dot de
Description:
------------
There is a Problem when you must send a NULL object to a Tomcat 4 server.
it does not detect that is a NULL Object and reports a parse error.
i solved this by analysing the request send by php-soap client and a java soap client.
in line 556 (base.php) it check if obj is null
....
if (is_null($xmlout_value)) {
$xml = "\r\n<$xmlout_name$xmlout_type$xmlns$xmlout_arrayType$xml_attr/>";
} else {
....
the correct thing is:
....
if (is_null($xmlout_value)) {
$xml = "\r\n<$xmlout_name$xmlout_type$xmlns$xmlout_arrayType$xml_attr xsi:nil=\"true\"/>";
} else {
....
so the thing i changed is: xsi:nil=\"true\"
hope that helps someone else when he have the same problem ;)
smurfy