I have QuickBooks Web Connector up and running and can successfully run the SDK web service example. I am now trying to query for a vendor and add if it doesn't exist.

However, I am getting the following error on my initial query:

QuickBooks found an error when parsing the provided XML text stream

There are no illegal characters in the XML. What I am sending:

<?xml version="1.0"?>
<?qbxml version="4.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <VendorQueryRq requestID="1">
            <FullName>My Vendor</FullName>
            <MaxReturned>1</MaxReturned>
        </VendorQueryRq>
    </QBXMLMsgsRq>
</QBXML>

I'm looking for a vendor query and add example and an XSD if possible.

有帮助吗?

解决方案

Since you're querying by FullName, and FullName is a unique key in QuickBooks, you can't also use MaxReturned (since it's a unique key, you can always only get a maximum of 1 result back).

<?xml version="1.0"?>
<?qbxml version="4.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <VendorQueryRq requestID="1">
            <FullName>My Vendor</FullName>
        </VendorQueryRq>
    </QBXMLMsgsRq>
</QBXML>

The OSR is always the best source for qbXML:

We also have a wiki with some example requests on it over here:

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top