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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -