Tutorials

The following tutorials have been written specifically for the eBay Java SDK:

Tutorial Description
Hello World Tutorial In this tutorial you use GeteBayOfficialTimeCall to return the current eBay time at the eBay site you are invoking this call against. This call was chosen for its simplicity, to show the bare minimum of code that you need to access eBay using the SDK.
GetUser Tutorial In this tutorial you use GetUserCall to return information about the specified user. The tutorial shows how to invoke the call and how to get data from some of the returned fields.
Console Add Item Tutorial In this tutorial you construct an item object for listing on eBay and you use AddItemCall to add the item for sale on eBay. The tutorial also shows how to handle some of the data returned from a successful listing.

Samples

The following code samples have been written specifically for the eBay Java SDK:

Sample Project root directory in $JSDK/samples Application type Description
helloWorld Console Fetches and displays the current eBay time. (It does not actually say “Hello world.”)

This application is the basis for the first Java SDK tutorial.

Includes readme and build files for Maven.

getUser Console Fetches and displays information about a specified eBay user.

This application is the basis for the second Java SDK tutorial.

consoleAddItem Console Prompts the user for some pieces of item information (title, starting value, etc) and lists an item by making an AddItem call.

This application is the basis for the third Java SDK tutorial.

consoleViewItem Console Prompts the user for an item ID; fetches item information by executing GetItem, and displays it.
apiCallsDemo Swing Shows how to enable call-retry and XML logging, and how to make a variety of API calls.
attributesDemo Tomcat 5.5 web app, Illustrates an elementary sell-your-item flow; demonstrates how to handle item attributes and specifics; how to handle eBay metadata (e.g., listing type and duration, payment methods); how to cache eBay metadata on a local drive.
configTest Console Tests HTTP compression of the SDK's web traffic in the host's environment and recommends whether to use it.
consoleAddItemDirect Console Lists an item by executing the AddItem API call. Shows how to make an API call by submitting a request object and getting back a response object, rather than by using the Java API's call wrapper classes.
consoleAddFixedPriceItem Console Lists a fixed price item by executing the Trading API call AddFixedPriceItem.
signinRedirect Tomcat 5.5 web app, Redirects the user to the user consent flow and obtains an auth token. The auth token may be used to authorize other API calls that the reader adds to the program.
simpleXmlPost Swing Uses the ApiSchemaBasedXmlPoster class to perform an API request via XML. The user pastes the XML request into the window's upper pane; the program displays the response in the lower pane.




© 2009–2011 eBay Inc. All rights reserved.
eBay and the eBay logo are registered trademarks of eBay Inc.
All other brands are the property of their respective owners.