I am struggling to pass an HTML template into my Description tag for VerifyAddItem. Here is the error message I'm working with:
ebaysdk [ERROR]:VerifyAddItem: Class: RequestError, Severity: Error, Code: 20170, Schema XML request error. Schema XML request error: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize..
There is little documentation on how to accomplish this. Following the official AddItem docs, I've tried wrapping my raw html text in "<![CDATA[" + description_html_string + "]]". Doing this gives me a different error:
ebaysdk [ERROR]:VerifyAddItem: Class: RequestError, Severity: Error, Code: 5, XML Parse error. XML Error Text: "; nestedexception is: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.".
I'm using JSON to construct my payload for the API call, so I'm not even sure if I need to do above^. I know my payload works fine. Simply replacing my description with plain text like below works, i.e. the VerifyAddItem API call succeeds:
"Item"{
...
"Description" : "boring non html template description :("
...
}
Setting the Description tag with a far more simple html snippet like this:
"<p> asdfasdfasd asdfasdf </p>"
Also yields the same exact error.
I know my python code returns valid html because I've ran the HTML on my browser and it looks great. Furthermore, it does not exceed the max number of characters as specified in the docs. I've tried following this page already and their suggestions didn't work. This leads me to believe that this is not an issue with my HTML, however one with how i'm interacting with the API.
I'm a beginner when it comes to XML. Has anyone encountered these issues and can help? I at least would like more context with respect to the error I have. The returned errors aren't super clear to me. I would like the answers to be more tailored to the eBay SDK/ Trading API if possible, am I missing a tag in my payload or something?
Found the issue, there was a typo in my CDATA wrapper, I was missing the closing carrot ">". When building the payload, I was setting my description like so:
When it should have been:
With that fix my VerifyAddItem was working fine.