Constructors not called when using classmap option in SoapClient

View: New views
1 Messages — Rating Filter:   Alert me  

Constructors not called when using classmap option in SoapClient

by globule bleu | David Georges :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

$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.


Thanks for your help.

David Georges.



--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

LightInTheBox - Buy quality products at wholesale price