asynchronous - How to asynchronously service multiple QBWC clients with Node.js -
the idea implement qbwc web service using node.js can serve multiple incoming requests in asynchronous fashion. looking qbws node.js web service quickbooks desktop web connector. ideas on how can extend support asynchronous architecture service methods?
in advance!
the soap module supports asynchronous function calls makes easy do. use same template my other answer, here's how you'd that:
var soap = require('soap'); var yourservice = { qbwebconnectorsvc: { qbwebconnectorsvcsoap: { serverversion: function (args, callback) { // serverversion code here callback({ serverversionresult: { string: retval } }); }, clientversion: function (args, callback) { //clientversion code here callback({ clientversionresult: { string: retval } }); }, // , other service functions required qbwc } } };
there 2 differences:
- each method signature has additional
callback
parameter - there no
return
, that's handledcallback()
instead.
i don't have suitable environment test this, created a client imitate quickbooks web connector , worked fine. converting qbws methods asynchronous allowed service multiple clients simultaneously (including 1 legitimate qbwc client).
Comments
Post a Comment