soap-decorators
SOAP decorators for creating wsdl's and annotating services to provide metadata for node-soap.
Installation
npm install soap-decorators --save
Usage
Input and output messages
Define input and output message interfaces for a soap service.
;
For a more advanced usage of creating xsd schemas with decorators see xsd-decorators.
Soap service and operations
Define soap service, its operations and specify input and output messages via the previously defined classes.
;
Use soap service with express.js
soap-decorators provides a middleware for express, which does all the magic for you. The wsdl will be resolved and the location address and tns will be set automatically.
; ;; // resolves wsdl for you and sets location address and tns to current requested urlapp.use'/soap/calculation', soapcalculatorController;
Requesting WSDL
Now you can ask for the wsdl by requesting against the defined endpoint.
GET /soap/calculation?wsdl
Response
Using operations
POST /soap/calculation 3 1
POST /soap/calculation 8 4
Response
4
Retrieving WSDL from class or instance
; ; createWsdlinstance === createWsdlCalculatorController;