Tuesday, 11 April 2017

Node-Soap multiple services

How can I provide multiple services on one server on same port?

var app = express()
app.listen(8001, function() {
    soap.listen(app, '/wsdl1', service1, xml1)
    soap.listen(app, '/wsdl2', service2, xml2)
});

Here when I added second soap.listen it gives me error:

error: uncaughtException: Path must be a string. Received null
TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1326:5)
    at WSDL._processNextInclude (/Users/nporsnjakov/Documents/Projects/callcredit-service/node_modules/soap/lib/wsdl.js:1152:37)
    at WSDL.processIncludes (/Users/nporsnjakov/Documents/Projects/callcredit-service/node_modules/soap/lib/wsdl.js:1191:8)
    at /Users/nporsnjakov/Documents/Projects/callcredit-service/node_modules/soap/lib/wsdl.js:1028:10
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:577:11)
    at run (node.js:348:7)
    at startup (node.js:140:9)

Or should i consider creating different server instance ?



via Nikita P

No comments:

Post a Comment