Search code examples
c#quickbooksquickbooks-onlineintuit-partner-platform

Purchase Orders error "There is an error in XML document (0, 0)"


I have a c# web application, Integrated with QuickBooks Online Every thing is running till i add the Following Purchase Orders Code:

Intuit.Ipp.Data.Qbo.PurchaseOrder oPurchaseOrder = new Intuit.Ipp.Data.Qbo.PurchaseOrder();
IList<Intuit.Ipp.Data.Qbo.PurchaseOrder> ModifiedPOs = commonService.FindAll(oPurchaseOrder,1,100) as IList<Intuit.Ipp.Data.Qbo.PurchaseOrder>;

an error appear with this description : "There is an error in XML document (0, 0)"

Note: i'm using version 2.1.4.0.

any Advice ?


Solution

  • Please configure the logger in DEBUG mode and capture the raw request and response XML. Without that it is hard to find the exact issue. It could because of some non XML characters which is present in the XML(API Payload) and that's why serialization is failing.

    Ref - https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0150_ipp_.net_devkit_3.0/logging

    You can try ApiExplorer tool to test this. https://developer.intuit.com/apiexplorer?apiname=V3QBO

    Thanks