Configuring REST endpoints

If you have a stand-alone server environment, Representational State Transfer (REST) endpoints are configured and enabled automatically. For other environments, you must use the WebSphere® Application Server administrative console to configure the REST endpoints.

About this task

The steps in this task show you how to change the REST service endpoint for the widgets contained in the templates supplied with WSRR.

Note:
  • If you update your Business Space widgets, the endpoints are reset to their default values and you have to set up the REST endpoints again.
  • You can have only one instance of Business Space in a cell. If you have several instances of WSRR in a cell, you must configure the REST endpoints to identify the WSRR instance that your widgets connect to.
  • Users that previously accessed Business Space by using a web browser might have old endpoints stored in the browser cache. After you update the REST endpoints, Business Space might not function correctly and might report widget errors that refer to the old endpoint URLs. To fix this issue, ensure that each user clears the browser cache.

Procedure

  1. Open the WebSphere Application Server administrative console in a browser.
  2. Click Resources > Resource Environment > Resource Environment Providers > Mashups_Endpoints > Custom properties .
  3. Click the name of the required property. You need to edit the following properties:
    • {com.ibm.sr.bspace}WSRRServerId.url.
    • {com.ibm.sr.bspace}WSRRServerFeedsId.url.
    • {com.ibm.sr.bspace}WSRRReportViewer.url.
    • {com.ibm.sr.bspace}BIRTReport.url
  4. Change the value of the property by prefixing the protocol, target hostname, and port, as follows:
    • For the {com.ibm.sr.bspace}WSRRServerId.url property, change the value to
      protocol://hostname:port/WSRR/
    • For the {com.ibm.sr.bspace}WSRRServerFeedsId.url property, change the value to
      protocol://hostname:port/ServiceRegistryFeeds/WSRR/
    • For the {com.ibm.sr.bspace}WSRRReportViewer.url property, change the value to
      protocol://hostname:port/WSRRReportViewer/
    • For the {com.ibm.sr.bspace}BIRTReport.url property, change the value to
      protocol://hostname:port/ServiceRegistryBIRTReport/

    where protocol is http for an unsecure server or https for a secure server, hostname is the hostname of the WSRR server, and port is the value of the unsecure or secure port on the server.

    If you have multiple instances of WSRR deployed, you must identify the instance to use by specifying its prefix, for example:
    http://hostname:port/prefixWSRR
    http://hostname:port/prefixServiceRegistryFeeds/WSRR
    Where prefix is the WSRR Instance Prefix that you specified when you created the instance.
  5. Click OK.
  6. Click Save.
    Tip: To locate the port number for the server, perform the following steps
    1. Log in to the administrative console.
    2. Click Servers > Server Types > WebSphere application servers
    3. Click the server for which you want to find the port number, and then expand the Ports section.
    All applications use the same port as shown in either the wc_defaulthost (unsecured host) parameter or the wc_defaulthost_secure (secure host) parameter.
    Note:
    • If you are using an HTTP server to access your web modules for load balancing, use the host name and port settings of the HTTP server.
    • If your server is setup to be secure then be sure to use https as the "protocol" and the secure port number as the "port" in the endpoint otherwise security issues might occur when using the widgets.

What to do next

To enable Business Space for your runtime environment, you must complete the following steps after configuring Business Space from the command line.

You can verify that WSRR is listening on the specified endpoints. Use a web browser to access the following URL:

protocol://hostname:port/WSRR/

Where protocol is http for an unsecure server, or https for an unsecure server. hostname is the hostname of the WSRR server. port is the secure or unsecure port for the server.

The response displays the version information for WSRR, for example:

<system>
<property name="builddate" 
value="20111112-2014"/>
<property name="iteration" value="8.0"/>
<property name="version" value="8.0.0.0"/>
</system>
Note: If you try to connect to a secure WSRR using the http protocol, the web browser redirects to the correct https URL. However, Business Space does not redirect. When verifying the endpoints, check whether WSRR is accessed on a secure or unsecure connection, so that you can specify the correct protocol when using Business Space.