|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-01 05:40 UTC] dmitry@php.net
[2004-04-01 09:39 UTC] fjortiz at comunet dot es
[2004-04-02 01:21 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 15:00:01 2025 UTC |
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("from@some1.com",Array("to1@some1.com","to2@some1.com"),"Subj","Body"); $client->SendMail($obj); /* end client code */ This works fine, as it creates this Request: <SOAP-ENV:SendMail> <obj> <From>from@some1.com</From> <arrTo> <item>to1@some1.com</item> <item>to2@some1.com</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] => fjortiz@comunet.es [arrTo] => stdClass Object ( [item] => to2@some1.es ) [Subject] => Subj [Body] => Body ) */ } } So you see that server "forgets" about item #1 of the array. Hope it helps. cu