How to use the soap.listen function in soap

To help you get started, we’ve selected a few soap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trayio / threadneedle / tests / soapServer / index.js View on Github external
constructor (port = 8000) {

		this.port = port;
		this.soapService = soapService;
		this.wsdlXML = wsdlXML;

		const server = this.server = http.createServer((request, response) => {
			response.end('404: Not Found: ' + request.url);
		});

		this.soapServer = SOAP.listen(server, '/default.asmx', this.soapService, this.wsdlXML);

		//Use this for debugging if needed
		// this.soapServer.on('request', (req, methodName) => {
		// 	console.log('reqest', methodName);
		// });
	}
github CumberlandGroup / node-ews / lib / ews.js View on Github external
return promise((resolve, reject) => {
        // for the includes specified in the XML, the uri must be specified and set to the same location as the main EWS services.wsdl
        options.uri = wsdlFilePath;
        // replace the default blank location with the location of the EWS server uri
        options.xml = options.xml.replace('soap:address location=""','soap:address location="'+ ews.urlApi + '"');
        // create the basic http server
        var server =  require('http').createServer(function(request, response) {
          response.end('404: Not Found: ' + request.url);
        });
        // start the server
        server.listen(options.port);
        // resolve the service with soap.listen
        resolve(soap.listen(server, options));
      })
    });
github AURIN / comp90024 / soapsample / serverEcho.js View on Github external
console.log("Received: " + args.Hi);
        return {
          SayHiResponse : args.Hi
        };
      }
    }
  }
};

var xml = fs.readFileSync("EchoService.wsdl", "utf8"), server = http
    .createServer(function(request, response) {
      response.end("404: Not Found: " + request.url);
    });

server.listen(8000);
soap.listen(server, "/EchoService", echoService, xml);
console.log("Started EchoService");
github RappidDevelopment / quickbooks-js / lib / qbws.js View on Github external
module.exports.run = function runQBWS() {
    var soapServer,
        wsdl = buildWsdl();
    server.listen(process.env.QB_SOAP_PORT || 8000);
    soapServer = soap.listen(server, '/wsdl', qbws, wsdl);

    if (config.verbosity > 2) {
        soapServer.log = function soapServerLog(type, data) {
            serviceLog(type + ': ' + data);
        };
    }
};
github johnballantyne / qbws / lib / qbws.js View on Github external
module.exports.run = function runQBWS() {
    var soapServer,
        wsdl = buildWsdl();
    server.listen(8000);
    soapServer = soap.listen(server, '/wsdl', qbws, wsdl);

    if (config.verbosity > 2) {
        soapServer.log = function soapServerLog(type, data) {
            serviceLog(type + ': ' + data);
        };
    }
};
github BreeeZe / rpos / lib / service.js View on Github external
Service.prototype.start = function () {
  var $this = this;
  
  this.starting();
  
  utils.log.info("Starting webserver on port: %s", this.config.ServicePort);
  this.webserver.listen(this.config.ServicePort);
  
  utils.log.info("Binding %s to %s", $this.constructor.name, this.serviceOptions.path);
  var onReady = this.serviceOptions.onReady;
  this.serviceOptions.onReady = function () {
    $this._started();
    onReady();
  };
  this.service = soap.listen(this.webserver, this.serviceOptions);
  
  
  this.service.on("request", function (request, methodName) {
    utils.log.debug('%s received request %s', $this.constructor.name, methodName);
  });
  
  this.service.log = function (type, data) {
    if ($this.config.logSoapCalls)
      utils.log.debug('%s - Calltype : %s, Data : %s', $this.constructor.name, type, data);
  };
}
github BreeeZe / rpos / lib / SoapService.js View on Github external
SoapService.prototype.start = function () {
        var _this = this;
        this.starting();
        utils.log.info("Binding %s to http://%s:%s%s", this.constructor.name, utils.getIpAddress(), this.config.ServicePort, this.serviceOptions.path);
        this.webserver.listen(this.config.ServicePort);
        var onReady = this.serviceOptions.onReady;
        this.serviceOptions.onReady = function () {
            _this._started();
            onReady();
        };
        this.serviceInstance = soap.listen(this.webserver, this.serviceOptions);
        this.serviceInstance.on("request", function (request, methodName) {
            utils.log.debug('%s received request %s', _this.constructor.name, methodName);
        });
        this.serviceInstance.log = function (type, data) {
            if (_this.config.logSoapCalls)
                utils.log.debug('%s - Calltype : %s, Data : %s', _this.constructor.name, type, data);
        };
    };
    SoapService.prototype.onStarted = function (callback) {