#45155 [Opn->Fbk]: Constructors not called when using classmap option in SoapClient
| From: | jani@php.net | Date: | Tue, 28 Apr 2009 18:40:52 +0000 |
| Subject: | #45155 [Opn->Fbk]: Constructors not called when using classmap option in SoapClient | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136470@lists.php.net to get a copy of this message | ||
ID: 45155
Updated by: jani@php.net
Reported By: david at globulebleu dot com
-Status: Open
+Status: Feedback
Bug Type: SOAP related
Operating System: *
PHP Version: 5.2.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2009-02-03 09:44:08] r dot swets at gmail dot com
i can imagine that instead of using the constructor, the __wakeup
method is called.
------------------------------------------------------------------------
[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