Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/07/2009, 03:19
Jordino
 
Fecha de Ingreso: julio-2009
Mensajes: 1
Antigüedad: 15 años, 7 meses
Puntos: 0
Recibir array de objetos de un webservice

Hola,

Tengo un problema cuando llamo a una funcion de un webservice Java, que devueve un array de objetos. Los objectos del array me los devuelve vacios!!

Codigo de llamada:

$wsdl = "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)?></td>

resultado esperado:

object(stdClass)#2 (1) { ["getMetadataReturn"]=> object(stdClass)#3 (6) { ["contentID"]=> string(36) "6b9f1157-78c2-4e2d-b371-888839431088" ["raudolares"]=> int(100) ["thumbnail"]=> string(45) "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 } } }

resultado recibido:

object(stdClass)#2 (1) { ["getMetadataReturn"]=> object(stdClass)#3 (6) { ["contentID"]=> string(36) "6b9f1157-78c2-4e2d-b371-888839431088" ["raudolares"]=> int(100) ["thumbnail"]=> string(45) "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 } } }