I'm using a webservice to perform file uploads from the CAT52 gateway
WebService : link
You are doing all normal communication (at least I think) but there is a return that I can not understand
Return through vardump
object (stdClass) [9] public 'SendResult' = > string '999 | String reference not set to an instance of a String. Parameter name: s' (length = 74)
By the message is string that was not instantiated, parameter 's', however I do not have this parameter.
Follow the code so you can help me
$headerBody = array('CNPJ' => $this->getCnpj(),
'CategoriaUsuario' => $this->getCategoriaUsuario(),
'Senha' => $this->getSenha(),
'Usuario' => $this->getUsuario());
$header = new SOAPHeader($this->getXmlns(), 'Autenticacao', $headerBody);
$this->cliente = new SoapClient( $this->getWsdlUrl(), array('soap_version' => SOAP_1_2));
$this->cliente->__setSOAPHeaders($header);
$filename = new SoapParam($arquivoNome, 'NomeArquivo');
$content = new SoapParam(utf8_encode($arquivoConteudo), 'ConteudoArquivo');
$tipoenvio = new SoapParam($envioNormal, 'EnvioNormal');
$obs = new SoapParam($observacoes, 'Observacoes');
//$resEnvio = $this->cliente->__soapCall('Enviar', $token);
$resEnvio = $this->cliente->Enviar($filename, $content, $tipoenvio, $obs);
var_dump($resEnvio);