Setting Up an HTTP Server for OData

You can set up either the embedded HTTP server or your own HTTP server for OData operations.

Take security measures into consideration when you set up an HTTP server.

Decide whether you are setting up an embedded HTTP Server or an alternate HTTP server. If you choose:
Server TypeSteps
Embedded HTTP server

The SAP Sybase OData Server utility initiates an instance of the embedded HTTP server and automatically loads the OData Producer as a Java servlet.

You cannot manually configure the embedded HTTP server, or use it to serve other non-OData content, such as HTML files. However, you can specify some HTTP server options in the OData Server configuration file.

To set up and launch the embedded HTTP server:
  1. Create an OData Server configuration file that contains the settings for both the OData Producer and the embedded HTTP server.
  2. Store the configuration file on the computer that acts as the HTTP server, then load the configuration file when you run the OData Server utility at a command prompt.
Alternate HTTP server

To use the OData Producer with an alternative HTTP server, you must deploy the OData Producer to the server. You must run the OData Producer as a Java servlet that can be loaded into an HTTP server. For example, you can use Tomcat as a Java servlet container and pair it with an Apache HTTP server.

Note: IIS (Internet Information Services, the Microsoft Web server) cannot execute Java servlets, but you can configure a connector that redirects servlet requests from an IIS server to another server that is able to run them.

The process of deploying the OData Producer differs depending on your HTTP server. For more information, see your HTTP server documentation.

  1. Create an OData Server configuration file.

    Any configuration options that are specific to the embedded HTTP server, including security considerations, are not applied to the alternative HTTP server.

    The OData Producer respects the logging configuration of the HTTP server. For more information about HTTP server logging, see your HTTP server documentation.

  2. Copy the following the OData Server configuration file (server.properties) to the lib directory of your Web application server, along with the following files from your Adaptive Server installation.
    On UNIX:
    • $SYBASE/jConnect-7_0/classes/jconn.jar
    • $SYBASE/ODATA-16_0/classes/dbodata.jar
    On Windows:
    • %SYBASE%\jConnect-7_0\classes\jconn.jar
    • %SYBASE%\ODATA-16_0\classes\dbodata.jar
  3. Load the SAPSybaseODataServlet class, which implements the J2EE.
Related tasks
Configuring OData Server
Starting and Stopping OData Server