
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
node-webservice
Advanced tools
Webservice helper for api requests
Install via npm:
$ npm install node-webservice
const Webservice = require('node-webservice').SOAP;
const webservice = new Webservice(options<Object>);
webservice.execute(Service<Class>, params<Object>) => Promise;
options
object will be pass as argument for Service
constructor
Service
: see below for explainationparams
: object will be pass as argument for Service
method buildRequest
(require service
key containing client path in soap object)const Webservice = require('node-webservice').HTTP;
const webservice = new Webservice(options<Object>);
webservice.execute(Service<Class>, params<Object>) => Promise;
options
object will be pass as argument for Service
constructor
Service
: see below for explainationparams
: object will be pass as argument for Service
method buildRequest
First argument for webservice execute
function
class MyService {
/**
* Initialize the operation
*
* @param {Object} options
*/
constructor(options) {
// do your stuff
}
/**
* Build the JSON request
*
* @param {Object} params Request query params
* @return {Promise/undefined}
*/
buildRequest(params) {
// do your stuff
}
/**
* Get the JSON request
*
* @return {Object} JSON request
*/
getRequest() {
// do your stuff
}
/**
* Parse webservice response
*
* @param {String} response XML or JSON response from the webservice
* @param {Object} headers headers Object response from the webservice (Only present for HTTP request)
* @return {???} your parse response
*/
getResponse(response, headers) {
// do your stuff
}
/**
* Parse webservice error
*
* @param {Object} error
* @return {???} your parse error
*/
getError(error) {
// do your stuff
}
/**
* Return service URL
*
* @return {String} URL
*/
getURL() {
return 'https://google.com';
}
}
See examples
This project is a work in progress and subject to API changes, please feel free to contribute
FAQs
Webservice helper for api requests
We found that node-webservice demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.