From: fjortiz at comunet dot es
Operating system: Windows 2000 server
PHP version: 5.0.0RC1
PHP Bug Type: SOAP related
Bug description: complexType parameters not received by SOAP server
Description:
------------
Hi I'm trying to send a input parameter like this
/* client */
class Mail {
var $From;
var $arrTo; // array
var $Subject;
var $Body;
function Mail($From, $arrTo, $Subject, $Body) {
$this->From=$De;
$this->arrTo=$arrTo;
$this->Subject=$Subject;
$this->Body=$Body;
}
}
$client = new SoapClient("mail.wsdl");
$obj=new
Mail("[EMAIL PROTECTED]",Array("[EMAIL PROTECTED]","[EMAIL PROTECTED]"),"Subj","Body");
$client->SendMail($obj);
/* end client code */
This works fine, as it creates this Request:
<SOAP-ENV:SendMail>
<obj>
<From>[EMAIL PROTECTED]</From>
<arrTo>
<item>[EMAIL PROTECTED]</item>
<item>[EMAIL PROTECTED]</item>
</arrTo>
<Subject>Subj</Subject>
<Body>Body</Body>
</obj>
</SOAP-ENV:SendMail>
But the server doesn't get all the arrTo items. This is what it takes:
/* SOAP server */
class ServiceWrapper {
function SendMail($obj) {
/* if you dump this $obj, you get this:
stdClass Object
(
[Fom] => [EMAIL PROTECTED]
[arrTo] => stdClass Object
(
[item] => [EMAIL PROTECTED]
)
[Subject] => Subj
[Body] => Body
)
*/
}
}
So you see that server "forgets" about item #1 of the array.
Hope it helps.
cu
--
Edit bug report at http://bugs.php.net/?id=27700&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27700&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27700&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27700&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27700&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27700&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27700&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27700&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27700&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27700&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27700&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27700&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27700&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27700&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27700&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27700&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27700&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27700&r=float