Work with Web service feeds
WebSphere Commerce provides a RESTful framework that supports Web service feeds. Your site can use feeds to syndicate store information so customers can access that information on Web sites external to WebSphere Commerce. For example, you can let customers subscribe to a feed from an e-Marketing Spot that displays the Deal of the Week. In addition, WebSphere Commerce remote widgets display feed content to customers using this RESTful framework.
- Overview of the RESTful Web service framework for feeds
WebSphere Commerce provides a framework to retrieve information from WebSphere Commerce Web services and return the information as a feed. Remote widgets use this RESTful framework to retrieve feed data for display in e-Marketing Spot widgets, wish list widgets, and gift registry widgets. You can customize the framework to retrieve a feed from a WebSphere Commerce Web service you choose.
- URL structure for Web service feeds
URLs that retrieve feeds from WebSphere Commerce Web services must follow a specific structure. Remote widgets for e-Marketing Spots, wish lists, and gift registries retrieve feeds using these URLs. If you are creating a custom feed from a Web service, use this URL structure in the customization. The URL structure adheres to the principles of REST (Representational State Transfer).
- Feed formatting JSP files for Atom feeds
The WebSphere Commerce RESTful framework uses JSP files to format the content of an Atom feed. These JSP files control the images and text to include in the Atom feed, and perform some additional feed configuration functions. When a feed reader or widget initiates a request to display a feed, the RESTful framework uses these feed formatting JSP files to convert the service data object (SDO) to an Atom feed.
- Changing the content and configuration of an Atom feed for remote widgets
If the default feed formatting JSP files for e-Marketing Spots, wish lists, and gift registries do not meet the business needs, you can create a custom set. By customizing these files, you have more control over the feed data available for display in remote widgets and feed readers. For example, you can change the number of feed entries to include in the feed, or add additional pieces of store data to the feed, if the data is available from the Web service. When you have completed the customization, register the top-level feed formatting JSP file in a Struts configuration file.
- Pass custom parameters to an e-Marketing Spot Atom feed
If the default parameters supported for Web service feed URLs do not meet the needs, you can define custom parameters.To do so, extend the Java class that handles Atom feeds for the MarketingSpotData noun. By customizing the business logic in the class, you can pass custom parameter values directly to the marketing services.
- Create a custom feed from a Web service
You can customize WebSphere Commerce to retrieve a feed from any existing WebSphere Commerce Web service or from a custom Web service you have created. You can display the feed in a Web widget embedded on a Web site external to WebSphere Commerce. Alternatively, you can let customers subscribe to the feed from the storefront. For example, to offer customers a feed that lists new products from the store, you could create a custom Atom feed from the Get Catalog Web service for the New Products catalog. You can then publish the URL for the feed on the storefront so customers can subscribe to the feed and view the new products in their favorite feed reader. WebSphere Commerce provides a RESTful framework that supports this customization scenario.
Related concepts
Related reference
URL structure for Web service feeds