Hi all,
I'm trying to develop a xml/a web client application via SAP/HANA xs technology.
To do this I created a SAP/HANA project in HANA studio. The root package of my project is
system-local.public.rbouman.HXmla
In the root package, I created an empty .xsapp file, and a .xsaccess file like so:
{ "exposed" : true, "authentication" : { "method": "Form" }, "cache_control" : "must-revalidate", "cors" : { "enabled" : false }, "enable_etags" : false, "force_ssl" : false, "prevent_xsrf" : false
}
Also in the root package I created a .xsxmla file like so:
service {*}
Inside the project I have a models folder that contains my attribute (.attributeview) and analytical views (.analyticview) - these are the objects that I would like my application to access.
Finally, my project also contains a ui folder where my web application resources (css files, html, javascript, assets) reside. Among the javascript resources is a javascript library that can send and consume XML/A requests which my application uses to get XML/A metadata, and send MDX requests
My application does an initial DISCOVER_DATASOURCES request by posting to http://54.154.56.127:8010/system-local/public/rbouman/HXmla/xsxmla.xsxmla with the following payload:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body> <Discover xmlns="urn:schemas-microsoft-com:xml-analysis" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <RequestType>DISCOVER_DATASOURCES</RequestType> <Restrictions> <RestrictionList> </RestrictionList> </Restrictions> <Properties> <PropertyList> <Format>Tabular</Format> </PropertyList> </Properties> </Discover></SOAP-ENV:Body></SOAP-ENV:Envelope>
This works - I get a response describing the datasource (only relevant part of response shown):
<row> <DataSourceName>HANA</DataSourceName> <DataSourceDescription>SAP HANA</DataSourceDescription> <URL>http://54.154.56.127:8010/system-local/public/rbouman/HXmla/xsxmla.xsxmla</URL> <DataSourceInfo/> <ProviderName>HANA</ProviderName> <ProviderType>MDP</ProviderType> <AuthenticationMode>Integrated</AuthenticationMode></row>
Now, I do a DISCOVER request of the type DBSCHEMA_CATALOGS against this datasource, like so:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body> <Discover xmlns="urn:schemas-microsoft-com:xml-analysis" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <RequestType>DBSCHEMA_CATALOGS</RequestType> <Restrictions> </Restrictions> <Properties> <PropertyList> <DataSourceInfo></DataSourceInfo> <Format>Tabular</Format> </PropertyList> </Properties> </Discover></SOAP-ENV:Body></SOAP-ENV:Envelope>
This "works" too, but with an unexpected result, since basically every package that contains at least one analytical view is returned in the response - even if those views are in packages that are outside my application package. Here's just the first couple of rows returned in the response, the actual list is much longer:
<row> <CATALOG_NAME>eim361</CATALOG_NAME> <DESCRIPTION>eim361</DESCRIPTION></row><row> <CATALOG_NAME>sap.bc.epm.oia.apps</CATALOG_NAME> <DESCRIPTION>sap.bc.epm.oia.apps</DESCRIPTION></row><row> <CATALOG_NAME>sap.bc.epm.oia.dfg</CATALOG_NAME> <DESCRIPTION>sap.bc.epm.oia.dfg</DESCRIPTION></row><row> <CATALOG_NAME>sap.bc.epm.oia.dfg.perf</CATALOG_NAME> <DESCRIPTION>sap.bc.epm.oia.dfg.perf</DESCRIPTION></row><row> <CATALOG_NAME>sap.bc.epm.oia.misc</CATALOG_NAME> <DESCRIPTION>sap.bc.epm.oia.misc</DESCRIPTION></row><row> <CATALOG_NAME>sap.bw</CATALOG_NAME> <DESCRIPTION>sap.bw</DESCRIPTION></row><row> <CATALOG_NAME>sap.hana.democontent.epm.models</CATALOG_NAME> <DESCRIPTION>sap.hana.democontent.epm.models</DESCRIPTION></row><row> <CATALOG_NAME>sap.hana.democontent.epm.spatial.models</CATALOG_NAME> <DESCRIPTION>sap.hana.democontent.epm.spatial.models</DESCRIPTION></row><row> <CATALOG_NAME>sap.hana.democontent.epmNext.models</CATALOG_NAME> <DESCRIPTION>sap.hana.democontent.epmNext.models</DESCRIPTION></row><row> <CATALOG_NAME>sap.hana.democontent.epmNext.spatial.models</CATALOG_NAME> <DESCRIPTION>sap.hana.democontent.epmNext.spatial.models</DESCRIPTION></row><row> <CATALOG_NAME>system-local.bw.bw2hana</CATALOG_NAME> <DESCRIPTION>system-local.bw.bw2hana</DESCRIPTION></row>
... many more rows...<row> <CATALOG_NAME>system-local.public.rbouman.HXmla.models</CATALOG_NAME> <DESCRIPTION>system-local.public.rbouman.HXmla.models</DESCRIPTION></row>
...many more rows...<row> <CATALOG_NAME>workshop.solution.models</CATALOG_NAME> <DESCRIPTION>workshop.solution.models</DESCRIPTION></row>
As you can see, packages are mapped to XML/A catalogs. Some where in the list I find "my" package ( one before last row shown above). I actually expected that to be the only catalog I would see, but for some reason I get to see everything. To be sure, when I use all these catalogs in subsequent DISCOVER requests of the type MDSCHEMA_CUBES, I actually get valid responses too and I get to see all the cubes - everybody's stuff.
My first question is, how can I prevent that? Surely it is not desirable that creating one .xsxmla service definition somewhere on the system results a peek in all packages on the server?
It gets weirder when I repeat the DISCOVER request for DBSCHEMA_CATALOGS: the second time around, I only get the last row - that is, in the response shown above, the row for workshop.solution.models
The second question I have is, why do I get a different result the second time? My requests are identical.