Search code examples
soapquickbooksqbxmlno-op

How to handle zero jobs in sendRequestXML in quickbooks web connector


I have a scenario where there are a set of tasks and i am using quickbooks web connector for executing them. The user may want to run all tasks or some of them depending on need. Tasks which are for querying data always send static XML and parse response. The ones which need to add data to quickbooks download certain number of files from my application using which qbxml request XML is generated and sent for each file.

The issue is with the tasks which need to ADD data to Quickbooks. They may not always download files depending upon certain conditions. If files are downloaded for a particular task things will work fine but if no file is downloaded for that task then i need to send an empty string in sendRequestXML method. This throws error(unable to parse request) in web connector logs and calls getLastError method in service.

Currently i am sending "NoOp" from getLastError to not show any error in web connector but it doesn't seem to be working. Even after returning "NoOp" from getLastError method and connection being closed the web connector status shows "Sending Errors to application" though there were actually no real errors as no request was sent.

Is NoOp the right thing to do to show the user a success and not an error condition or is there any other String to be returned? Is it Case-Sensitive string like NOOP?

Please help with this.


Solution

  • Don't send the request. You are controlling what goes to QB with the QBWC server.