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

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

报告相同问题?

悬赏问题

  • ¥60 pb数据库修改或者求完整pb库存系统,需为pb自带数据库
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路