dtdr57046 2014-09-01 15:21 采纳率: 100%
浏览 11
已采纳

QuickBooks SalesReceiptModRq XML无效问题

I'm trying to integrate Quickbooks API with our system - add user / modify user / add sale request are fine; the only request I've got problems with is the sale modification.

For the given XML:

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="UK2.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <SalesReceiptModRq requestID="25">
            <SalesReceiptMod>
                <ListID>80000003-1409581902</ListID>
                <EditSequence>1409583199</EditSequence>
                <CustomerRef>
                    <FullName>Support Team</FullName>
                </CustomerRef>
                <RefNumber>00000017</RefNumber>
                <BillAddress>
                    <Addr1>2 House Number</Addr1>
                    <Addr2>House Street</Addr2>
                    <City>City</City>
                    <PostalCode>POST CODE</PostalCode>
                    <Country>GB</Country>
                </BillAddress>
                <ShipAddress>
                    <Addr1>2 House Number</Addr1>
                    <Addr2>House Street</Addr2>
                    <City>City</City>
                    <PostalCode>POST CODE</PostalCode>
                    <Country>GB</Country>
                </ShipAddress>
                <SalesReceiptLineAdd>
                    <ItemRef>
                        <FullName>Standard Sales</FullName>
                    </ItemRef>
                    <Desc>Funtec Beach Line Festival Ball - &lt;p&gt;A good quality light and soft beach volleyball as used at Europes largest beach volleyball festival&lt;/p&gt;</Desc>
                    <Quantity>1</Quantity>
                    <Rate>19.95</Rate>
                </SalesReceiptLineAdd></SalesReceiptMod>
        </SalesReceiptModRq>
    </QBXMLMsgsRq>
</QBXML>

the validator gives me error:

Src Text: <SalesReceiptModRq requestID="25"> Reason: Element content is invalid according to the DTD/Schema.

Of course it would be good if I had an access to DTD for QBXML. According to this DTD (http://apps.quickbooks.com/dtds/qbxmlops60.dtd) my XML should be valid (SalesReceiptModRq with required requestID); though it's not correct one I hoped it would be similar enough to provide me with information on what is wrong.

So, dear SO - what's wrong with my XML and how can I make SalesReceiptModRq requests

  • 写回答

1条回答 默认 最新

  • dsam70528 2014-09-01 21:52
    关注

    You're using a version of qbXML that is 11 years old and for QuickBooks UK 2003:

    <?qbxml version="UK2.0"?>

    The DTD you referred to is 8 years old and for QuickBooks USA 2007:

    qbxmlops60.dtd

    And you're not trying to modify Invoices, you're trying to modify SalesReceipts:

    <SalesReceiptModRq

    You should use the QuickBooks OSR as your reference. If you're trying to modify Invoices, then you need to look up InvoiceModRq for syntax.

    Fix your qbXML version tag so that you're using the qbXML version that your QuickBooks actually supports (if it's a recent version of QuickBooks, try 9.0 or even 12.0).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?