Express middleware based upon node-soap
npm install express-soap
npm install express-soap --save
`Usage
All node-soap options are valid and can be passed. See node-soap for documentation.
`javascript
import {soap} from 'express-soap';const app = express();
app.use('/soap/calculation', soap({
services: {
CalculatorService: {
Calculator: {
Add({a, b}, res) {
res({
result: a + b
});
},
Subtract({a, b}, res) {
res({
result: a - b
});
}
}
}
},
wsdl:
... // or xml (both options are valid)
}));app.use('/soap/meta', soap({
services: {
MetaService: {
/ ... /
}
},
wsdl:
... // or xml (both options are valid)
}));
`Why?
The current way of how to implement a soap server in express with node-soap is really inconvenient
(see).
express-soap` simplifies this by providing a middleware instead. Since the order of express