#45155 [Com]: Constructors not called when using classmap option in SoapClient

From: Date: Tue, 03 Feb 2009 09:44:09 +0000
Subject: #45155 [Com]: Constructors not called when using classmap option in SoapClient
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-133418@lists.php.net to get a copy of this message
 ID:               45155
 Comment by:       r dot swets at gmail dot com
 Reported By:      david at globulebleu dot com
 Status:           Open
 Bug Type:         SOAP related
 Operating System: *
 PHP Version:      5.2.6
 New Comment:

i can imagine that instead of using the constructor, the __wakeup
method is called.


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

[2008-06-03 09:43:30] david at globulebleu dot com

Description:
------------
When using classmap to map the SOAP results to a class, the constructor
of the object you've mapped to is not called. 

Reproduce code:
---------------
$client = new SoapClient("url_to_wsdl", 
   array('classmap' => array('contact' => "Contact"));

$params = array("1");

$contact = $client->__soapCall("get_contact", $params);

Expected result:
----------------
A contact object that has properties initialized (i.e. db connections,
...).

Actual result:
--------------
A contact object without the properties.


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


-- 
Edit this bug report at http://bugs.php.net/?id=45155&edit=1



Thread (13 messages)

« previous php.bugs (#133418) next »