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:

  1. each method signature has additional callback parameter
  2. there no return, that's handled callback() 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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -