|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57185 createDocument is creating a weird doc when one property has a null value
Submitted: 2006-08-18 11:30 UTC Modified: 2006-11-27 06:14 UTC
From: Assigned: tuscany (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.1.4 OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2006-08-18 11:30 UTC]
As part of generating the body of our soap request we use the special three-argument form of createDocument that takes an exising SDO. This is misbehaving when the SDO that it is passed contains a null.

Reproduce code:

$xsd = <<<EOF
<xs:schema xmlns:xs="" 
  <xs:element name="getQuote">
        <xs:element name="ticker" type="xs:string" nillable="true"/>


$xmldas        = SDO_DAS_XML::create('bug.xsd');
$get_quote_sdo = $xmldas->createDataObject('http://ConvertedStockQuote','getQuote');
$get_quote_sdo ->ticker = 'IBM';
$xdoc2         = $xmldas->createDocument(null, 'getQuote', $get_quote_sdo);
$xmlstr        = $xmldas->saveString($xdoc2,2);
echo $xmlstr;

$get_quote_sdo = $xmldas->createDataObject('http://ConvertedStockQuote','getQuote');
$get_quote_sdo ->ticker = null;
$xdoc2         = $xmldas->createDocument(null, 'getQuote', $get_quote_sdo);
$xmlstr        = $xmldas->saveString($xdoc2,2);
echo $xmlstr;

Expected result:
In the result of the second echo I want to see a null ticker like this:

  <ticker xmlns="http://ConvertedStockQuote" xsi:nil="true"/>

Actual result:
What I actually see has getQuote where I expect to see ticker

<getQuote xmlns="http://ConvertedStockQuote" xsi:nil="true"/>

and what's more I have a getQuote embeddded in a getQUote. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-07 06:31 UTC]
I created for this
 [2006-10-17 12:23 UTC]
There's a Tuscany patch available at :

This should be rolled up in the next release.
 [2006-11-27 06:14 UTC]
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at

Release 1.1.0 includes this fix.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 03:03:12 2021 UTC