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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note: The application-descriptor file has no contents and no name; it only has the file extension “xsapp”,<br />

for example, .xsapp. For backward compatibility, content is allowed in the .xsapp file but ignored.<br />

The application descriptor file performs the following operations:<br />

● Determines the called application<br />

The application root is determined by the package containing the .xsapp file. If the package sap.test<br />

contains the file .xsapp, the application will be available under the URL http://:/<br />

sap.test/.<br />

4.4.2 Create an Application Descriptor File<br />

Each application that you want to develop and deploy on <strong>SAP</strong> <strong>HANA</strong> Extended Application Services (<strong>SAP</strong> <strong>HANA</strong><br />

XS) must have an application-descriptor file. The application descriptor is the core file that you use to describe an<br />

application's framework within <strong>SAP</strong> <strong>HANA</strong> XS.<br />

The package that contains the application-descriptor file becomes the root path of the resources exposed by the<br />

application you develop.<br />

1. Create a root package for your application, for example, helloxsjs.<br />

2. Create an application descriptor for your application and place it in the root package you created in the<br />

previous step.<br />

The application descriptor is the core file that you use to describe an application's availability within <strong>SAP</strong><br />

<strong>HANA</strong> Extended Application Services. The application-descriptor file has no contents and no name; it only has<br />

the file extension .xsapp..<br />

Note: For backward compatibility, content is allowed in the .xsapp file but ignored.<br />

3. Save and activate your changes and additions.<br />

4.4.3 The Application-Access File<br />

<strong>SAP</strong> <strong>HANA</strong> XS enables you to define access to each individual application package that you want to develop and<br />

deploy.<br />

The application-access file enables you to specify who or what is authorized to access the content exposed by a<br />

<strong>SAP</strong> <strong>HANA</strong> XS application package and what content they are allowed to see. For example, you use the<br />

application-access file to specify if authentication is to be used to check access to package content and whether if<br />

rules are in place for the exposure of target and source URLs.<br />

The application-access file does not have a name; it only has the file extension .xsaccess. The content of<br />

the .xsaccess file is formatted according to JSON rules and is associated with the package it belongs to as well<br />

as any subpackages lower in the package hierarchy. Multiple .xsaccess files are allowed, but only at different<br />

levels in the package hierarchy. This enables you to specify different application-access rules for individual<br />

packages and subpackages in the package hierarchy.<br />

Note: You cannot place two .xsaccess files in the same package. Furthermore, the rules specified in<br />

a .xsaccess file that is associated with a subpackage take precedence over any rules specified in<br />

a .xsaccess file associated with any parent package higher up the package hierarchy.<br />

The application-access file performs the following operations:<br />

● Data exposure<br />

50<br />

Use the exposed keyword to specify if package content is to be exposed to client requests via HTTP.<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 />

Setting Up Your Application

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

Saved successfully!

Ooh no, something went wrong!