#38701 [Opn->Fbk]: SoapClient returns wrong class (soap inheritance)
| From: | tony2001@php.net | Date: | Mon, 04 Sep 2006 08:34:32 +0000 |
| Subject: | #38701 [Opn->Fbk]: SoapClient returns wrong class (soap inheritance) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-101688@lists.php.net to get a copy of this message | ||
ID: 38701
Updated by: tony2001@php.net
Reported By: chmt at gmx dot net
-Status: Open
+Status: Feedback
Bug Type: SOAP related
Operating System: Windows 2003 server
PHP Version: 5.1.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-09-03 15:23:56] chmt at gmx dot net
The acutal result of course is (copy and paste error)
object(stdClass)#2 (1) {
["item"]=>
object(PlayItem)#4 (0) {
}
}
------------------------------------------------------------------------
[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