Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 999565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:22:27+00:00 2026-05-16T07:22:27+00:00

I have just started with the ebay Finding API and Feedback API and I

  • 0

I have just started with the ebay Finding API and Feedback API and I need to deploy a basic API implementation on GAE/J.

The problems are:

  1. How do we start with the local dev environment of the ebay SDK?

  2. There is no Java tutorial for the Finding API and feedback.

  3. GAE/J + ebay APIs won’t cause any complexity right?

I am looking for head start in the right direction,I am using Eclipse + GAE plugin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:22:28+00:00Added an answer on May 16, 2026 at 7:22 am

    A full example never hurt anyone so I am going to post a sample of code I am using to fetch information using ebay REST API

    package ebay;
    
    import java.io.ByteArrayInputStream;
    import java.io.InputStream;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.xpath.XPath;
    import javax.xml.xpath.XPathConstants;
    import javax.xml.xpath.XPathExpression;
    import javax.xml.xpath.XPathFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    
    import ebay.URLReader;
    
    /**
     *
     * @author rajeev jha (xxx@yyy.com)
     *
     */
    public class EbayDriver {
    
        public final static String EBAY_APP_ID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx";
        public final static String EBAY_FINDING_SERVICE_URI = "http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME="
                + "{operation}&SERVICE-VERSION={version}&SECURITY-APPNAME="
                + "{applicationId}&GLOBAL-ID={globalId}&keywords={keywords}"
                + "&paginationInput.entriesPerPage={maxresults}";
        public static final String SERVICE_VERSION = "1.0.0";
        public static final String OPERATION_NAME = "findItemsByKeywords";
        public static final String GLOBAL_ID = "EBAY-US";
        public final static int REQUEST_DELAY = 3000;
        public final static int MAX_RESULTS = 10;
        private int maxResults;
    
        public EbayDriver() {
            this.maxResults = MAX_RESULTS;
    
        }
    
        public EbayDriver(int maxResults) {
            this.maxResults = maxResults;
        }
    
        public String getName() {
            return IDriver.EBAY_DRIVER;
        }
    
        public void run(String tag) throws Exception {
    
            String address = createAddress(tag);
            print("sending request to :: ", address);
            String response = URLReader.read(address);
            print("response :: ", response);
            //process xml dump returned from EBAY
            processResponse(response);
            //Honor rate limits - wait between results
            Thread.sleep(REQUEST_DELAY);
    
    
        }
    
        private String createAddress(String tag) {
    
            //substitute token
            String address = EbayDriver.EBAY_FINDING_SERVICE_URI;
            address = address.replace("{version}", EbayDriver.SERVICE_VERSION);
            address = address.replace("{operation}", EbayDriver.OPERATION_NAME);
            address = address.replace("{globalId}", EbayDriver.GLOBAL_ID);
            address = address.replace("{applicationId}", EbayDriver.EBAY_APP_ID);
            address = address.replace("{keywords}", tag);
            address = address.replace("{maxresults}", "" + this.maxResults);
    
            return address;
    
        }
    
        private void processResponse(String response) throws Exception {
    
    
            XPath xpath = XPathFactory.newInstance().newXPath();
            InputStream is = new ByteArrayInputStream(response.getBytes("UTF-8"));
            DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = domFactory.newDocumentBuilder();
    
    
            Document doc = builder.parse(is);
            XPathExpression ackExpression = xpath.compile("//findItemsByKeywordsResponse/ack");
            XPathExpression itemExpression = xpath.compile("//findItemsByKeywordsResponse/searchResult/item");
    
            String ackToken = (String) ackExpression.evaluate(doc, XPathConstants.STRING);
            print("ACK from ebay API :: ", ackToken);
            if (!ackToken.equals("Success")) {
                throw new Exception(" service returned an error");
            }
    
            NodeList nodes = (NodeList) itemExpression.evaluate(doc, XPathConstants.NODESET);
    
            for (int i = 0; i < nodes.getLength(); i++) {
    
                Node node = nodes.item(i);
    
                String itemId = (String) xpath.evaluate("itemId", node, XPathConstants.STRING);
                String title = (String) xpath.evaluate("title", node, XPathConstants.STRING);
                String itemUrl = (String) xpath.evaluate("viewItemURL", node, XPathConstants.STRING);
                String galleryUrl = (String) xpath.evaluate("galleryURL", node, XPathConstants.STRING);
    
                String currentPrice = (String) xpath.evaluate("sellingStatus/currentPrice", node, XPathConstants.STRING);
    
                print("currentPrice", currentPrice);
                print("itemId", itemId);
                print("title", title);
                print("galleryUrl", galleryUrl);
    
            }
    
            is.close();
    
        }
    
        private void print(String name, String value) {
            System.out.println(name + "::" + value);
        }
    
        public static void main(String[] args) throws Exception {
            EbayDriver driver = new EbayDriver();
            String tag = "Velo binding machine";
            driver.run(java.net.URLEncoder.encode(tag, "UTF-8"));
    
        }
    }
    

    And here is the URLReader class

    package ebay;
    
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.net.URL;
    import java.net.URLConnection;
    
    /**
     *
     * @author rajeev jha(xxx@yyy.com)
     * 
     */
    public class URLReader {
    
        public static String read(String address) throws Exception{
    
            URL url = new URL(address);
            URLConnection connection = url.openConnection();
            connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8");
    
            String line;
            String response;
            long totalBytes = 0  ;
    
            StringBuilder builder = new StringBuilder();
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            while ((line = reader.readLine()) != null) {
                builder.append(line);
                totalBytes += line.getBytes("UTF-8").length ;
                //System.out.println("Total bytes read ::  " + totalBytes);
            }
    
            response = builder.toString();
    
            return response ;
        }
    
    }
    

    Happy coding!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 496k
  • Answers 496k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Assuming that you don't only want to send a 500… May 16, 2026 at 11:41 am
  • Editorial Team
    Editorial Team added an answer You'll need to replicate -i's behavior yourself by storing the… May 16, 2026 at 11:41 am
  • Editorial Team
    Editorial Team added an answer Solved. Just deleted project, manualy deleted .buildpath file in the… May 16, 2026 at 11:41 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have just started learning Erlang and am trying out some Project Euler problems
I have started to use the CSS framework Bluetrip, and I just noticed that
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have just started playing with ASP.NET MVC and have stumbled over the following situation.
I have just started using silverlight 2 beta and cannot find how to or
I have just started using Boost 1.36. These libraries would be very useful in
I have just started to study computer sciences at my university where they teach
I have just started to look at .NET 3.5 so please forgive me if
I have just started using services in Android and I have a made a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.