Package com.ebay.services.finding

Examples of com.ebay.services.finding.FindingServicePortType


    
     public FindItemsByKeywordsResponse getEbaySearchResults(String searchTerm, int numItemsReturned, String appID) {

        FindItemsByKeywordsResponse result = null;
        try {
            FindingServicePortType serviceClient = this.createEbayConnection(appID);

            //create request object
            FindItemsByKeywordsRequest request = new FindItemsByKeywordsRequest();

            //set request parameters
            request.setKeywords(searchTerm);

            ItemFilter i = new ItemFilter();
            i.setName(ItemFilterType.FREE_SHIPPING_ONLY);
            i.getValue().add("true");

            ItemFilter j = new ItemFilter();
            j.setName(ItemFilterType.LISTED_IN);
            j.getValue().add("EBAY-US");
           
            ItemFilter k = new ItemFilter();
            k.setName(ItemFilterType.LOCATED_IN);
            k.getValue().add("US");

            request.getItemFilter().add(i);
            request.getItemFilter().add(j);
            request.getItemFilter().add(k);

            PaginationInput pi = new PaginationInput();

            pi.setEntriesPerPage(numItemsReturned);
            request.setPaginationInput(pi);
            request.setBuyerPostalCode("19087");
            request.setSortOrder(SortOrderType.BEST_MATCH);

            //call service
            result = serviceClient.findItemsByKeywords(request);

        } catch (Exception ex) {
            ex.printStackTrace();
            System.exit(1);
        }
View Full Code Here

TOP

Related Classes of com.ebay.services.finding.FindingServicePortType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.