Enabling preview support for RESTful applications

If you are using REST services and customizing a service client to preview content, you must modify the HCL Commerce configuration file to enable <ServicesPreview>. Enabling services preview allows your service client to connect to the HCL Commerce server to process BOD and REST service requests and responses with a preview token.

Enabling services preview also enables preview token generation requests to be processed; otherwise, the following error message will be returned from REST:
Services preview support is not enabled.

About this task

Preview support for RESTful applications is enabled by default in HCL Commerce Version 8. Complete this task if you have previously disabled this feature within the WebSphere Commerce configuration file.

Procedure

  1. Open the HCL Commerce configuration file
  2. Within the <InstanceProperties> tag, add the following code:
    <ServicesPreview enable="true"/>
  3. HCL Commerce Developer Republish the HCL Commerce application.

What to do next

Package your changes to the HCL Commerce configuration file for deployment.