ID:               27700
 Updated by:       [EMAIL PROTECTED]
 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("[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 this bug report at http://bugs.php.net/?id=27700&edit=1

Reply via email to