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

Bug #14065 Array Wrapped w/ Extra Tag
Submitted: 2008-06-04 04:16 UTC
From: rossking Assigned:
Status: Open Package: SOAP (version 0.11.0)
PHP Version: 5.2.1 OS: Linux lamp 2.6.20-16
Roadmaps: (Not assigned)    
Subscription  


 [2008-06-04 04:16 UTC] rossking (Ross King II)
Description: ------------ When I pass an Array to the SOAP WSDL Interface it takes each array item and wraps with the tag <item> and then it also wrap's with the array name and values as it should. how do I stop the <item> tags, These are causing my script to fail. Expected result: ---------------- <ns4:PublicationIDs> <ns4:int>2</ns4:int> <ns4:int>3</ns4:int> </ns4:PublicationIDs> Actual result: -------------- <ns4:PublicationIDs> <ns4:item> <ns4:int>2</ns4:int></ns4:item> <ns4:item> <ns4:int>3</ns4:int></ns4:item></ns4:PublicationIDs>

Comments

 [2008-07-12 17:47 UTC] doconnor (Daniel O'Connor)
Ross, any chance of a short test script?
 [2008-08-27 12:17 UTC] adamjimenez (Adam Jimenez)
i got the same problem: $wsdl = new SOAP_WSDL($wsdl_url); $client = $wsdl->getProxy(); $result = $client->somefunction($somearray);
 [2008-08-27 12:19 UTC] adamjimenez (Adam Jimenez)
 [2008-08-27 13:16 UTC] adamjimenez (Adam Jimenez)
I have a hack for this: edit SOAP/Base.php line 488: change this: $xmlout_value .= $this->_serializeValue($array_val, new QName('item', $this->_section5 ? null : $name->namespace), new QName($array_type), $options); to: $xmlout_value .= $this->_serializeValue($array_val, new QName('string', $this->_section5 ? null : $name->namespace), new QName($array_type), $options); where string is the desired name of your wrapping tag e.g. <string>array item</string>
 [2008-08-27 15:06 UTC] yunosh (Jan Schneider)
Did you try 0.12.0?
 [2008-08-27 15:56 UTC] adamjimenez (Adam Jimenez)
yes i'm on 0.12.0
 [2008-08-27 16:14 UTC] yunosh (Jan Schneider)
We are unable to reproduce the bug as reported. Please provide a simple script (10 lines or less) or a link to an external script that can be used to reproduce the bug. If you can provide the script, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR.
 [2008-08-27 17:53 UTC] adamjimenez (Adam Jimenez)
this is what i'm doing. obviously i've put in fake variables in place of confidential data: <? $username='username'; $password='******'; $originator='447000000000'; $message='test message'; $recipients=array(447111111111,447222222222); $wsdl_url = 'https://dmp.dynmark.com/webservices/messagingservicesws.asmx?WSDL'; $wsdl = new SOAP_WSDL($wsdl_url); $client = $wsdl->getProxy(); $result = $client->SendMessages($username,$password,$originator,$message $recipients); ?>
 [2008-08-27 17:55 UTC] adamjimenez (Adam Jimenez)
sorry last line should be (comma instead of space): $result = $client->SendMessages($username,$password,$originator,$message,$recipients);
 [2008-09-14 23:33 UTC] adamjimenez (Adam Jimenez)
feedback added
 [2008-10-13 11:53 UTC] adamjimenez (Adam Jimenez)
reopened
 [2008-10-13 11:54 UTC] adamjimenez (Adam Jimenez)
trying to reopen..
 [2008-12-04 14:39 UTC] adamjimenez (Adam Jimenez)
open sesame