From: jordibsala at gmail dot com
Operating system: windows xp
PHP version: 5.3.0
PHP Bug Type: SOAP related
Bug description: return object array in a webservice
Description:
------------
I have a problem when I call a function of a JAVA webservice which
returns a array of objects, but this array's objects are empty.
Reproduce code:
---------------
$wsdl =
"http://localhost:8180/ContentManager/services/ContentManagerWS?wsdl";
$contentId = "hola";
$metadataSet = 2;
$client = new SoapClient($wsdl);
$params = array('contentId' => $contentId,'metadataSet' =>
$metadataSet);
try
{
$result = $client->__soapCall('getMetadata', array('parameters' =>
$params));
} catch (SoapFault $exception) {
echo $exception;
}
?>
<?php var_dump($result)?>
Expected result:
----------------
object(stdClass)#2 (1) { ["getMetadataReturn"]=> object(stdClass)#3 (6)
{ ["contentID"]=> string(36) "6b9f1157-78c2-4e2d-b371-888839431088"
["raudolares"]=> int(100) ["thumbnail"]=> string(45)
"http://www.thumbnailsraudos.es/thumbnail1.jpg"
["RecommendationValue"]=> int(12) ["semanticData"]=> object(stdClass)#4
(5) { ["emitDate"]=> string(10) "21/07/2009" ["filmDate"]=> string(10)
"21/05/2009" ["editDate"]=> string(10) "21/06/2009" ["edited"]=>
bool(true) ["labeled"]=> bool(false) } ["technicalData"]=> array(5) {
[0]=> object(stdClass)#9 (2) {["bitrate"]=> int(1024000) ["filesize"]=>
int(51236254) } [1]=> object(stdClass)#10 (2) { ["bitrate"]=>int(512000)
["filesize"]=> int(21365245) } [2]=> NULL [3]=> NULL [4]=> NULL } } }
Actual result:
--------------
object(stdClass)#2 (1) { ["getMetadataReturn"]=> object(stdClass)#3 (6)
{ ["contentID"]=> string(36) "6b9f1157-78c2-4e2d-b371-888839431088"
["raudolares"]=> int(100) ["thumbnail"]=> string(45)
"http://www.thumbnailsraudos.es/thumbnail1.jpg"
["RecommendationValue"]=> int(12) ["semanticData"]=> object(stdClass)#4
(5) { ["emitDate"]=> string(10) "21/07/2009" ["filmDate"]=> string(10)
"21/05/2009" ["editDate"]=> string(10) "21/06/2009" ["edited"]=>
bool(true) ["labeled"]=> bool(false) } ["technicalData"]=> array(5) {
[0]=> object(stdClass)#9 (0) { } [1]=> object(stdClass)#10 (0) { } [2]=>
NULL [3]=> NULL [4]=> NULL } } }
--
Edit bug report at http://bugs.php.net/?id=49070&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49070&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49070&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49070&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49070&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=49070&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49070&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=49070&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=49070&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=49070&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=49070&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=49070&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=49070&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=49070&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49070&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49070&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49070&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=49070&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=49070&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=49070&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=49070&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=49070&r=mysqlcfg