Administration guide > Configure the deployment environment > Configuring the REST data service
Install the REST data service
This topic describes how to install the WebSphere eXtreme Scale REST data service into a Web server.
Before you begin
Software requirementsTheeXtreme Scale REST data service is a Java™ Web application that can be deployed to any application server that supports Java servlet specification, v2.3 and a Java runtime environment, Version 5 or later.
The following software is required:
- Java Standard Edition 5 or later
Restriction: Although eXtreme Scale supports Java Standard Edition 1.4 or later, the REST data service requires Java Standard Edition 5 or later.
- Web servlet container, v2.3 or later, which includes one of the following:
- WebSphere Application Server v6.1.0.25 or later
- WebSphere Application Server v7.0.0.5 or later
- WebSphere Community Edition v2.1.1.3 or later
- Apache Tomcat v5.5 or later
- eXtreme Scale, Version 7.1 or later, including the trial.
The eXtreme Scale REST data service includes a single WAR file wxsrestservice.war. The wxsrestservice.war file includes a single servlet that acts as a gateway between the WCF Data Services client applications or any other HTTP REST client and an eXtreme Scale grid.
The REST data service includes a sample that allows you to quickly create an eXtreme Scale grid and interact with it using an eXtreme Scale client or the REST data service. See REST data services sample and tutorial for details on using the sample.
When eXtreme Scale 7.1 is installed or the eXtreme Scale Version 7.1 trial is extracted, the following directories and files are included:
- restservice_home/lib
The lib directory contains these files:
- wxsrestservice.ear – The REST data service enterprise application archive for use with WAS and WAS CE.
- wxsrestservice.war – The REST data service web module for use with Apache Tomcat.
The wxsrestservice.ear file includes the wxsrestservice.war file and are both tightly coupled with the WebSphere eXtreme Scale runtime. If eXtreme Scale is upgraded to a new version or a fix pack applied, the wxsrestservice.war file or wxsrestservice.ear file will need to be manually upgraded to the version installed in this directory.
- restservice_home/gettingstarted
The gettingstarted directory contains a simple sample that demonstrates how to use the eXtreme Scale REST data service with an eXtreme Scale grid.
Procedure
Package and deploy the REST data service.
The REST data service is designed as a self-contained WAR module. To configure the REST data service, first package the REST data service configuration and optional eXtreme Scale configuration files into a JAR file or directory. This application packaging is then referenced by the web container server runtime. The following diagram illustrates files used by the eXtreme Scale REST data service.
Figure 1. WebSphere eXtreme Scale REST Data Service Files
![]()
The REST service configuration JAR or directory must contain the following file:
wxsRestService.properties: The wxsRestService.properties file includes the configuration options for the REST data service. This includes the catalog service endpoints, ObjectGrid names to expose, trace options and more. See REST data service properties file.
The following ObjectGrid client files are optional:
- META-INF/objectGridClient.xml: The ObjectGrid client override XML file is used to connect to the remote eXtreme Scale grid. By default this file is not required. If this file is not present, the REST service uses the server configuration, disabling the near cache.
The name of the file can be overridden using the objectGridClientXML REST data service configuration property. If provided, this XML file should include:
- Any ObjectGrids that to expose to the REST data service.
- Any reference to the entity descriptor XML file associated with each ObjectGrid configuration.
- META-INF/entity descriptor XML files: One or more entity descriptor XML files are required only if the client needs to override the entity definition of the client. The entity descriptor XML file must be used in conjunction with the ObjectGrid client override XML descriptor file. .
- Entity classes Annotated entity classes or an entity descriptor XML file can be used to describe the entity metadata. The REST service only requires entity classes in the classpath if the eXtreme Scale servers are configured with entity metadata classes and a client override entity XML descriptor is not used.
An example with the minimum required configuration file, where the entities are defined in XML on the servers:
restserviceconfig.jar: wxsRestService.properties
The property file contains:
catalogServiceEndPoints=localhost:2809 objectGridNames=NorthwindGrid
An example with one entity, override XML files and entity classes:
restserviceconfig.jar: wxsRestService.properties
The property file contains:
catalogServiceEndPoints=localhost:2809 objectGridNames=NorthwindGrid
com/acme/entities/Customer.class META-INF/objectGridClient.xml
The client ObjectGrid descriptor XML file contains:
<objectGrid name="CustomerGrid" entityMetadataXMLFile="emd.xml"/> META-INF/emd.xml
The entity metadata descriptor XML file contains:
<entity class-name="com.acme.entities.Customer" name="Customer"/>
- Deploy the REST data service on WAS
This topic describes how to configure the WebSphere eXtreme Scale REST data service on WebSphere Application Server orWebSphere Application Server Network Deployment v6.1.0.25 or later. These instructions also apply to deployments whereWebSphere eXtreme Scale is integrated with the WebSphere Application Server deployment.
- Deploy the REST data service on WAS Community Edition
This topic describes how to configure the eXtreme Scale REST data service on WebSphere Application Server Community Edition v2.1.1.3 or later.
- Deploy the REST data service on Apache Tomcat
This topic describes how to configure theWebSphere eXtreme Scale REST data service on Apache Tomcat v5.5 or later.
Parent topic:
Configure the REST data service
Related tasks
Administer the REST data service
Configure the REST data service
Deploy the REST data service on WAS
Deploy the REST data service on WAS Community Edition
Deploy the REST data service on Apache Tomcat
Related reference
REST data service properties file