Search code examples
xmlquickbooks

Quickbooks Process Request error = 80042500, There was an error when parsing the provided XML file


Looking at the XML Validator tool I get the following response from trying to import my qbpos xml query into Quickbooks Enterprise.

Requested validation for QB POS (qbposxml), file has processing instruction indicating Reason: The element 'QBPOSXML' is used but not declared in the DTD/Schema. Here is the start to the xml file, can anyone shine some light into what the problem is here? Using qbposfc3 for the AppendPurchaseOrderQueryRq() to create the xml response in C#.

<?xml version="1.0" encoding="windows-1252"?>
<QBPOSXML>
  <QBPOSXMLMsgsRs>
    <PurchaseOrderQueryRs requestID="0" retCount="18" statusCode="0" statusMessage="Status OK" statusSeverity="Info">
      <PurchaseOrderRet>

Solution

  • What you posted is the response XML. e.g. that's what you're supposed to get BACK from QuickBooks.

    It is not what you are supposed to send to QuickBooks (e.g. the request XML).

    Please refer to the documentation:

    If you're trying to query for Purchase Orders, your request should look something like this:

    <?xml version="1.0" encoding="utf-8"?>
    <?qbxml version="3.0"?>
    <QBPOSXML>
      <QBPOSXMLMsgsRq onError="stopOnError">
        <PurchaseOrderQueryRq>
    
    ...
    
        </PurchaseOrderQueryRq>
      </QBPOSXMLMsgsRq>
    </QBPOSXML>