qbwc / qbxml

QBXML Parser and Validation Tool
MIT License
27 stars 41 forks source link

Validate order of elements #14

Open JasonBarnabe opened 9 years ago

JasonBarnabe commented 9 years ago

QuickBooks doesn't like when things are out of order, but we're not validating that.

jarederaj commented 9 years ago

It would be nice if you used some kind of standard XML error response instead of a string that just reads "QuickBooks found an error when parsing the provided XML text stream."

This is basically like throwing a silent error and leaves me wondering what of a thousand things could be wrong with the xml... plus, why is an XML processor responding with invalid xml. It's fine if you don't want to validate it, but tell me that's what you're doing with your standard xml response.

ruckus commented 9 years ago

I think its largely because qbxml cannot/doesnt validate the order of XML elements but QB/Web Connector does require specific ordering. Which, yes, is a huge pain in the ass and is totally lame.

The error text that you're seeing is not generated by qbxml but by the web connector.

The overall solution is to use the qb*xml validator tool which is shipped with the SDK (and only runs on Windows). It can be downloaded here:

https://developer.intuit.com/docs/0250_qb/0010_get_oriented/0060_sdk_components

JasonBarnabe commented 9 years ago

I don't think there's any reason why qbxml couldn't validate the order of elements, but it currently doesn't. I would be happy to accept a pull request that changes this.

As @ruckus says the message is coming from web connector, and we're just passing it along...