Giter Club home page Giter Club logo

soap-server-lambda's Introduction

soap-server-lambda

CircleCI Known Vulnerabilities Codacy Badge Codacy Badge Dependabot Status npm npm NpmLicense

This is AWS lambda integration for a simple SOAP server.

A little bit background

There are still a lot of old/legacy project which use SOAP protocol to expose their services. To grab the benefit of AWS serverless services, this is simple try to achieve this step. This project is still matuaring to support all kind of requirements from SOAP world. I will be greatful to all if you want to report an issue or want to contribute in terms of pull request.

Install

$npm install --save soap-server-lambda

OR

$yarn add soap-server-lambda

Usage

Define a service as below and you can use your WSDL with this service

'use strict';

/**
 * Sample MyService
 */
class MyService {
  /**
   * Test function method
   *
   * @param {String} testParam
   */
  async MyFunction(testParam) {
    if (testParam) {
      return {
        status: 'Successful with param: ' + testParam,
      };
    }
    return {
      status: 'Unsuccessful',
    };
  }
}

module.exports = MyService;

Create a lambda handler as below

const SoapServer = require('soap-server-lambda');

const MyService = require('/path/to/MyService');

const server = new SoapServer({
  services: () => {
    return {
      myService: {
        wsdlPath: 'wsdls/MyService.wsdl',
        service: new MyService(),
      },
    };
  },
});

exports.handler = server.createHandler({debug: true});

You have define the name of your function as same to operation name mentioned in your service WSDL file.

Inspiration and reference

This project took a lot of inspiration and reference from apollo-server-lambda project.

Issue or need a new feature?

If you are experiencing a issue or wanted to add a new feature, please create a github issue here.

Contributing

⭐ Star me on GitHub — it helps!

❤️ contribution: Here is contributing guide in deatil.

For impatient here are quick steps:

  • Fork the repository
  • Create Branch in you local repository
  • while(youFinish) { Commit }
  • Squash related commits.
  • Write unit test cases for your work.
  • Check the Build on your local.
  • Raise a Pull Request (aka PR)

soap-server-lambda's People

Contributors

dependabot-preview[bot] avatar rishikeshdarandale avatar lracicot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.