Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #3456 serialized array of soap_vals does not include namespace
Submitted: 2005-02-14 02:48 UTC
From: commanderjason at gmail dot com Assigned: chagenbu
Status: Closed Package: SOAP
PHP Version: 4.3.10 OS: win2000
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 43 + 42 = ?

 [2005-02-14 02:48 UTC] commanderjason at gmail dot com
Description: ------------ I have a complex soap_val, one of the members of this soap_val is an array of other complex soap_val types. The XML describing the complex types within the array does not properly define the namespace for the nested complex type. Simple library change below fixes the problem Base.php line: near 475 change: $xmlout_value .= $array_val->serialize($this); to: $xmlout_value .= $this->_serializeValue($array_val, $array_val->name, $array_type, $array_type_ns); Reproduce code: --------------- for($i=0; $i<2; $i++) { $Option = array("OptionId" => $i, "Name" => "Option Nizzame"); $NewOp = new SOAP_Value('ProductOption', '{}ProductOption', $Option); $ProductOptions[] = $NewOp; } $CartItem = array('ProductCode' => $_REQUEST["ProductCode"], 'Quantity' => 1, 'SelectedProductOptions' => $ProductOptions); $ProxyClass->MyFunction($CartItem); Expected result: ---------------- xml = <SOAP-ENV:Body> <ns4:Order_CreateItem> <ns4:OrderId>qOxuq6fmoMhvjLhkDtBOKg==</ns4:OrderId> <ns4:Item> <ns4:ProductCode>ts1</ns4:ProductCode> <ns4:Quantity>1</ns4:Quantity> <ns4:SelectedProductOptions> <ns4:ProductOption> <OptionId>0</OptionId> <Name>Option Nizzame</ns4:Name> </ns4:ProductOption> <ns4:ProductOption> <OptionId>1</OptionId> <Name>Option Nizzame</ns4:Name> </ns4:ProductOption> </ns4:SelectedProductOptions></ns4:Item> <ns4:AccessId>1U98PggfAevXQUiqVY0kFA==</ns4:AccessId></ns4:Order_CreateItem> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Actual result: -------------- xml = <SOAP-ENV:Body> <ns4:Order_CreateItem> <ns4:OrderId>qOxuq6fmoMhvjLhkDtBOKg==</ns4:OrderId> <ns4:Item> <ns4:ProductCode>ts1</ns4:ProductCode> <ns4:Quantity>1</ns4:Quantity> <ns4:SelectedProductOptions> <ProductOption> <OptionId>0</OptionId> <Name>Option Nizzame</ns4:Name> </ProductOption> <ProductOption> <OptionId>1</OptionId> <Name>Option Nizzame</ns4:Name> </ProductOption> </ns4:SelectedProductOptions></ns4:Item> <ns4:AccessId>1U98PggfAevXQUiqVY0kFA==</ns4:AccessId></ns4:Order_CreateItem> </SOAP-ENV:Body> </SOAP-ENV:Envelope>


 [2005-03-15 16:11 UTC] chagenbu
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.