2.2.0 • Published 1 year ago

@fastify/soap-client v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@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

2.2.0

1 year ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago