question

rschluet9 avatar image
0 Likes"
rschluet9 asked

VerifyAddItem returns error on child element

I am calling VerifyAddItem in the sandbox trading api. As a test, I am creating a very simple XML body. Here is the pretty print version: US USD Antique Table circa 1795 PayPal 20081 Days 30 1 0 100.00 No error is returned; however, the response is this: 2015-12-09T20:03:46.732Z Failure Schema XML request error. Schema XML request error: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.. 20170 Error SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. RequestError 931 E931_UNI_API5_17617533_R1 The XML is valid, so why am I getting this error? The only element with a child element is the PrimaryCategory, which contains a CategoryID element, which is the same as in the sample code for VerifyAddItem: CategoryType string
verifyadditem
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

It's difficult to see a cause for the error when only part of your API request is been shown. Are you able to obtain a copy of the full raw XML that is sent? (Without the pretty print.)
0 Likes 0 ·
rschluet9 avatar image
0 Likes"
rschluet9 answered
I have tried to add the raw xml here, but the editor seems to then treat is as XML and just show the values, so I am attaching the raw xml text file. Well, I guess not, the file upload says my file type is bad, so here is a pdf. I am still getting the 'SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize' error. [link text][1] [1]: /storage/temp/ 813-verifyadditem.pdf

verifyadditem.pdf (12.7 KiB)
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

davidtsadler avatar image
0 Likes"
davidtsadler answered
Didn't spot the issue at first but it's simply due to the *xmnls* attribute been named wrong. It should be **xmlns**. Also make sure your listing duration is correct. You've changed it to Day_30 in the PDF and it needs to be Days_30. (I'm assuming it's just a typo in the PDF).
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks so much, David. I had fixed the Day_30 to Days_30, but eventually just put 'GTC' which, of course, didn't fix the issue. It would be nice if the response was more helpful instead of the generic child message. I haven't worked much with XML for quite awhile. I have worked on this issue for over a week, but have also learned a lot about the eBay API. I am writing an app for the Mac in objective-c so no SDK's to rely on. So anyway, I'm past that issue now. Of course, I'm just on to the next one, but at least the response is intelligible.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.