johnballantyne / qbws

A Node.js web service for QuickBooks Desktop Web Connector
MIT License
38 stars 26 forks source link

SendRequestXMLfailed without any jobs #3

Closed ashwaniare closed 9 years ago

ashwaniare commented 9 years ago

I am facing a similar issue as this one : https://github.com/qbwc/qbwc/issues/18

Facing the same exception:

Error message: Object reference not set to an instance of an object.
More info:
StackTrace =    at QBWebConnector.Logger.log(String method, String logText)
   at QBWebConnector.WebService.log(String method, String logText)
   at QBWebConnector.WebService.do_sendRequestXML(Int32 x, String wcTicket, String HCPResponseXML, String cfn, String qbNationality, Int32 qbXMLMajorVers, Int32 qbXMLMinorVers, Boolean& timeout)
Source = QBWCCommon

Whenever respond back with a 'NoOp' in order to support the async call, I get this SendRequestXML failed error. But if there are any jobs present it works just fine. The thread mentioned above talks about a solution too which I am not able to understand properly. Any Ideas?

johnballantyne commented 9 years ago

This is due to a bug in qbws. I blame Intuit for their poor implementation in the SDK example :sweat_smile:

authenticate() should check how many jobs are available and return 'none' if there are 0. More explanation is available here.

Thanks for catching this, I will push a code fix for this tonight.