I am trying to get all customers from QuickBooks 2012 desktop using QBWebConnector. My request QBXML is as follows
<?xml version="1.0" ?>
<?qbxml version="11.0"?>
- <QBXML>
- <QBXMLMsgsRq onError="stopOnError">
- <CustomerQueryRq requestID="1" iterator="Start">
<ActiveStatus>All</ActiveStatus>
<MaxReturned>50</MaxReturned>
</CustomerQueryRq>
</QBXMLMsgsRq>
</QBXML>
This request is failing and error message in the log is as follows
20150101.15:06:36 UTC : QBWebConnector.CompanyFileLock.getLock() : Got Lock = LOCKED:MAQBOOL-PC:635557215943733778
20150101.15:06:36 UTC : QBWebConnector.SOAPWebService.update() : Company file has been locked for update.
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.update() : Synchronizing with QuickBooks Company Name = Birmingham Islamic Society
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : Asking application to send request no. 1
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : *** Calling sendRequestXML() with following parameters:
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : wcTicket="54f77c33-8193-4712-8bd8-0a6ceb402b9e"
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : HCPResponseXML=
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : XML dump follows: -
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<HostQueryRs requestID="0" sta......
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : cfn="C:\QB\xxxxxxx111214.QBW"
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbNationality="US"
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbXMLMajorVers="11"
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : qbXMLMinorVers="0"
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : Received from sendRequestXML() following parameter:
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : strRequestXML =
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : XML dump follows: -
<?xml version="1.0"?><?qbxml version="11.0"?><QBXML><QBXMLMsgsRq onError="s......
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : Request xml received.
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Processing request #1
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : REQUEST: received from application: size (bytes) = 234
20150101.15:06:39 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Sending request to QuickBooks.
20150101.15:06:41 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : Sending error message back to application:
HRESULT = 0x80040400
Message: QuickBooks found an error when parsing the provided XML text stream.
20150101.15:06:41 UTC : QBWebConnector.SOAPWebService.ProcessRequestXML() : XML dump follows: -
Request that failed:
<?xml version="1.0"?><?qbxml version="11.0"?><QBXML......
However, if I remove <ActiveStatus>All</ActiveStatus>
from my request, it works but I only get the active members, which I believe is the default. I want to get inactive members also. I have tied all three values, ActiveOnly, InactiveOnly and All, I always get the same error. It works when I remove the element.
From Intuit OnScreen reference...
ActiveStatus may have one of the following values: ActiveOnly [DEFAULT], InactiveOnly, All
Any help is appreciated. Thanks.
Environment: .Net 4.0 WCF service.
ActiveStatus must FOLLOW MaxRetuned
Sequence is important