Establishing a Connection
Creating a JDBC Data Source
You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for eBay consists of three basic steps:
- Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
- Provide the driver class. For example:
- Provide the JDBC URL. For example:
jdbc:ebay:DevID=MyDevID;OAuthClientId=MyAppID;OAuthClientSecret=MyCertID;RuName=MyRuName;SiteID=0;OAuthAccessToken=MyOAuthAccessToken or jdbc:cdata:ebay:DevID=MyDevID;OAuthClientId=MyAppID;OAuthClientSecret=MyCertID;RuName=MyRuName;SiteID=0;OAuthAccessToken=MyOAuthAccessToken
The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:ebay:" or "jdbc:cdata:ebay:" and can include any of the connection properties in name-value pairs separated with semicolons.
Connecting to eBay APIs
By default, the driver connects to production environments. Set UseSandbox to true to use a eBay sandbox account.
Authenticating to eBay
eBay uses the OAuth 2.0 authentication standard and the Auth'n'Auth, the traditional authentication used by the eBay APIs. To authenticate using OAuth or Auth'n'Auth, depending on how your app is configured, you will need to create an app to obtain the OAuthClientId, OAuthClientSecret, DevID, and CallbackURL connection properties. See Using OAuth Authentication for an authentication guide.