AWS Lambda integration for a simple SOAP Server.
View the Project on GitHub RishikeshDarandale/soap-server-lambda
This is AWS lambda integration for a simple SOAP server.
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.
$npm install --save soap-server-lambda
OR
$yarn add soap-server-lambda
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;
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.
This project took a lot of inspiration and reference from apollo-server-lambda project.
If you are experiencing a issue or wanted to add a new feature, please create a github issue here.
:star: Star me on GitHub — it helps!
:heart: contribution: Here is contributing guide in deatil.
For impatient here are quick steps: