Node Js - node-soap

1

I have a soap client with the following code in nodejs:

var soap = require('soap');
var url = 'bin/NfeStatusServico2.wsdl';


soap.createClient(url, function(err, client) {
     client.setSecurity(new soap.ClientSSLSecurityPFX(
    'xxxxxxxxxxxx.pfx', // or a buffer:  [fs.readFileSync('/path/to/pfx/cert', 'utf8'),
    'xxxxxxxxx',
    {   /*default request options like */
         strictSSL: false,
         rejectUnauthorized: false,
        // hostname: 'some-hostname'
         //secureOptions: constants.SSL_OP_NO_TLSv1_2,
        // forever: true,
    },
));



client.NFeStatusServico4.nfeStatusServicoSoap12.nfeStatusServicoNF({
    _xml : '<consStatServ xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00"><tpAmb>2</tpAmb><cUF>50</cUF><xServ>STATUS</xServ></consStatServ>'
}, function(err, result, rawResponse, soapHeader, rawRequest) {
        console.log(err, result, rawResponse, soapHeader, rawRequest, client.lastRequest);

});

});

It is not returning an error. But% w / o%, is blank. No debug or result is ok.

Library Link

Requisição.

<?xml version="1.0" encoding="UTF-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
    <nfeDadosMsg 
xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeStatusServico4">
        <consStatServ xmlns="http://www.portalfiscal.inf.br/nfe" 
versao="4.00">
            <tpAmb>1</tpAmb>
            <cUF>50</cUF>
            <xServ>STATUS</xServ>
        </consStatServ>
    </nfeDadosMsg>
</soap12:Body>
</soap12:Envelope>
    
asked by anonymous 13.04.2018 / 20:07

0 answers