1
Follows the code:
<?php
$client = new SoapClient('https://servicoshm.saude.gov.br/cadsus/CadsusService/v5r0?wsdl');
$function = "Pesquisar";
$arguments = array("Pesquisar" =>
array(
"CNESUsuario" => array("CNES" =>"6963447", "Usuario"=>"LEONARDO", "Senha"=>"?"),
"FiltroPesquisa" => array("CPF"=> array("numeroCPF"=>"66105234368"), "tipoPesquisa"=>"IDENTICA"),
"higienizar" => "0"
)
);
$result = $client->__soapCall($function,$arguments);
print($result);
?>
I’m getting the following error:
Fatal error: Uncaught SoapFault exception: [env:Receiver ] nested fault: XML parse failed: libxml error: : level: 3, code: 5, file: none, line: 1, str1: "", str2: "", str3: "", int1: 0, int2: 37, message: Extra content at the end of the document in *...\cadsus.php:12 Stack trace: #0 *...\cadsus.php(12): SoapClient->__soapCall('Pesquisar', Array) #1 {main} thrown in *...\cadsus.php on line 12
Some solution?
"message: Extra content at the end of the Document", what was the XML generated?
– Woss
So, I can’t parse, even using a parse_str it returns an error. Using an example in Soapui it returns right. I can’t seem to print the XML on the page.
– Lenhare
Any progress in this integration with the cadsus webservice? I was also able to perform all the tests in SOAPUI, both for Homologation and production, but I can’t get ahead in PHP.
– Wemerson ferreira