question

s.thoene avatar image
0 Likes"
s.thoene asked ·

REST Trading API: XML Repsonse is not proper UTF-8

Hey folks, I use the Trading API by doing REST calls (PHP + cURL) and that just works fine for, I guess, more than 90% of all calls. But the left few percent of calls doesn't reutrn proper XML for some reason. In this case I specially talk about the 'GetMyeBaySellingRequest' API call. Header information: +++++++++++++++++ X-EBAY-API-COMPATIBILITY-LEVEL: 859 X-EBAY-API-DEV-NAME: *** X-EBAY-API-APP-NAME: *** X-EBAY-API-CERT-NAME: *** X-EBAY-API-DETAIL-LEVEL: 0 X-EBAY-API-CALL-NAME: GetMyeBaySelling X-EBAY-API-SITEID: 77 X-EBAY-API-REQUEST-ENCODING: XML X-EBAY-SOA-MESSAGE-ENCODING: UTF-8 Content-Length: 4729 Content-Type: application/x-www-form-urlencoded +++++++++++++++++ The error occures when I try to load the cURL repsonse string via the PHP built-in function simplexml_load_string() into an SimpleXML Object. The exact error message is: "simplexml_load_string() [function.simplexml-load-string]: Entity: line 2: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xE4 0x73 0x73 0x69" Is that a known problem for you or should I provide you more details? I first noticed the problem at 2nd Feb 2014, but I cannot say if it already occurred before. Regards, Sebastian Thoene
trading-apiPHPxmlrestutf-8utf8propersimplexml
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.

s.thoene avatar image
0 Likes"
s.thoene answered ·
Thank you for your quick reply, jourbrandts. I have analyzed the problem a few more times and tried to figure out some solid circumstances to reproduce the issue and provide more useful information. Unfortunately (or luckily?! :)) the issue doesn't occur anymore for a few weeks, so maybe it was a side effect of some API changes. As it seems to be solved by itself I would mark this thread as successfully closed. Thank you, have a nice day!
· Share
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.

jourbandts avatar image
0 Likes"
jourbandts answered ·
Not 100% sure. I would think all of the Trading API requests would work or none of them. Not "most" of them. I would need much more detail. It might be best to open a ticket for one on one support, http://developer.ebay.com/support/developersupport/default.aspx If not, I guess your code would be needed so we can reproduce. Not sure you want/can provide your full code here.
· Share
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.

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.