Readme for the Java itemSpecificsDemo Sample
This sample simulates a simple sell your item(SYI) flow, it shows how to use eBay APIs to:
- handle custom item specifics,
- handle eBay meta-data like listing type/duration, payment methods, shipping service, etc.
- cache eBay meta-data on local drives(see Helper Library for detail).
Note:
1. The ant build file is for Tomcat 5.5, JDK 1.5/1.6, please update and run setenv.bat(in SDK build folder) first to set JAVA_HOME, TOMCAT_HOME and ANT_HOME.
2. The eclipse project file is for Eclipse(3.3.2) IDE for Java EE Developers, Dynamic Web Module 2.3, Tomcat 5.5, JDK 1.5/1.6
3. Please update Api token and server address in web.xml before you run this sample.
4. If memory issues occur in your webserver, please refer to your webserver documentation for how to increase the Java heap size
(for example, for Tomcat 5.5, you may update JAVA_OPTS in catalina.bat to include : '-Xms256m -Xmx512m' ).
5. The sample is for demo purpose, there will be meta-data synchronization delay when you run the sample, for progress information,
please check the log(for example, in Tomcat console).
Perparation for Building the Sample
- Shut down Apache Tomcat
- Delete previous versions of the following directory: %TOMCAT_HOME%\webapps\ItemSpecificsDemo.
- Delete %TOMCAT_HOME%\webapps\ItemSpecificsDemo.war
- Delete the contents of %TOMCAT_HOME%\work
Build the Sample and Copy the WAR File
- Update Api token and server address in \samples\itemSpecificsDemo\WebContent\WEB-INF\web.xml
- In Command Line, change directory to \samples\itemSpecificsDemo, Run: ant, If the project is built successfully, a WAR file will be generated.
- Copy the resulting WAR file(\samples\itemSpecificsDemo\ItemSpecificsDemo.war) to %TOMCAT_HOME%\webapps\ItemSpecificsDemo.war.
Start Tomcat and Run the Sample to List an Item
- Start Apache Tomcat.
- Confirm that the following folder is created: %TOMCAT_HOME%\webapps\ItemSpecificsDemo.
- Use the following address in your browser: http://localhost:8080/ItemSpecificsDemo/index.html.
- Choose the Canada site (as a test), optionally specify a category ID, and click Continue.
- Confirm that the category and attribute data was saved under %TOMCAT_HOME% or a subdirectory of %TOMCAT_HOME% (unless you already have a current version of the data).
- On the categoryList.jsp page, a list of categories are displayed. You can select
one primary category for your item, just as a seller does when the seller lists an item. Select one
category and click Continue.
- On the itemSpecifics.jsp page, item specifics are displayed that correspond to the
category you selected. Select item specifics and click Continue.
- On the returnPolicy.jsp page, provide a valid Return Policy Profile ID or Return Policy Profile name.
- On the addItem.jsp page, alter other options as desired, and provide a valid Shipping Policy Profile ID/name, or both, and Payment Policy Profile ID/name, or both, click List Item to eBay.
API Calls Used:
- GetCategories, for category list.
- GeteBayDetails, for meta-data like return policy, shipping service, ship to location.
- GeteCategoryFeatures, for meta-data like return policy enabled, item specifics enabled, listing type, listing duration, payment methods.
- GetCategorySpecifics, for item specifics
- AddItem, for listing to eBay
Attributes Demo Architecture
Attributes Demo Page/Call Flow