REST configuration properties in the component configuration file (wc-component.xml)
The component configuration file (wc-component.xml) contains properties to configure various REST features.
WebSphere Commerce EAR
The following table summarizes the REST-related properties found in the foundation component configuration file on the WebSphere Commerce server. Refer to the comments within the file for more details:
Section Purpose of properties in this section Timeout settings
- RemoteRestRequestConnectTimeout
- The timeout value used to create an HTTP connection from the search server to the WebSphere Commerce server for REST requests.
- RemoteRestRequestReadTimeout
- The timeout value used to terminate a REST request from the search server to the WebSphere Commerce server.
Local binding
- RESTinLocalBindingEnabled
- Determines whether local binding is enabled for REST requests.
- RESTinLocalBindingPathPrefix
- The path prefixes used for REST local binding requests, separated by a comma.
- RESTinLocalRemoteBindingExceptionsEnabled
- Determines whether exceptions that are thrown from REST requests are propagated to the calling JSP files and reflected in the storefront.
- Default is true.
Support cookies for authorization
- AuthenticationAllowedUsingCookies
- If set to true, REST calls are allowed to consume request cookies to identify the user. The cookies are used only if the REST tokens are not present.
- Default is true.
Search EAR
The following table summarizes the REST-related properties found in the foundation component configuration file on the search server. Refer to the comments within the file for more details:
Section Purpose of properties in this section Timeout settings
- RemoteRestRequestConnectTimeout
- The timeout value used to create an HTTP connection from the search server to the WebSphere Commerce server for REST requests.
- RemoteRestRequestReadTimeout
- The timeout value used to terminate a REST request from the search server to the WebSphere Commerce server.
SSL Acceleration
- SSLAcceleratorOption
- Indicates whether to bypass the SSL secure check.
- The accepted values are Enabled or Disabled.
- Default is Disabled, where the SSL secure check is not bypassed.
- inSSLPort
- Indicates a specific port number to bypass the SSL secure check.
- Default is port 443.
Support cookies for authorization
- AuthenticationAllowedUsingCookies
- If set to true, REST calls are allowed to consume request cookies to identify the user. The cookies are used only if the REST tokens are not present.
- Default is true.
- Changing REST configuration properties in the component configuration file (wc-component.xml)
To change any properties in the component configuration file (wc-component.xml) for REST, we must create a customized version of the file in a new folder. The customized version of the file must contain only the changed properties.- Preview for RESTful applications
The web services framework and REST services framework can leverage the use of preview tokens to allow business users the ability to preview content in RESTful applications outside of the store's web module. For example, we can make customizations for our Android smartphone native reference application to preview actions in your application with the preview options specified in the preview token.- Preview tokens
A preview token is an encrypted string that encapsulates a set of preview options and restrictions on when and where the token can be used. Any user who is authorized to access your server and has the preview token, can perform preview actions in the same store that the token is generated, with the preview options specified.- Enable preview support for RESTful applications
If we are using REST services and customizing a service client to preview content, modify the WebSphere Commerce configuration file to enable <ServicesPreview>. Enabling services preview allows your service client to connect to the WebSphere Commerce server to process BOD and REST service requests and responses with a preview token.