Skip to main content
Published: March 24 2009, 2:05:00 PMUpdated: November 28 2020, 5:22:34 PM

Sample Open eBay Apps  event listener project written in JAVA

Summary   

    This  Java Open eBay event listener is implemented with JAXB and Servlet framework. The sample project consists of three components:

       1. Open eBay Participant Interface API JAXB Binding - a utility includes an ant build script: codeBuilder.xml which is used to generate java source code using xjc JAXB facility from Open eBay Participant Interface API Schema and create OpeneBayParticipantInterfaceAPI jar file
       2. Listener- a web application created with Java Servlet technology which listens for Open eBay Subscription and AppStart events
       3. ListenerTest- a standalone java program which is used to test Listener without going to eBay to trigger the events

Software requirements

     JDK 1.6 or above
     Ant 1.6 or above
     Apache Tomcat or other java web server
     Java Web Services Developer Pack
        - download from https://jax-ws.dev.java.net/, install it to a directory like: D:/jwsdp-2.1 and set JWSDP_HOME system variable to point to the directory.
    Apach Commons Codec commons-codec-1.3.jar
        - download the library from  http://commons.apache.org/downloads/download_codec.cgi and unzip the package

Instructions

  •    Download and extract the attached compressed file: SellingManagerApplicationListener.zip to your local file system as  ${SellingManagerApplicationListener_HOME}
  •    Place commons-codec-1.3.jar  in  ${OpeneBayClient_HOME}/OEPIApi/externalLib directory
  •    You must configure JWSDP_HOME, TOMCAT_HOME, ANT_HOME and JAVA_HOME system variables to point to the respective home directories (for example, ANT_HOME=c:\jakarta-ant-1.6.2).
  •    Specify your Selling Manager Developer key set and your client application URL as below in the ${SellingManagerApplicationListener_HOME}Listener/WebContent/WEB-INF/configuration.xml file:

                 <entry key="CERT"></entry>
                <entry key="PUBLICCERTFILENAME"></entry>    
                <entry key="CLIENTAPPLICATIONURL">YOUR APPLICATION URL</entry>

  •    Build OpeneBayServiceListener project by navigating to ${SellingManagerApplicationListener_HOME}/OpeneBayServiceListener  and typing the following command: ant -f build.xml. This will create a OpeneBayServiceListener.war and save it in ${SellingManagerApplicationListener_HOME} directory 

Deploying OpeneBayServiceListener web applicatio   
     1.  Copy/paste Listener.war to ${ TOMCAT_HOME}/webapps 
     2.  Start your tomcat web server. 

 Testing Open eBay Apps Listener web application
     Test Open eBay Apps Listener with the standalone java program ListenerTest by navigating to${SellingManagerApplicationListener_HOME}/ListenerTest and typing  ant run  

NOTE.  1. It is assumed that  your Open eBay Apps Deployment Descriptor has been successfully uploaded to Sandbox environmen and  an Open eBay Apps key set is genereated for you.  

              Otherwise, you can use the test CertID specified in the ${SellingManagerApplicationListener_HOME}Listener/WebContent/WEB-INF/configuration.xml file and ListenerTest program to test Listerner first.

            2.   Please refer the README file included in each component listed in this project for detailed instructions

How well did this answer your question?