6
I have the following code that works perfectly. The return of the webservice is a XML
, but the return I’m getting is a string. What should I do to receive the XML
as return and not a string?
$client = new SoapClient('http://www.roveri.inf.br/ws/cnpj.php?wsdl');
$function = 'getCNPJ';
$arguments= array(
'token' => $token,
'cnpj' => $cnpj
);
$options = array('location' => 'http://www.roveri.inf.br/ws/cnpj.php');
$result = $client->__soapCall($function, $arguments, $options);
echo 'Response: ';
print_r($result);