question

mostafa.elzoghbi avatar image
0 Likes"
mostafa.elzoghbi asked ·

Can't get Watch List from GetMyeBayBuying call

Hi, I am using SDK version 871 and i was able to pull buying and sold items. i want to get watch list items but the response doesn't contain them even if i have it as public list. any ideas why this happen. Code: GetMyeBayBuyingCall apiCall = new GetMyeBayBuyingCall(); //set Api Server Url apiCall.ApiContext.SoapApiServerUrl = Helper.LoadeBayConfigurations()[Constants.PK_EBAY_API_URL]; ApiCredential cred = new ApiCredential(userToken); apiCall.ApiContext.ApiCredential = cred; apiCall.Version = Constants.PK_EBAY_API_VERSION; apiCall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll); apiCall.EnableCompression = true; apiCall.GetMyeBayBuying(); after the call when i try to access: apiCall.WatchList or apiCall.WatchListReturn or apiCall.SoapResponse none of them contains information all is null. any help is highly appreciate it. thanks.
c#c# sdkwatch list
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.

mostafa.elzoghbi avatar image
0 Likes"
mostafa.elzoghbi answered ·
Still getting Watch List Return is null and even public wish lists ? any ideas how to fix this ?
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 ·
I think what is happening is your DetailLevel is not getting set, so you are just sending a blank request. Here is my code snippet that is working, GetMyeBayBuyingCall getMyeBayBuyingCall = new GetMyeBayBuyingCall(context); // set the Version used in the call getMyeBayBuyingCall.Version = context.Version; // set the Site of the call getMyeBayBuyingCall.Site = context.Site; // enable the compression feature getMyeBayBuyingCall.EnableCompression = true; //getMyeBayBuyingCall.WatchList = new ItemListCustomizationType(); //getMyeBayBuyingCall.WatchList.Include = true; getMyeBayBuyingCall.DetailLevelList = new DetailLevelCodeTypeCollection(); getMyeBayBuyingCall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll); getMyeBayBuyingCall.Execute(); //just a generic loop to show how you can handle the results ItemTypeCollection oItemCollection = getMyeBayBuyingCall.WatchListReturn.ItemArray; foreach (ItemType oItem in oItemCollection) { Console.WriteLine("ItemID is " + oItem.ItemID); }
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 ·
Also forgot to mention you can turn on logging in order to see the raw request/response, //enable logging context.ApiLogManager = new ApiLogManager(); context.ApiLogManager.ApiLoggerList.Add(new FileLogger(" log.txt", true, true, true)); context.ApiLogManager.EnableLogging = true;
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.

mostafa.elzoghbi avatar image
0 Likes"
mostafa.elzoghbi answered ·
I put the same code and still the watch list is null. have u tested this against the sandbox environment or the production? by the way, the same code i have it returns wonlist with all items and also purchased items. i am not just able to get items in the watch list. here is the request based on the enabled logging you provided: [8/21/2014 5:52:43 PM, Informational] https://api.sandbox.ebay.com/wsapi?callname=GetMyeBayBuying&siteid=0&client=netsoap [8/21/2014 5:52:45 PM, Informational] ****** ReturnAll c7434cf5-7e56-423e-837e-776a858a4508 871 any idea why this is not working ?
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.

mostafa.elzoghbi avatar image
0 Likes"
mostafa.elzoghbi answered ·
@jourbandts still no luck! can u look at the code i pasted above and let me know.
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 ·
Oh that is a great question....the WatchList might not work in sandbox. The view item page is broken in sandbox right now, so I can't even test the functionality. If you send me the sandbox testuser I can look in our DB. Also you can always use the API Test Tool for a sanity check, https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx. If it is returning there and not the SDK, something might be wrong with the SDK. But if it is not returning there either I would venture to say it isn't supported in sandbox. https://ebaydts.com/eBayKBDetails?KBid=684
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.

mostafa.elzoghbi avatar image
0 Likes"
mostafa.elzoghbi answered ·
@jourbandts the test user i am using in the sandbox is: testuser_erecall2
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 ·
Yeah I don't see anything in the DB for the WatchList. I will ask around, but my guess is this doesn't work in sandbox. Cart also is something that doesn't work in sandbox. Does the WatchList show up using the UI on the site?
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.

mostafa.elzoghbi avatar image
0 Likes"
mostafa.elzoghbi answered ·
Watch list throws an exception, but i have wish lists that is public and i have the same issue but i can see it from the UI.
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 ·
For now I can tell you your code will work in production. So I wouldn't waste much more time using sandbox. But I will look into this further.
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.