// GET api/values public IEnumerable <string> Get() { FindItemsAdvancedRequest request = new FindItemsAdvancedRequest(); // request.keywords = keyword.Text; if (request.keywords == null) { request.keywords = "ipod"; } PaginationInput pi = new PaginationInput(); pi.entriesPerPage = 10; pi.entriesPerPageSpecified = true; request.paginationInput = pi; // Call the service FindingServicePortTypeClient client; string appID = System.Configuration.ConfigurationManager.AppSettings["AppID"]; string findingServerAddress = System.Configuration.ConfigurationManager.AppSettings["FindingServerAddress"]; APIManager.Core.Configuration.ClientConfig config = new APIManager.Core.Configuration.ClientConfig(); // Initialize service end-point configration config.EndPointAddress = findingServerAddress; // set eBay developer account AppID config.ApplicationId = appID; // Create a service client client = FindingServiceClientFactory.getServiceClient(config); FindItemsAdvancedResponse response = client.findItemsAdvanced(request); return(new string[] { "value1", "value2" }); }
/// <summary> /// A simple interface to get eBay Finding Service client proxy /// </summary> /// <param name="config">Client configuration</param> /// <returns>eBay Finding Service client proxy of type FindingServicePortTypeClient</returns> /// public static FindingServicePortTypeClient getServiceClient(APIManager.Core.Configuration.ClientConfig config) { return((FindingServicePortTypeClient)ClientFactory.GetSerivceClient <FindingServicePortType>(config, typeof(FindingServicePortTypeClient), ServiceConstants.FINDING_SERVICE_NAME)); }