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)    
Subscription  
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:
MUST BE VALID
Solve the problem : 49 + 39 = ?

 
 [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', '{http://jlite.com/webservices/}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>

Comments

 [2005-03-15 16:11 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!