QBXML获得所有不活跃和活跃的客户

时间:2015-01-01 15:21:59

标签: qbxml

我正在尝试使用QBWebConnector从QuickBooks 2012桌面获取所有客户。我的请求QBXML如下

 <?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>

此请求失败,日志中的错误消息如下

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......

但是,如果我从请求中删除<ActiveStatus>All</ActiveStatus>,它可以正常运行,但我只会获得活动成员,我认为这是默认值。我也希望成为非活跃成员。我绑定了所有三个值,ActiveOnly,InactiveOnly和All,我总是得到相同的错误。当我删除元素时它会起作用。

来自Intuit OnScreen参考...

ActiveStatus可能具有以下值之一:ActiveOnly [DEFAULT],InactiveOnly,All

感谢任何帮助。感谢。

环境: .Net 4.0 WCF服务。

1 个答案:

答案 0 :(得分:0)

ActiveStatus必须遵循MaxRetuned

序列很重要