SapHanaTutorial.Com HOME     Learning-Materials Interview-Q&A Certifications Quiz Online-Courses Forum Jobs Trendz FAQs  
     Explore The World of Hana With Us     
About Us
Contact Us
 Apps
X
HANA App
>>>
Hadoop App
>>>
Tutorial App on SAP HANA
This app is an All-In-One package to provide everything to HANA Lovers.

It contains
1. Courses on SAP HANA - Basics, Modeling and Administration
2. Multiple Quizzes on Overview, Modelling, Architeture, and Administration
3. Most popular articles on SAP HANA
4. Series of Interview questions to brushup your HANA skills
Tutorial App on Hadoop
This app is an All-In-One package to provide everything to Hadoop Lovers.

It contains
1. Courses on Hadoop - Basics and Advanced
2. Multiple Quizzes on Basics, MapReduce and HDFS
3. Most popular articles on Hadoop
4. Series of Interview questions to brushup your skills
Apps
HANA App
Hadoop App
';
Search
Stay Connected
Search Topics
Topic Index
+
-
XSA Overview
+
-
XS Overview
+
-
Hello World Example
+
-
XS OData Service
+
-
HANA XSJS Service
+
-
Core Data Service
+
-
Others

.xsapp and .xsaccess files

In our previous article Create Your First HANA XS Application using HANA Studio  and Create Your First HANA XS Application using HANA Web-based Tool, we showed you how to create a Hello World application in HANA.

In both the examples, you must have seen that there are 2 files which gets created automatically .xsapp and .xsaccess. These 2 files are mandatory for any HANA XS project
In this article, we will explain the importance of these 2 files.

SAP HANA XS Application Descriptor (.xsapp):

Each application that you want to develop and deploy on SAP HANA XS must have an application descriptor file.
The application-descriptor file has no name and no content; it only has the file extension “xsapp”, for example, .xsapp. For backward compatibility, content is allowed in the .xsapp file but ignored.

The .xsapp file marks the root folder of an SAP HANA XS application. All files in that package (and any sub-packages) are available to be called via URL.
If you remove this .xsapp file from your HANA XS project, then you will not be able to call the project components via URL.

Example:
If the package sap.test contains the file .xsapp, the application will be available under the URL
http://<host>:<port>/sap.test/


SAP HANA XS Application Access File (.xsaccess):

The application-access (.xsaccess) file enables you to specify who or what is authorized to access the content exposed by the application package and what content they are allowed to see.

The application-access file does not have a name before the dot (.); it only has the file extension .xsaccess. The contents of the .xsaccess file must be formatted according to JavaScript Object Notation (JSON) rules.

Example of .xsaccess file:
{
"exposed" : true,
"authentication" : { "method" : "Form"}
}

Important points about .xsaccess file:
  • The settings specified in an .xsaccess file apply not only to the package the .xsaccess file belongs to but also any sub-packages lower in the package hierarchy.
  • Multiple .xsaccess files are allowed, but only at different levels in the package hierarchy.
  • You cannot place two .xsaccess files in the same package.
  • The settings specified in an .xsaccess file in a sub-package take precedence over any settings specified in a .xsaccess file higher up the package hierarchy.

Continue reading:



Support us by sharing this article.



Explore More
Close X
Close X

2 thoughts on “SAP HANA XS – .xsapp and .xsaccess files

  1. Chandrakant says:

    Kindly send me such hana article if you add in your website. I will check your website for such article.

    • Admin says:

      Hello Chandrakant,

      We couldnt understand your question.Please let us know whats your question

      Thanks
      Admin

Leave a Reply

Your email address will not be published. Required fields are marked *

Current day month ye@r *

 © 2017 : saphanatutorial.com, All rights reserved.  Privacy Policy