I have a working prototype implementation of the Quickbooks Web Connector (QBWC) interface. Everything works as expected except that the closeConnection method is not getting called most of the time.
Expected Behavior
The QuickBooks Web Connector Programmer’s Guide states the following (pg. 21):
What happens when QBWC gets this string array? If the second member of the string array contains “none” or “nvu”, QBWC will display a message, call closeConnection, and stop the session.
Also, the Guide indicates the same info in the "clientVersion and authenticate callbacks" illustration (Figure 2-2, pg. 20):
Call authenticate
If return is "none" or "nvu",
Display message, call closeConnection and stop
Actual Behavior
When the authenticate method returns a value of "none", these (and only these) web methods are called (in the order listed):
- serverVersion
- clientVersion
- authenticate
Note that this is only when there is no work available for QBWC/Quickbooks. When there is work, the authenticate web method returns an empty string and QBWC subsequently calls the following web methods:
- sendRequestXml
- receiveResponseXml
- closeConnection
EDIT 1: After forcing the clientVersion web method to return an "E" result, it does halt the update process as documented in the Programmer's Guide but the closeConnection web method is not called under these circumstances either. It's interesting to note that QBWC does still call the serverVersion web method after the clientVersion returns an "E" result.
Troubleshooting Efforts
- Verified (through tracing) that the second member of the string array does in fact contain a value of "none". However, the closeConnection callback never fires for that session.
- Double-checked the QBWC client log (QWCLog.txt) and find no mention of closeConnection being called and consequently no errors related to such a call.
- Verified that the method code used for closeConnection is identical to the example found in the Programmer's Guide (pg. 68).
Supporting Info
For what it's worth, here are a few details of the implementation.
- ASP.Net 3.5 (c#)
- QBWC 2.0.0.139