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

From: Date: Thu, 25 Mar 2004 18:48:24 +0000
Subject: #27700 [NEW]: complexType parameters not received by SOAP server
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-56834@lists.php.net to get a copy of this message
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("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 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


Thread (5 messages)

« previous php.bugs (#56834) next »