|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38701 SoapClient returns wrong class (soap inheritance)
Submitted: 2006-09-03 15:19 UTC Modified: 2006-09-12 01:00 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: chmt at gmx dot net Assigned: dmitry (profile)
Status: No Feedback Package: SOAP related
PHP Version: 5.1.6 OS: Windows 2003 server
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-09-03 15:19 UTC] chmt at gmx dot net
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:

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),
 	                "connection_timeout" => 5,

$ret = $client->getItem('localhost:18081', 0, 0);

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-03 15:23 UTC] chmt at gmx dot net
The acutal result of course is (copy and paste error)

object(stdClass)#2 (1) {
  object(PlayItem)#4 (0) {
 [2006-09-04 08:34 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-09-04 10:01 UTC] chmt at gmx dot net
Makes no difference - unfortunaltely.
 [2006-09-04 10:57 UTC]
Please correct bug in your WSDL file first. It should contain

  <complexType name="Play">
    <extension base="playout:PlayItem">

instead of

  <complexType name="Play">
    <extension base="PlayItem">

If this doesn't help you, please provide server code or at least SOAP response XML.

 [2006-09-12 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 16:01:28 2024 UTC