Simple way to communicate with SEFAZ SOAP web services

sefaz-communicator

Simple way to communicate with SEFAZ SOAP web services

Install

npm install sefaz-communicator

Usage

const sefaz = require('sefaz-communicator');

const url =
    'https://hnfe.sefaz.ba.gov.br/webservices/NFeStatusServico4/NFeStatusServico4.asmx';
const methodName = 'nfeStatusServicoNF';
const message = {
    $xml: `<consStatServ xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00">
            <tpAmb>2</tpAmb>
            <cUF>29</cUF>
            <xServ>STATUS</xServ>
          </consStatServ>`,
};

const certificate = Buffer.from('Pfx certificate in base64 string', 'base64');
const password = 'password';

const response = await sefaz.communicate(url, methodName, message, {
    certificate,
    password,
});

API

communicate(url, method, message, options)

url

Type: string

Web service URL

methodName

Type: string

Name of Wsdl Method

message

Type: object

Examples

message: { $xml: ‘<?xml>…’}

or

message: { nfeDadosMsg: ‘<?xml>…’}

(optional) options.certificate

Type: Buffer

Pfx Certificate as Buffer

(optional) options.password

Type: string

Certificate password

(optional) options.headers

Type: string array

Headers in xml

Example

headers: [‘<cteCabecMsg>...</cteCabecMsg>’]

(optional) options.httpClient

Type: http.HttpClient

Custom node-soap HttpClient

(optional) options.escapeXML

Type: boolean

Escape XML message (default: false)

(optional) options.forceSoap12Headers

Type: boolean

Force Soap12 Headers (default: true)

(optional) options.contentType

Type: string

Communication content type (default: application/soap+xml)

Download Details:

Author: andreiox

Source Code: https://github.com/andreiox/sefaz-communicator

#nodejs #node #javascript

What is GEEK

Buddha Community

Simple way to communicate with SEFAZ SOAP web services
Rahim Makhani

Rahim Makhani

1621483980

Get the best web app for your Business FUTURE

The web app is application software that runs on the webserver. You can easily use the web app by searching it in the web browser through Google or any other search engine, or you can also add shortcuts of the web app to your smartphone.

Web app for your business helps you to reach new customers and enables them to know about your firm and the services you provide and can know about your organization’s feedback and rating. It can also help you with the advertisement of your app among all.

Do you want to develop a web app for your business? Then it would help if you collaborated with Nevina Infotech, which is the best web application development company that will help you develop a unique web app with the help of its dedicated developers.

#web application development company #web application development services #web app development company #custom web application development company #web app development services #custom web application development services

Rahim Makhani

Rahim Makhani

1626238039

Find the best web app development company for your Startup

A web app is the best way to promote their business for startups. You can’t verbally go and tell everyone to visit your company, but your website or web app can do that. A web app can represent your company, and the visitors who are visiting your website or web app will get knowledge about your firm. Doing this can help you to increase your customer rate.

Nevina Infotech is the best web app development company to choose for developing your web app for your startup. We have a great team of web developers to work with. Our developers are dedicated and enthusiastic in their work.

#web application development company #web application development services #web app development company #custom web application development company #web app development services #custom web application development services

margaret mason

margaret mason

1606384619

Web Development Services in London

https://dataeximit.blogspot.com/2020/11/web-development-services-in-london.html

#web-service #web-development #website #london #web #web development services

First DigiAdd

1621665313

Web Design & Development Services | Web Development Company

Website is the best way to reach the potential customer with accurate strategies. And these strategies is most valuable so don’t take risk choose the Best Digital Marketing Company for Creative Website Design Services.

#web design & development services #professional web development services #creative website design service #ecommerce website development services #website development company #best web development company

margaret mason

margaret mason

1606290734

Magento Web Development Services

https://dataeximit.blogspot.com/2020/11/magento-web-development-services.html

#magento web development services #magento #web-service #web #web-development