1
I have a Soap client with the following nodejs code:
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 nor an error. However result
, comes blank. In debug the request
is okay.
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>
I started testing yesterday so far.I have here: https://stackoverflow.com/questions/55662516/error-unable-to-get-localissuer-certificate
– Eduardo Arão Reale