Error consuming WebService SOAP in php

0

I'm having a difficulty getting a WebService in PHP, whenever I make the request via SoapClient I get the following error message:

  

'NoneType' object has no attribute 'unmarshall'

The call is being made as follows:

$conta = 'conta';
$token = 'token';
$url = 'url/soap?WSDL';

$soap_client = new SoapClient($url);

$soap_client->ProcessoAndamentosTodos($token, $conta, $parametro3);

Would anyone know how to solve it? Or what am I doing wrong?

    
asked by anonymous 15.09.2016 / 17:27

2 answers

1

Well, I managed to solve the problem, I will leave the solution of what I did here, in case someone is with this same problem. The WSDL in question uses porType, and so it does not let pass parameters directly as I had done. This way, I was able to access the methods as follows:

$conta = 'conta';
$token = 'token';
$url = 'url/soap?WSDL';

$soap_client = new SoapClient($url);

$params = array('param1'=>$param1, 'param2'=>$param2, 'param3'=>$param1);

var_dump($soap_client->ProcessoAndamentosTodos($params));

Another form of access that also works is as follows:

var_dump($soap_client->__soapCall('ProcessoAndamentosTodos', array($params)));
    
16.09.2016 / 17:38
0

This error means that some method / attribute is returning Null and you are trying to access the NodeValue attribute of it. Try to check the nulls of the WS responses.

    
15.09.2016 / 20:11