eBay SDK for Java Readme

Please note the following important information about the SDK:

Contents
Release Information for the eBay SDK for Java
Installation Instructions
General Information for the eBay SDK for Java

Release Information for the eBay SDK for Java

Important: Changes to the Trading API affect the SDK. For example, in schema version 499, deprecated objects in the schema were deleted, creating backward incompatibility. See the Trading API Release Notes for ongoing updates to the schema (including occasional removals of schema elements). Please also see Versioning Strategy and Deprecated Objects.

SDK Version 549 and Subsequent Point Releases
SDK Version 523 and Subsequent Point Releases
SDK Version 511 and Subsequent Point Releases
SDK Version 503 for Java Point Release
SDK Version 495 for Java Full Release
SDK Version 485 and Subsequent Point Releases
SDK Version 479 and Subsequent Point Releases
SDK Version 471 and Subsequent Point Releases
SDK Version 465 and Subsequent Point Releases
SDK Version 459 and Subsequent Point Releases
SDK Version 447
SDK Version 1.2.0

SDK Version 549 and Subsequent Point Releases

Attributes Library Supports Sitewide Attribute Sets

The Attributes Library in the SDK now supports downloading and rendering sitewide characteristic sets. This enables you to include sitewide attributes in listings.

On many sites, you use sitewide attribute sets to fill in an item's Return Policy fields, the Item Condition field, or both. Some categories may support zero, one, or both of these sets (as indicated in each sitewide set's "exclude list").

The changes described here assume you are already familiar with the Attributes Library. (For information about working with the Attributes Library, see The Attributes API.)

In the IAttributesMaster interface and AttributesMaster class, the renderHtmlForCategories() method has been removed. Instead, these new methods have been defined:

