8
I am consuming a SOAP Webservice and I am found the following problem: Webservice has two functions. In PHP, using the Soapclient class, I created the client and consumes the first function without problem. But when I try to use the second function, it returns me a lot of errors without nexus. But when I try to consume this second function using Soapui, the second function sends the return correctly. My question is: can it be a mistake in Webservice? But if it is, how can Soapui consume the same?
In addition, I have a certain suspicion that the error may be even in Webservice, because when I tried to import WSDL from it in Java or Python, the import fails. And that’s never happened with other web-services I’ve consumed. The path to Webservice is: http://wscaixa.datasysonline.net/wsDadosCaixa.asmx?wsdl
My PHP code:
<?php
$clientesoap = new SoapClient("http://wscaixa.datasysonline.net/wsDadosCaixa.asmx?wsdl", array(
'cache_wsdl' => WSDL_CACHE_NONE
));
$xml = "<cartoes>";
$xml .= "<lancamento>";
$xml .= "<pedido>XXXX-XXXXX</pedido>";
$xml .= "<parcela>1</parcela>";
$xml .= "<nsu>666666</nsu>";
$xml .= "<valorParcela>36</valorParcela>";
$xml .= "<valorLiquido>35</valorLiquido>";
$xml .= "<dtVencimento>10/03/2015</dtVencimento>";
$xml .= "<dtAntecipacao>12/03/2015</dtAntecipacao>";
$xml .= "<dtLiquidacao>12/03/2015</dtLiquidacao>";
$xml .= "<taxaAntecipacao>2</taxaAntecipacao>";
$xml .= "</lancamento>";
$xml .= "</cartoes>";
$param = new stdClass();
$param->Token = 'xxxxxxxxxxxxxxxxxxxxxxx';
$param->Xml = $xml;
$resultado = $clientesoap->AtualizarConciliacao($param);
// a funcao abaixo funciona, mas a de cima (AtualizarConciliacao) dá erro:
// $param->Data '2016-03-03';
// $resultado = $clientesoap->BaixarVendasCartao($param);
print_r($resultado);
?>
My PHP code: http://pastebin.com/Er3NRekz
– Paulo Luvisoto
Error returned by PHP: http://pastebin.com/Up3mGp6N
– Paulo Luvisoto
Paulo you could add there in the statement of your question the code snippet , imagine that someone in the future has the same problem and your link is no longer available to access.
– stringnome
string Name, already pasted the code. Grateful for the tip.
– Paulo Luvisoto
By error message it seems that token is being sent null.
– Andre Mesquita
Without the true token it is not possible to reproduce your problem. WS is also not the best developed. WDSL should be self documenting and spell out exactly what fields it expects, not a named string
xml
.– gmsantos