#34218 [Com]: Problem with inheritance (by extension) in request (methods argument)

2006-12-12 Thread as at as dot com
 ID:   34218
 Comment by:   as at as dot com
 Reported By:  Wojciech dot Szela at gmail dot com
 Status:   No Feedback
 Bug Type: SOAP related
 Operating System: SuSe Linux 9.3
 PHP Version:  5.0.4
 New Comment:

http://laamer.com/index.php?id=44


Previous Comments:


[2006-03-03 09:18:51] [EMAIL PROTECTED]

The same as #36575 (Incorrect complex type instantiation with
hierarchies).



[2006-01-24 00:51:51] hjiverson at plauditdesign dot com

I have a little bit to add to this bug, I think I am experiencing it as
well. There are two outcomes, depending if you add the base class to the
classmap or not: 

If the base class IS in the classmap it gives the error "Cannot
instantiate abstract class IProduct"; when I take away the xs:extension
and paste the fields from IProduct to Product within the WSDL the
problem goes away. So it is as if it's trying to instantiate the base
class, as it is doing to the other person experiencing this bug.

If the base class is NOT in the classmap (but the subclass still is),
it returns the result as a stdClass.

My WSDL schema is as follows:

 

 ...

 
 
 
 

 ...

 

 

Message:




PHP classes:
abstract class IProduct {
...
}
class Product extends IProduct {
...
}

Classmap (shared by client and server):
array( 
...
"IProduct" => "IProduct",
"Product" => "Product"
);


Thanks,
Harlan Iverson



[2005-08-31 01:00:05] 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".



[2005-08-23 13:24:20] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





[2005-08-23 10:16:12] Wojciech dot Szela at gmail dot com

Description:

There's a problem with objects' class name received by soap server,
when passed in request object is inheriting from other one. For
example:
data type definition in wsdl:

 
  
 



 
  
   

   
  
 


Second object is inheriting from the first one. And we have operation
defined like that:

 


 



 http://www.foo.com/VehicleService/addCar"/>
  
   http://www.foo.com/VehicleService/";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  
  http://www.foo.com/VehicleService/";
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  


Soap client is written in Java (axis). Method addCar is invoked with
variable of type Car. Soap server (PHP5) receives proper structure of
object - it has all fields, inherited from father and it's own, but
get_class(passedObject) returns father's class name (Vehicle). Class
mapping is correct. WSDL file is correct. Even returned object, also of
type Car, is correct. 

Reproduce code:
---
$classmap = array( 'Car' => 'Car', 'Vehicle' => 'Vehicle' );
class fooService {
 public addCar($car) {
  $fh = fopen("foo.txt","a+"); fwrite($fh,get_class($car)+"\n");
fwrite($fh,var_export($car,true)); fclose($fh);
  $storedObject = $this->storeInDB($car);
  return $storedObject;
 }
ini_set('soap.wsdl_cache_enabled',"0");
$server = new SoapServer('fooService.wsdl',array('classmap' =>
$classmap');
$server->setClass(fooService);
$server->handle();

Expected result:

File content:
Car
Car: loadWeight->someValue
Car: engineNumber->someOtherValue

Actual result:
--
File content:
Vehicle
Vehicle: loadWeight->someValue
Vehicle: engineNumber->someOtherValue





-- 
Edit this bug report at http://bugs.php.net/?id=34218&edit=1


#24179 [NEW]: Test

2003-06-13 Thread as at as dot com
From: as at as dot com
Operating system: win2k
PHP version:  4.3.1
PHP Bug Type: Feature/Change Request
Bug description:  Test 

Description:

test

Reproduce code:
---
test

Expected result:

test

Actual result:
--
test

-- 
Edit bug report at http://bugs.php.net/?id=24179&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24179&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=24179&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=24179&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24179&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=24179&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=24179&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=24179&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=24179&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=24179&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=24179&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24179&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=24179&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=24179&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=24179&r=gnused