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

From: Date: Thu, 01 Apr 2004 14:39:03 +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-57321@lists.php.net to get a copy of this message
 ID:               27700
 User updated by:  fjortiz at comunet dot es
 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:

I had a deeper look and got an eval copy of XMLSpy, and after using it
to validate the WSDL, I must say you are right, it was my WSDL file
which was wrong.

Sorry dmitry for the disturbances.


Previous Comments:
------------------------------------------------------------------------

[2004-04-01 05:40:38] dmitry@php.net

Hey!

I think the problem in "mail.wsdl". Can you post it here.

------------------------------------------------------------------------

[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


Thread (5 messages)

« previous php.bugs (#57321) next »