28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.1.9 OData Service-Definition Examples<br />

The OData service definition describes how data exposed in an end point can be accessed by clients using the<br />

OData protocol.<br />

Each of the examples listed below is explained in a separate section. The examples show how to use the OData<br />

Service Definition Language (OSDL) in the OData service-definition file to generate an operational OData service<br />

that enables clients to use <strong>SAP</strong> <strong>HANA</strong> XS to access the OData end point you set up.<br />

● Empty Service<br />

● Namespace Definition<br />

● Object Exposure<br />

● Property Projection<br />

● Key Specification<br />

● Associations<br />

● Aggregation<br />

● Parameter Entity Sets<br />

OData Empty Service<br />

An OData service for <strong>SAP</strong> <strong>HANA</strong> XS is defined by a text file containing at least the following line:<br />

Service definition sample.odata:empty.xsodata<br />

service {}<br />

A service file with the minimal content generates an empty, completely operational OData service with an empty<br />

service catalog and an empty metadata file:<br />

http://localhost:8002/sample/odata/empty.xsodata<br />

http://localhost:8002/sample/odata/empty.xsodata/$metadata<br />

188<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Defining Web-based Data Access

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!