Forum Discussion
It appears I forgot to mention the exact error I get.
Here it is...
<?xml version="1.0" ?> | |
<qdbapi> | |
<action>API_AddRecord</action> | |
<errcode>11</errcode> | |
<errtext>Could not parse XML input</errtext> | |
<errdetail>XML Parsing Error. unclosed token at line 1 column 907 (which is byte 908)</errdetail> | |
</qdbapi> |
So I tried to find the 907th byte...and that is the very last part of the payload. 907+ remaining bytes shown below.
></qdbapi> |
So confused.
------------------------------
Deepa Prashant
------------------------------
In the data you've omitted, do you have any special characters like & or < in any of the inputs? If it worked prior, then with no changes to the API call it sounds like there is something in the actual data that is being interpreted in the XML and corrupting the payload. For example having & typically has to be escaped as & - do you have any occurrence of invalid characters anywhere in the example that is failing?
------------------------------
Chayce Duncan
------------------------------
- DeepaPrashant2 years agoQrew Member
Hi Chayce,
I've checked and do not have any such characters. In my original post above, I've actually inserted the actual XML string (only x'ed out the usertoken and any emails and names). Typically for such errors, I see XML parsing failed.
This error reads Unclosed token...that is a new one for me.
Thanks!
------------------------------
Deepa Prashant
------------------------------- ChayceDuncan2 years agoQrew Captain
Have you tried to copy the payload into something like Postman to see if the actual Payload is fine and potentially something is getting corrupted in transit? Beyond that - best case is to open a ticket with QB support so they can potentially look deeper at the logs to identify what's happening. To my earlier point - if it works in one case but not another without any change to the API structure, then my best guess is that the error is content related and the something in the transfer is causing the payload not to form correctly based on the data.
------------------------------
Chayce Duncan
------------------------------