question

spongypenguin avatar image
0 Likes"
spongypenguin asked

AddItem and VerifyAddItem error

Hi I'm trying to list an item with on the sandbox with Visual C#. In the response stream from my AddItem (and VerifyAddItem) request it says 'The API call "GeteBayOfficialTime" is invalid or not supported in this release.' I haven't called GeteBayOfficialTime though; my xml file is basically the same as the one here: http://developer.ebay.com/DevZone/building-blocks/eBB_AddByProduct.pdf Here's my code: XmlDocument doc = new XmlDocument(); doc.Load("[file name/location]"); byte[] byteArray = Encoding.Default.GetBytes(doc.OuterXml); WebRequest request = WebRequest.Create(" https://api.sandbox.ebay.com/ws/api.dll"); request.Credentials = CredentialCache.DefaultCredentials; ((HttpWebRequest)request).UserAgent = ".NET Framework Example Client"; request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = byteArray.Length; Stream dataStream = request.GetRequestStream(); dataStream.Write(byteArray, 0, byteArray.Length); dataStream.Close(); WebResponse response = request.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream()); string responseFromServer = reader.ReadToEnd(); System.Windows.Forms.MessageBox.Show(responseFromServer); reader.Close(); response.Close();
additemverifyadditem
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.

1 Answer

· Write an Answer
shulmani_developer.support avatar image
0 Likes"
shulmani_developer.support answered
Hi, Can you please check the headers that you are passing? The value for the header : X-EBAY-API-CALL-NAME should be the API name of the call that you are making. Check the documentation here: http://developer.ebay.com/DevZone/XML/docs/Concepts/MakingACall.html#HTTPHeaders I feel that the headers that you are setting it wrong and that might be the reason that for the error. Cheers!!!
· 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! I got it to work adding the headers.
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.