https://github.com/rishikeshdarandale/soap-server-lambda
AWS Lambda integration for a simple SOAP Server.
https://github.com/rishikeshdarandale/soap-server-lambda
Last synced: 5 months ago
JSON representation
AWS Lambda integration for a simple SOAP Server.
- Host: GitHub
- URL: https://github.com/rishikeshdarandale/soap-server-lambda
- Owner: RishikeshDarandale
- License: mit
- Created: 2020-01-29T06:43:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-30T08:55:57.000Z (10 months ago)
- Last Synced: 2024-12-18T09:07:13.116Z (6 months ago)
- Language: JavaScript
- Homepage: https://rishikeshdarandale.github.io/soap-server-lambda/
- Size: 1020 KB
- Stars: 15
- Watchers: 3
- Forks: 10
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# soap-server-lambda
[](https://circleci.com/gh/RishikeshDarandale/soap-server-lambda)
[](https://snyk.io/test/github/RishikeshDarandale/soap-server-lambda)
[](https://www.codacy.com/app/RishikeshDarandale/soap-server-lambda?utm_source=github.com&utm_medium=referral&utm_content=RishikeshDarandale/soap-server-lambda&utm_campaign=Badge_Grade)
[](https://www.codacy.com/app/RishikeshDarandale/soap-server-lambda?utm_source=github.com&utm_medium=referral&utm_content=RishikeshDarandale/soap-server-lambda&utm_campaign=Badge_Coverage)
[](https://dependabot.com)
[](https://www.npmjs.com/package/soap-server-lambda)
[](https://www.npmjs.com/package/soap-server-lambda)
[](https://github.com/RishikeshDarandale/soap-server-lambda/blob/master/LICENSE)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
```bash
$npm install --save soap-server-lambda
```OR
```bash
$yarn add soap-server-lambda
```## Usage
### Define a service as below and you can use your `WSDL` with this service
```javascript
'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
```javascript
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][1] 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][2].
# Contributing
:star: Star me on GitHub — it helps!
:heart: contribution: Here is [contributing guide][3] 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)[1]: https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-lambda
[2]: https://github.com/RishikeshDarandale/apollo-datasource-soap/issues/new
[3]: ./CONTRIBUTING.md