I’m trying to query eBay with a FindCompletedItemRequest but the server is returning null
Heres the code
public static CustomFindingService FindingService(){
CustomFindingService findingService;
log.InfoFormat("Connect to Ebay: START");
findingService = new CustomFindingService("XXXXXX-XXXX-XXXXX-XXXXX-XXXXX");
findingService.UseDefaultCredentials = true;
log.InfoFormat("Connect to Ebay: SUCCESS");
return findingService;
}
var fcir = new FindCompletedItemsRequest {keywords = "5mp", categoryId =new string[] {"31388"}}; // 31388 is digital cameras
var l = FindingService().findCompletedItems(fcir);
I have tried removing categoryId and/switching the keywords nothing seems to help. Debugging has shown me that it is pinging the server just that the server is returning null.
Any Help would be appreciated.
I will suggest that you give the code for CustomFindingService. Being as it may I can take a shot at your problem anyway.
I’m guessing that this Generates the request in a similar manner to Finding API – C#.NET code sample with the appID being the series of X’s. I am guessing that you forgot to change
request.Headers.Add("X-EBAY-SOA-OPERATION-NAME", "findItemsByKeywords");torequest.Headers.Add("X-EBAY-SOA-OPERATION-NAME", "findCompletedItems");. Simple solution would be to pass it the type of the request. For example.Also,
I am fairy sure that this is incorrect. You don’t conect while generating the request. Rather you connect during
var l = FindingService().findCompletedItems(fcir);.