QuickBooks found an error when parsing the provided XML text stream

房东的猫 提交于 2019-12-02 05:48:25

问题


I am using Consolibyte PHP SDK for QuickBooks Desktop. I have got this error when I have tried to get Bills from the QuickBooks Desktop-

0x80040400:QuickBooks found an error when parsing the provided XML text stream.

The XML Request is given below and I think the XML is valid and the endpoint BillQuery supports IteratiorID-

<?xml version="1.0" encoding="utf-8"?>
    <?qbxml version="13.0"?>
        <QBXML>
            <QBXMLMsgsRq onError="stopOnError">
                <BillQueryRq  iterator="Start"   requestID="1">
                    <MaxReturned>10</MaxReturned>
                    <FromModifiedDate>1983-01-02T12:01:01</FromModifiedDate>
                    <IncludeLineItems>true</IncludeLineItems>
                    <OwnerID>0</OwnerID>
                </BillQueryRq>  
            </QBXMLMsgsRq>
        </QBXML>

回答1:


Go look at the OSR documentation:

  • https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html

The FromModifiedDate filter is very clearly wrapped inside another XML node:

<ModifiedDateRangeFilter> <!-- optional -->
  <FromModifiedDate >DATETIMETYPE</FromModifiedDate> <!-- optional -->
  <ToModifiedDate >DATETIMETYPE</ToModifiedDate> <!-- optional -->
</ModifiedDateRangeFilter>

Fix your XML so that it conforms to what the OSR shows.

If you'd taken the time to search, you'd find that there is an XML Validator tool included with the SDK which will tell you exactly what the error in your XML is.



来源:https://stackoverflow.com/questions/39347578/quickbooks-found-an-error-when-parsing-the-provided-xml-text-stream

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!