PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » SOAP » Bug #4063

Problem with Null Fields and Java

Details

Submitted2005-04-05 14:45 UTC
Fromphil_soap at smurfy dot de
Assignedchagenbu
StatusClosed
PackageSOAP
PHP Version4.3.10
OSAll
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