|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2006-09-03 15:19 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Thu Oct 30 04:00:02 2025 UTC | 
The acutal result of course is (copy and paste error) object(stdClass)#2 (1) { ["item"]=> object(PlayItem)#4 (0) { } }Please correct bug in your WSDL file first. It should contain <complexType name="Play"> <complexContent> <extension base="playout:PlayItem"> instead of <complexType name="Play"> <complexContent> <extension base="PlayItem"> If this doesn't help you, please provide server code or at least SOAP response XML.