ID: 49070 Updated by: sjo...@php.net Reported By: jordibsala at gmail dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: windows xp PHP Version: 5.3.0 New Comment:
Thank you for your bug report. To properly diagnose and reproduce the problem, we need the SOAP response from the server when it returns the array. You can obtain this by calling __getLastRequest() or using a sniffer like Wireshark. Previous Comments: ------------------------------------------------------------------------ [2009-07-27 09:34:04] jordibsala at gmail dot com 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 this bug report at http://bugs.php.net/?id=49070&edit=1