#27700 [Asn]: complexType parameters not received by SOAP server

From: Date: Thu, 01 Apr 2004 10:40:38 +0000
Subject: #27700 [Asn]: complexType parameters not received by SOAP server
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-57310@lists.php.net to get a copy of this message
ID: 27700 Updated by: dmitry@php.net Reported By: fjortiz at comunet dot es Status: Assigned Bug Type: SOAP related Operating System: Windows 2000 server PHP Version: 5.0.0RC1 Assigned To: dmitry New Comment: Hey! I think the problem in "mail.wsdl". Can you post it here. Previous Comments: ------------------------------------------------------------------------ [2004-03-25 13:48:24] fjortiz at comunet dot es 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27700&edit=1

« previous php.bugs (#57310) next »