A.Goutam
A.Goutam

Reputation: 3494

Quickbook SalesOrderQueryRq xml provide QuickBooks found an error when parsing the provided XML text stream

I want to get sales order from Quickbook Desktop. From Quickbook reference i am using Salesorderquery(2.1) Below is the XML i am using

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError"> 
   <SalesOrderQueryRq metaData="ENUMTYPE" iterator="ENUMTYPE" iteratorID="UUIDTYPE"/>
</QBXMLMsgsRq>
</QBXML>

but when i try to test the xml request via SDKTESTPLUS3 i am getting below error

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

Can you please tell me what i am doing wrong in this request.

Upvotes: 0

Views: 173

Answers (1)

Keith Palmer Jr.
Keith Palmer Jr.

Reputation: 27952

You have a few problems here:

  • metaData="ENUMTYPE" - This is an enum (https://en.wikipedia.org/wiki/Enumerated_type), and ENUMTYPE is not a valid value for the enum. Either remove this attribute, or specify a valid type.
  • iterator="ENUMTYPE" - This is also an enum, same deal.
  • iteratorID="UUIDTYPE" - This is supposed to be a UUID. If you aren't continuing an iterator, you should leave this attribute out. Otherwise, use the UUID for the iterator.

Also, some versions of QuickBooks use an XML parser that doesn't like self-closed tags. Try this instead:

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError"> 
   <SalesOrderQueryRq></SaalesOrderQueryRq>
</QBXMLMsgsRq>
</QBXML>

Upvotes: 1

Related Questions