note 109240 modified in soapclient.soapcall by danbrown

From: Date: Mon, 16 Jul 2012 16:02:33 +0000
Subject: note 109240 modified in soapclient.soapcall by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189244@lists.php.net to get a copy of this message
if you are getting this:

Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'comHistorico' property in....

make sure you are calling the right object. I wasted hour on this problem and it wasnt my fault, the provider told me to use this object.

ex. I was calling,

<?php
$client = new SoapClient('https://secure.fcontrol.com.br/WSFControl2/WSFControl2.asmx?wsdl', array('trace' => 1));
$res = $client->analisarTransacao2(array('Name'=>'John', 'Surname' => 'Smith'));
print_r($res);
?>

but instead instead of calling analisarTransacao2 I was suppose to call 
enfileirarTransacao4.

Than I got the result I wanted,

stdClass Object ( [enfileirarTransacao4Result] => stdClass Object ( [Sucesso] => [Mensagem] => 154|Usuário ou senha inválido(s). ) ) --was-- if you are getting this: Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'comHistorico' property in.... make sure you are calling the right object. I wasted hour on this problem and it wasnt my fault, the provider told me to use this object. ex. I was calling, $client = new SoapClient('https://secure.fcontrol.com.br/WSFControl2/WSFControl2.asmx?wsdl', array('trace' => 1)); $res = $client->analisarTransacao2(array('Name'=>'John', 'Surname' => 'Smith')); print_r($res); but instead instead of calling analisarTransacao2 I was suppose to call enfileirarTransacao4. Than I got the result I wanted, stdClass Object ( [enfileirarTransacao4Result] => stdClass Object ( [Sucesso] => [Mensagem] => 154|Usuário ou senha inválido(s). ) ) http://php.net/manual/en/soapclient.soapcall.php

« previous php.notes (#189244) next »