Quickbooks Web Connector suddenly gives error 0x80040400

Until recently, I was able to push sales orders using the Consolibyte Consolidated Connector. Now he's throwing an error

0x80040400: QuickBooks encountered an error while parsing the provided XML text stream.

I removed all optional XML elements, but it still throws an error. The simplest bit of XML I can create is this:

<?xml version="1.0" encoding="UTF-8"?>
<?qbxml version="13.0"?>
<QBXML>
  <QBXMLMsgsRq onError="continueOnError">
    <SalesOrderAddRq>
      <SalesOrderAdd>
        <CustomerRef>
          <ListID>80002DBC-1342467727</ListID>
        </CustomerRef>
      </SalesOrderAdd>
    </SalesOrderAddRq>
  </QBXMLMsgsRq>
</QBXML>

      

I compared this to OSR telling me what I should expect and I checked it through the XML validator found in the QB SDK, but everything says it is well formed. I also ran CustomerQuery

on that particular ListID and it returned a valid client in Quickbooks. Any ideas what might be wrong here?

Edit: Even though the OSR says that all elements other than CustomerRef

are optional, I restart the validator from the latest SDK (which I thought I used before), it said XML expects all of these things. Here is the complete XML that the validator says is valid, but still throws an error:

<?xml version="1.0" encoding="UTF-8"?>
<?qbxml version="13.0"?>
<QBXML>
  <QBXMLMsgsRq onError="continueOnError">
    <SalesOrderAddRq>
      <SalesOrderAdd>
        <CustomerRef>
          <ListID>80002DBC-1342467727</ListID>
        </CustomerRef>
        <TxnDate>2014-12-12</TxnDate>
        <RefNumber>14942</RefNumber>
        <BillAddress>
          <Addr1>redacted</Addr1>
          <Addr2>redacted</Addr2>
          <City>redacted</City>
          <State>IL</State>
          <PostalCode>12345</PostalCode>
        </BillAddress>
        <ShipAddress>
          <Addr1>redacted</Addr1>
          <Addr2>redacted</Addr2>
          <City>redacted</City>
          <State>IL</State>
          <PostalCode>12345</PostalCode>
        </ShipAddress>
        <DueDate>2015-02-20</DueDate>
        <Memo>redacted</Memo>
        <SalesOrderLineAdd>
          <ItemRef>
            <ListID>8000418C-1393430847</ListID>
          </ItemRef>
          <Quantity>61</Quantity>
          <Rate>334.00</Rate>
        </SalesOrderLineAdd>
        <SalesOrderLineAdd>
          <ItemRef>
            <ListID>80003E9F-1382701326</ListID>
          </ItemRef>
          <Quantity>61</Quantity>
        </SalesOrderLineAdd>
        <SalesOrderLineAdd>
          <ItemRef>
            <ListID>8000490D-1417183681</ListID>
          </ItemRef>
          <Quantity>50</Quantity>
          <Rate>349.00</Rate>
        </SalesOrderLineAdd>
        <SalesOrderLineAdd>
          <ItemRef>
            <ListID>80003E9F-1382701326</ListID>
          </ItemRef>
          <Quantity>50</Quantity>
        </SalesOrderLineAdd>
        <SalesOrderLineAdd>
          <ItemRef>
            <ListID>80003D0C-1377271839</ListID>
          </ItemRef>
          <Quantity>111</Quantity>
        </SalesOrderLineAdd>
        <SalesOrderLineAdd>
          <ItemRef>
            <FullName>Subtotal</FullName>
          </ItemRef>
        </SalesOrderLineAdd>
        <SalesOrderLineAdd>
          <ItemRef>
            <ListID>80004710-1409243586</ListID>
          </ItemRef>
        </SalesOrderLineAdd>
      </SalesOrderAdd>
    </SalesOrderAddRq>
  </QBXMLMsgsRq>
</QBXML>

      

+3


source to share


1 answer


I found the problem. Unfortunately, no one could have helped as I had to remove sensitive information from the example where the problem was.



The problem was that there was a unicode character (-) in the Memo element. This caused the XML to be invalid, even though it is passed through when run through the qbValidator tool. Removing the symbol allowed the customer order to be added correctly.

+4


source







All Articles