#38701 [Opn]: SoapClient returns wrong class (soap inheritance)

From: Date: Sun, 03 Sep 2006 15:23:56 +0000
Subject: #38701 [Opn]: SoapClient returns wrong class (soap inheritance)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101671@lists.php.net to get a copy of this message
ID: 38701 User updated by: chmt at gmx dot net Reported By: chmt at gmx dot net Status: Open Bug Type: SOAP related Operating System: Windows 2003 server PHP Version: 5.1.6 New Comment: The acutal result of course is (copy and paste error) object(stdClass)#2 (1) { ["item"]=> object(PlayItem)#4 (0) { } } Previous Comments: ------------------------------------------------------------------------ [2006-09-03 15:19:32] chmt at gmx dot net Description: ------------ My wsdl based SoapClient returns wrong/empty objects. I tried it with and without a classmap. Nothing helps. The only way to get to my Data seems to be to parse the XML Response by hand. The WSDL can be obtained from here: http://media3.hgkz.ch/PlayerRPC.wsdl Reproduce code: --------------- function createWSDLUrl($url) { return 'http://'.$url.'?wsdl'; } class PlayItem { } class Play extends PlayItem { public $url; public $length; public $x; } $classmap = array('PlayItem'=>'PlayItem', 'Play'=>'Play'); $client = new SoapClient(createWSDLUrl($url), array("location"=>"http://".$url, "connection_timeout" => 5, "uri"=>"urn:Playout", "classmap"=>$classmap); $ret = $client->getItem('localhost:18081', 0, 0); var_dump($ret); Expected result: ---------------- A Play object with valid data Actual result: -------------- A PlayItem object and no way to access the data the webservice delivered. object(PlayItem)#4 (0) { } which is wrong. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38701&edit=1

« previous php.bugs (#101671) next »