@fastify/soap-client
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

@fastify/soap-client

CI NPM version js-standard-style

This plugin decorates your fastify instance with a SOAP client using soap library

Install

npm i @fastify/soap-client

Usage

const fastifySoapClient = require('@fastify/soap-client')

fastify.register(fastifySoapClient, {
  url: 'http://www.dneonline.com/calculator.asmx?WSDL',
  // options: { soap library options }
})

const addSchema = {
  body: {
    type: 'array',
    items: [
      { type: 'number' },
      { type: 'number' }
    ]
  }
}
fastify.post('/add', addSchema, function (req, reply) {
  this.soapClient.Add({ intA: req.body[0], intB: req.body[1] }, function (err, result) {
    if (err) {
      reply.send(err)
      return
    }
    reply.send(result.AddResult)
  })
})

Reference

License

Licensed under MIT

Readme

Keywords

Package Sidebar

Install

npm i @fastify/soap-client

Weekly Downloads

23

Version

2.2.0

License

MIT

Unpacked Size

12.1 kB

Total Files

12

Last publish

Collaborators

  • gurgunday
  • metcoder95
  • galvez
  • simenb
  • coopflow
  • simoneb
  • rafaelgss
  • starptech
  • delvedor
  • matteo.collina
  • allevo
  • jsumners
  • zekth
  • eomm
  • fox1t
  • airhorns
  • kibertoad
  • climba03003
  • is2ei
  • fdawgs