In the AttributesMaster class, the renderHtml() method has been updated to support rendering Return Policy fields (using eBay's XSL stylesheet). This method checks whether the data is for a return policy, and adds the pageId attribute to the SelectedAttributes node if it is.

A few helper methods have been added to or modified in IAttributesXmlProvider and AttributesXmlDownloader:

A few helper methods have also been added to ICategoryCSProvider and CategoryCSDownloader:

Note: In a few cases, the Item Condition attribute may appear twice when you render standard and sitewide data for a category. Please inform eBay if this occurs. This occurs when a category is mapped to a standard characteristic set that defines an Item Condition attribute locally, and the category is also mapped to a sitewide Item Condition characteristic set. To avoid unexpected results, the seller should either use the local Item Condition defined in the standard set, or you should make sure the same value is used for both when you list the item.

Here are a few cases that may be helpful when you're testing sitewide attributes in the Sandbox:

For an example of new and existing functionality in the Attributes Library, see the existing samples\attributesDemo sample and the Readme file for that sample.

Releases Now Delivered Only as Zip Files (No Installer)

Unlike past SDK releases, all SDK releases now are delivered as zip files. There is no installer. For more information, see the Installation Instructions.

Recent API Feature Updates

The eBay SDK for Java contains updated wrapper classes, updated test cases, and other updates that facilitate your use of recent features of the API.

Documentation of Recent API Features Available

For information about the latest API features, please see the Trading API Release Notes and the eBay Trading Web Services section of the Developer Documentation Center.

SDK Upgraded with JAR files for XML and XPath Utilities

The SDK has been upgraded with externalLib\axis-1_1\xalan.jar and externalLib\axis-1_1\serializer.jar, for use by source\core\src\com\ebay\sdk\util\XmlUtil.java and source\core\src\com\ebay\sdk\util\XPathUtil.java.

SDK Version 523 and Subsequent Point Releases

Attributes Library Enhanced

The Attributes Library now gives you the option to store attribute metadata locally, and only download updates for a site if a newer version exists on the site. Each provider includes one or more get methods for this purpose. In the downloader classes that implement the provider interfaces, these methods check to see what version of the metadata is already stored locally and compare it to the version on the site. If the version on the site is different, or if the metadata isn't stored locally, these get methods download the appropriate metadata from the site and store it in the local file system.

These are the filename conventions (where version is the metadata version, not the request version):

XSL filesite.version.attrxsl
Category-to-CS mappings (all categories)site.ALL.version.catcs
Category-to-CS mappings (one category)site.categoryID.version.catcs
Attributes CS (all sets)site.ALL.version.attrcs
Attributes CS (one or more sets)site.CSIdHashcode.version.attrcs

For example, if you retrieve a full attribute metadata XML file from the UK site (without specifying a particular CSId), and the attribute system version is 8005, the filename would be: UK.ALL.8005.attrcs.

If you retrieve attribute metadata for one or more CSIds, the downloader creates a hashcode for the set (the sum of the IDs), and uses that value in the filename.

The downloader saves these files in the location where the application is launched. For example, if you are using Apache Tomcat, this could be the bin folder or the $CATALINA_HOME folder, depending on how you launch the application. If you are using a desktop application, this could be in the folder where the application is located.

Important: You can delete these locally stored files, but if you edit or rename them, your application may fail.

Alternatively, each provider includes download methods to enable you to force a full download of the metadata without checking the version. In the downloader classes, these methods store the metadata in memory only.

For information about working with the Attributes Library, see The Attributes API. For a sample that uses the functionality in the Attributes library, see C:\Program Files\eBay\SDKInstallDir\samples\attributesDemo and the Readme file for that sample.

Recent API Feature Updates

The eBay SDK for Java contains updated wrapper classes, updated test cases, and other updates that facilitate your use of recent features of the API.

Documentation of Recent API Features Available

For information about the latest API features, please see the Trading API Release Notes and the eBay Trading Web Services section of the Developer Documentation Center.

SDK Version 511 and Subsequent Point Releases

Changes to Download Location and to Documentation

The eBay SDK for Java no longer is available in the Community Codebase. Instead, it is available on the eBay SDK for Java download page. The 511 version includes the 511 javadoc.

For information about the latest API features, please see the Trading API Release Notes and the Trading Web Services API Guide at the Java Developer Center. The Trading Web Services API Guide replaces the eBay SDK for Java Guide.

Recent API Feature Updates

The eBay SDK for Java contains updated wrapper classes, updated test cases, and other updates that facilitate your use of recent features of the API.

No Wrapper Class Currently Available for the UploadSiteHostedPictures Call

Schema version 513 introduced a new XML API call (UploadSiteHostedPictures) for uploading pictures for listings. Availability of this call in the SOAP API is planned for a future date, to be announced. Until this call is available in the SOAP API, no wrapper class will be available for this call in the SDK.

Deletions of Deprecated Fields and Calls

Many deprecated calls and fields were deleted in WSDL version 499. Due to the large number of deletions, SDK Version 511 is not backward compatible.

Helper Class Available for GetCategoryFeaturesCall

You can use a helper class (...\SDKInstallDir\source\helper\src\com\ebay\sdk\helper\GetCategoryFeaturesHelper.java) to store the response data of GetCategoryFeaturesCall in memory. The helper class behaves similarly to the GetCategoryFeatures API call. For an example of how to use the GetCategoryFeatures helper class, please see the following sample: ...\SDKInstallDir\source\SanityTest\src\test\ebay\sdk\helper\GetCategoryFeaturesHelperTests.java.

Removal of Three Samples

The following samples (formerly under the samples folder) have been removed from the SDK, but are available in previous SDK versions: databaseSample, eBaySales, and eBaySalesDesktop.

For Use On Linux: dos2unix Change Needed for Samples

If you install the SDK on Linux and try to run the consoleAddItem sample (in the samples folder), use the dos2unix command on the run.sh file before running the sample. The same step is required for the consoleViewItem sample.

SDK Version 503 for Java Point Release

Deletions of Deprecated Fields and Calls

Due to a large number of deletions from version 499 of the schema, this SDK version is not backward compatible. Deprecated calls and fields were deleted on schema version 499.

For information about SDK changes, please see the javadoc installed in the C:\Program Files\eBay\SDKInstallDir\docs\LibRef folder. Additional information about schema deletions is in the Deprecated Objects page in the Input/Output Reference. Please also read the eBay Schema Versioning Strategy page.

Recent API Feature Updates

This SDK point release contains updated wrapper classes and other updates that facilitate your use of new API features. The following features, described in the Trading API Release Notes, are among the API features included in this SDK release:

Update to Shipping Discount Profiles Feature on API Version 505

In the Shipping Discount Profiles feature, changes to WSDL elements were made on API version 505. To use the Shipping Discount Profiles feature, please update your SDK to WSDL version 505 or later.

Method Fixed in GetCategoriesCall

Formerly, use of the getAllCategories method of the GetCategoriesCall wrapper class would result in a setting of the US category site ID in all cases. The wrapper class has been fixed to enable the correct category site ID to be set.

Database Sample Not Compatible with SDK Version 503 Point Release

The database sample (C:\Program Files\eBay\SDKInstallDir\samples\databaseSample) cannot be used with the version 503 point release of the SDK.

SDK Version 495 for Java Full Release

Recent API Feature Updates

The eBay SDK for Java contains updated wrapper classes, updated test cases, and other updates that facilitate your use of recent features of the API.

GetMyeBayCall Removed

The GetMyeBayCall wrapper class has been removed from the SDK due to deprecation of the underlying request/response elements in the schema. For more information about deprecated elements, please see the Versioning Strategy and Versioning Summary. Additionally, the GetMyeBay code has been removed from the Sanity Test suite and from the apiCallsDemo sample.

References to SiteHostedPicture and VendorHostedPicture Removed

The PictureDetails field replaced the SiteHostedPicture and VendorHostedPicture fields in the API. Therefore, references to SiteHostedPicture and VendorHostedPicture have been removed from the SDK. For information about when the PictureDetails field replaced the SiteHostedPicture and VendorHostedPicture fields, please see the Versioning Summary.

Eclipse Project Files Provided

If you choose the Eclipse environment for development with the eBay SDK for Java, you can use Project files provided with the SDK. For more information, please see the following: C:\Program Files\eBay\SDKInstallDir\DevEnvReadme.htm.

New and Updated Samples

The samples in the eBay SDK for Java now include a signinRedirect sample that generates a token for an end user. The new sample is located at C:\Program Files\eBay\SDKInstallDir\samples\signinRedirect. Additionally, four dialog boxes, including dialog boxes for use of GetCartCall and SetCartCall, have been added to the apiCallsDemo sample (C:\Program Files\eBay\SDKInstallDir\samples\apiCallsDemo).


Back to top

SDK Version 485 and Subsequent Point Releases

Control Payload Logging

You can use the new ExceptionFilter class to specify several types of logging. The ExceptionFilter class enables you to log exceptions, error codes, or HTTP status codes.

This new logging feature makes logging more useful and reduces the size of your logs. You can choose to log specific exceptions, specific API error codes, and specific HTTP status codes.

For an example of how to use the new ExceptionFilter class, please see the following sample: C:\Program Files\eBay\SDKInstallDir\source\SanityTest\src\com\ebay\sdk\sanitytest\testcases\SOAPError.java.

For more information and more sample code, please see the following Knowledge Base article: Enabling exception-based payload logging using the JAVA SDK.

Changes to Axis and to Core SDK Files for Performance Reporting

New enhancements can help you determine the time needed for each phase of a SOAP API call (client-side phases for encoding and decoding, network-transport phases, and server-side phase). The enhancements were made to Axis (C:\Program Files\eBay\SDKInstallDir\externalLib\axis-1_1\axis.jar) and to core SDK source files.

For an example of how to use the enhancements, see the PerfTest sample (C:\Program Files\eBay\SDKInstallDir\source\PerfTest), which, along with the Axis jar file, has been modified in this release. The changes to the PerfTest sample include removal of the HTTPSenderWithMetricsLogging class because metrics logging is now part of the customized Axis jar file delivered with the SDK.

Please note that a customized version of the Axis jar file must be used with the eBay SDK for Java. If you download or otherwise obtain a version of Axis 1.1, then you must follow the instructions in the source\axis_customization\axis_1_1 folder to build Axis 1.1.

AddMemberMessage Removed from WSDL

AddMemberMessage was removed from the WSDL on version 481. As previously announced, this call has been replaced by AddMemberMessageAAQToPartner, AddMemberMessageRTQ, and AddMemberMessagesAAQToBidder. For information about schema changes, please see the Trading API Release Notes (which contain tables showing the schema changes that occur every two weeks) at the Developer Documentation Center.


Back to top

SDK Version 479 and Subsequent Point Releases

Improvement of Sanity Test Suite

The reliability of the Sanity Test suite (under the Source\SanityTest folder) has been improved. You can use the Sanity Test suite for simple testing after you change code in the SDK.


Back to top

SDK Version 471 and Subsequent Point Releases

GetCharitiesCall Wrapper Class Fix

The GetCharitiesCall wrapper class has been fixed to no longer throw an exception based on whether an OverrideRequest property was set.

AddItem UUID Fix

In previous releases of the eBay SDK for Java, a request error could occur when AddItemCall.newUUID generated a UUID for use by your application. The request error occurred when the UUID included a '-' character generated by AddItemCall.newUUID. In the current release, this request error should not occur because AddItemCall.newUUID was changed to prevent generation of a '-' character.

StoresFixedPrice Tag To Be Obsolete

The StoresFixedPrice tag, currently available for international sites, will soon be obsolete. The 471 API schema released in late July contained additions to ItemTypeFilterCodeType that apply to searches with GetSearchResults and GetCategoryListings. The additions to ItemTypeFilterCodeType must be used instead of the StoresFixedPrice tag. For more information, please see the API Release Notes (which contain tables showing schema changes that occur every two weeks) at the Developer Documentation Center.


Back to top

SDK Version 465 and Subsequent Point Releases

Fix for IncludeFinalValueFee Input Property

Bugs have been fixed involving GetSellerTransactionsCall and GetAttributesXSLCall. Specifically, in GetSellerTransactionsCall, the IncludeFinalValueFee input property now properly determines whether to include final value fees in the response. In GetAttributesXSLCall, a null value no longer is returned when no detail level is specified.

Retry for HTTP errors

You can use the CallRetry class in the SDK to set up retry for calls in cases of 400- to 500-series HTTP errors (that is, HTTP application errors 400-499 and 501-599 from a web server). This addition to the CallRetry class includes a Get method and a Set method for a new exception (SdkHttpException) to capture such errors.

Patch for Change Affecting GetMemberMessagesRequestType

A patch has been incorporated into the SDK based on the change (with the 463 WSDL version) in the datatype of the StartCreationTime and EndCreationTime elements of GetMemberMessagesRequestType. The patch includes wrapper class updates in which java.util.Calendar replaces java.util.Date.

Change Affecting GetMemberMessagesRequestType

The 463 WSDL version introduced a backward-incompatible change in the datatype of the StartCreationTime and EndCreationTime elements of GetMemberMessagesRequestType; the elements are now based on xs:dateTime, not xs:date.


Back to top

SDK Version 459 and Subsequent Point Releases

Upgrade to J2SE 1.5

The eBay SDK for Java is updated for compatibility with J2SE 1.5.x (JDK 5.0). This enables applications to use more Java features and to benefit from improved performance. If you use J2SE 1.5.x (JDK 5.0), you must use Apache ANT 1.6 or later. For more information, see Post-Installation Configuration.

Changes to WSDL Elements Previously Based on ShippingServiceCodeType and ListingDurationCodeType

Due to changes to WSDL elements previously based on ShippingServiceCodeType and ListingDurationCodeType, SDK version 459 is backward-incompatible. Subsequent SDK releases are not backward-compatible with SDK versions based on a pre-457 WSDL version.

Integration Library Sample Renamed

The sample formerly called "integrationLibrary" and the folder containing it have been renamed to "databaseSample."


Back to top

SDK Version 447

Default Detail Level Changed

The default detail level has changed. This has a major impact on the data returned by calls that use detail levels, such as GetItemCall. Previous versions of the eBay SDK for Java set a default detail level of ReturnAll. Now, no detail level is set; the value is left as null. For general information about detail levels, see the latest Trading Web Services API Guide at the Developer Documentation Center

APISchemaBasedXMLPoster Class

The APISchemaBasedXMLPoster class enables you to post Trading API messages to the eBay API. Such messages comply with the Trading API but do not use a SOAP envelope or SOAP posting conventions (such as site ID in the URL). Note that the APISchemaBasedXMLPoster class does not support pure SOAP messages using a SOAP envelope or eBay SOAP API HTTP protocol conventions.

Sanity Test Suite for Simple Testing

You can use the Sanity Test suite for simple testing after you change code in the SDK. The source files are installed with the SDK. For information about running the Sanity Test suite, see Post-Installation Configuration.

More Information Provided About Runtime Exceptions

Based on customization of the version of Axis 1.1 delivered with the eBay SDK for Java, more information is provided by the SDK about exceptions during runtime. Now, information is provided about the tag involved.


Back to top

SDK Version 1.2.0

HTTP Compression

When you use the ApiCall class to execute a request to the eBay API, HTTP compression is on by default. A customized version of the Axis 1.1 library (axis.jar) is included in the SDK to provide the HTTP compression and improve the performance of Axis 1.1. The HTTP compression reduces the size of response data from the API by, on average, 90 percent. HTTP compression is especially advantageous for calls such as GetCategories that return large amounts of data. To turn HTTP compression off, call ApiCall.setEnableCompression and set the value to false.

Thread Safety in ApiCall Class

Using the ApiCall class of this eBay SDK for Java release to pass a SOAP API request object is the recommended thread-safe best practice for a Java application using the SOAP API. Additionally, doing so makes any Java application run in a thread-safe manner.

Performance Enhanced for Obtaining and Caching Bindings

Performance enhancements, related to obtaining and caching bindings, have been implemented.


Back to top

Installation Instructions

Please note that upgrades to an SDK should always be done in a test environment and fully tested before used in production.

  1. Decide which eBay SDK for Java download you will use (choose the zip file for Java Development Kit (JDK) 1.5.x or 1.4.x).

    These instructions assume JDK 1.5.x, so if you download JDK 1.4.x, then throughout this document, please replace "1.5" with "1.4" and replace "15" with "14".

    Please note that if you use JDK 1.5.x, you must use Apache ANT 1.6 or later.


  2. Download the zip file for the version of the eBay SDK for Java that you chose in step 1.


  3. Note the location of the zip file you downloaded, but before extracting the file, create the following folder: C:\eBayJavaSDK.


  4. Within C:\eBayJavaSDK, create an "SDKInstallDir" folder to contain the SDK files. You could name that folder according to the Trading API version of the SDK you are installing. For example, for the SDK for Trading API version 549, you could name the folder eBayJavaSDK549.


  5. Go the location of the zip file you downloaded (noted in step 3), and extract the zip file into the SDKInstallDir folder you created in step 4.


  6. To build the SDK, see Building the SDK.

Back to top

General Information for the eBay SDK for Java

Development Requirements
Development Environments and Compatibility
Post-Installation Configuration
SDK-Related Links
Building the SDK
Documentation
Known Issues
Included in the eBay SDK for Java
WSDL Locations
WSDL Updates
Supported Client Environments

Development Requirements


Back to top

Development Environments and Compatibility


Back to top

Post-Installation Configuration

  1. Install Apache ANT if it is not installed. Add the bin directory of your ANT installation to the PATH environment variable. If you use J2SE 1.5.x (JDK 5.0), you must use Apache ANT 1.6 or later.
    (If you prefer to use JDK 1.3 rather than 1.5.x or 1.4.x, you must first install the JSSE extension. For more information, see below.)
  2. Set the JAVA_HOME environmental variable to the J2SE 1.5.x directory, or the directory of a different JDK version (1.3 or 1.4).
  3. To facilitate your use of the SDK, you may want to add the following two values (or values appropriate to your JDK version) to the PATH environment variable, in this order: [j2sdk 1.5.x home directory]\bin and [j2sdk 1.5.x home directory]\jre\bin. You may want to add a path similar to the following to your CLASSPATH environment variable: [j2sdk 1.5.x home directory]\jre\lib\jsse.jar.
  4. If you have installed Jakarta Tomcat, set the TOMCAT_HOME environment variable to the Jakarta Tomcat location.
  5. In the eBay SDK for Java installation directory, run the following command: ant -buildfile sdkCodeGen.xml. Ant uses sdkCodeGen.xml to create SDK source code from a WSDL (by default the WSDL delivered with the SDK). Ant also uses sdkCodeGen.xml to compile all the SDK source code and create .jar files (ebaysdkcore.jar and ebaycalls.jar) for the SDK libraries.
  6. Advanced users can update the SDK as described in the WSDL Updates section below.
  7. Based on your current configuration and your development plans, decide whether to download the following third-party components. All components you decide to download should be put in folders under the externalLib folder:

Back to top

SDK-Related Links


Back to top

Building the SDK

In this section, you will use an ANT project file, sdkCodeGen.xml, to do the following:

To build the SDK, use the following steps:

  1. Review and follow all the steps in the Installation Instructions.


  2. Go to the SDKInstallDir described in the Installation Instructions.


  3. In SDKInstallDir, using a text editor, edit setjava15.bat so that JAVA_HOME is set to your main JDK folder.


  4. If you are using JDK 1.4.x, see the Installation Instructions. If you are using JDK 1.5.x, then in SDKInstallDir, open a command window and run setjava15.bat. This sets and appends necessary environment variables (i.e., it replaces JAVA_HOME and CLASSPATH, and it prepends PATH).
    After running setjava15.bat, go to step 5 without closing the command window.


  5. In the same command window, in SDKInstallDir, run the following command:
    ant -buildfile sdkCodeGen.xml.
    Ant uses sdkCodeGen.xml to create source code from a WSDL (by default the WSDL delivered with the SDK). Ant also uses sdkCodeGen.xml to compile SDK source code and create .jar files (such as ebaysdkcore.jar and ebaycalls.jar) for the SDK libraries.


  6. When a new WSDL is available, advanced users can use it to update the SDK:
    1. Read the Trading API Release Notes. The Release Notes contain changes for Trading API versions released after your current version. The Release Notes are located at the Developer Documentation Center.


    2. Optionally, download the new WSDL you want to use. For more information, see WSDL Locations.


    3. In sdkCodeGen.xml, on the line that sets the eBayWSDL property, set that property to the WSDL you want to use (local or web). By default, the eBayWSDL property is set to the WSDL that came with the SDK installation, and a commented-out line is set to a web version. To use a web version:
      1. Comment-out the line set to the local version.
      2. Remove the comment symbols around the line set to the web version.
      3. Specify a WSDL version number in the URL for the web version.

    4. At a command prompt, from ...\SDKInstallDir, run the following command:
      ant -buildfile sdkCodeGen.xml



Back to top

Documentation


Back to top

Known Issues


Back to top

Included in the eBay SDK for Java


Back to top

WSDL Locations

The WSDL is located at http://developer.ebay.com/webservices/Version/ebaySvc.wsdl.

Version in the URL means latest or it means a numerical version of a WSDL release (see the top of the particular WSDL file).

In the case of Version meaning latest, the WSDL is the latest released version (http://developer.ebay.com/webservices/latest/ebaySvc.wsdl). If Version in the URL means a numerical version of the WSDL, Version is a number (for example, http://developer.ebay.com/webservices/445/ebaySvc.wsdl).

Hypothetically, if the latest release of the WSDL were 449, you would find that WSDL version at both http://developer.ebay.com/webservices/latest/ebaySvc.wsdl and at http://developer.ebay.com/webservices/449/ebaySvc.wsdl.


Back to top

WSDL Updates


Back to top

Supported Client Environments

eBay has tested the eBay SDK for Java using the following client environments:

Note: You can use any integrated development environment (IDE) with the eBay SDK for Java, as long as it supports the above environments.


Back to top

© 2005 - 2008 eBay Inc. All rights reserved.