Webservice with PHP + SOAP - Doubt with the return

Asked

Viewed 200 times

1

I’m wearing a webservice to perform CAT52 ordinance file uploads

Webservice: https://www.nfp.fazenda.sp.gov.br/ws/arquivocf.asmx?WSDL

You are doing all normal communication (at least I think) but there is a return coming that I am not able to understand

Return through the vardump

Object(stdClass)[9] public 'Enviar result' => string '999|String Reference not set to an instance of a String. Parameter name: s' (length=74)

By message is string that was not instantiated, parameter’s', but I do not have this parameter.

Follow the code so they 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);
  • What is being set in the Submit key?

  • Send result is return, I set nothing

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.