php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27700 complexType parameters not received by SOAP server
Submitted: 2004-03-25 13:48 UTC Modified: 2004-04-02 01:21 UTC
From: fjortiz at comunet dot es Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5.0.0RC1 OS: Windows 2000 server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fjortiz at comunet dot es
New email:
PHP Version: OS:

 

 [2004-03-25 13:48 UTC] 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



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-01 05:40 UTC] dmitry@php.net
Hey!

I think the problem in "mail.wsdl". Can you post it here.
 [2004-04-01 09:39 UTC] fjortiz at comunet dot es
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.
 [2004-04-02 01:21 UTC] dmitry@php.net
The problem was because of incorrect WSDL file.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC