on 07-08-2014 11:04 AM
Hello All,
whenever i m trying to access .xsodata service, its redirecting to sap account page.
instead of this is it possible to take username and password from popup, and then it will display data directly.
i don't want to redirect to sap account page again n again.
and yes i don't want to remove the authentication part from odata service.
Is this on the HANA Cloud Platform? If so they set the OAuth authorization to be the default at the system level. Have you tried changing the values of the XSACCESS file for this package and changing the authentication to just Form or Basic?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
we are new in Hana.
can u help us how to access XSAdmin tool. ??
yes .xsaccess and .xsodata files are in the project folder only. not in specific folder.
we haven't done anything in security setup of HCP.
we want to consume authorized odata service( using .xsodata) in sap ui5. can u help us to implement this.
>can u help us how to access XSAdmin tool.
The http path is /sap/hana/xs/admin
>we haven't done anything in security setup of HCP.
Nor would you be able to since you are using the trial system which is multi-tenant. All system configuration is already set for you.
>we want to consume authorized odata service( using .xsodata) in sap ui5. can u help us to implement this.
Are you running the UI5 application from the same HANA system? If so when you authorize the web page, you won't need to do anything extra to call the service. The same authentication will automatically be used.
Hi Thomas,
Yes we are running the UI5 application and HANA from the same system,
When we try to get the odata services with basic auth , it is redirecting to the sap login page (HTML) even if we are logged in a different tab to the scn account
we are calling like this
var oModel2 = new sap.ui.model.odata.ODataModel("proxy/https/s3hanaxs.hanatrial.ondemand.com/pxxxxxxxxtrial/dev/test/projects.xsodata/LISTS", false, "username" , "password"
and in the console we get the error
The following problem occurred: Invalid metadata document200,OK, <!DOCTYPE html><html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
and the full html page
Also in the trial instance how will the path of xsadmin be?
the application path is
https://s3hanaxs.hanatrial.ondemand.com/pxxxxxtrial/dev/test/
If the XSODATA service and the UI5 are coming from the same HANA system then you shouldn't use an absolute URL or the proxy to call it. Just use a relative URL like so: /pxxxxxxxxtrial/dev/test/projects.xsodata/LISTS
>
Also in the trial instance how will the path of xsadmin be?
the application path is
https://s3hanaxs.hanatrial.ondemand.com/pxxxxxtrial/dev/test/
no I don't believe so. /pxxxxxxxxtrial/dev/test/ is where your content is running from. However XSADMIN and Web IDE are tools installed centrally and not specific your development part of the repository.
Thank you,
but when i try publishing the ui5 app from eclipse, it is deployed in a url
https://testp1xxxrial.hanatrial.ondemand.com/pxxxxxxtrial
while my xs app is at
https://s3hanaxs.hanatrial.ondemand.com/pxxxxxtrial/dev/test/
so UI5 app gives a 404 error
By publishing i meant the run,
So how i did is
First activate the app
Selected Run As > Run on Server
Select the checkbox Manually define a new server > SAP HANA Cloud Platform
Then entered the app name and account information
And it runs the app in the url
https://testp1xxxrial.hanatrial.ondemand.com/pxxxxxxtrial
where test is the app name i entered
Thank you, i was doing it wrong, i was trying Run as on the project instead of the file.
But now when i try to run the index.html as html i am getting a 404 error
the url generated is
s3hanaxs.hanatrial.ondemand.com/pxxxxxxtrial/dev/ui5test/WebContent/index.html
And in the hana cockpit, my xs apps are listed but in HTML5 tab, my UI5 apps are not listed ,
Yes the url is correct
my xs app works
https://s3hanaxs.hanatrial.ondemand.com/pxxxxxtrial/dev/test
here
and the ui5 is https://s3hanaxs.hanatrial.ondemand.com/pxxxxxxtrial/dev/ui5test/WebContent/index.html
here
but when i run in my local host the url is only
localhost:8873/testUI5/
and shows the app
oops sorry bringing the confusion,
The XS app is working , it has the xsodata which i can access with a rest client and get the data.
which can be accessed from this url
https://s3hanaxs.hanatrial.ondemand.com/pxxxxxtrial/dev/test/projects.xsodata/LISTS
The problem is with the UI5 app
which i try to Run as HTML , it runs at this link
s3hanaxs.hanatrial.ondemand.com/pxxxxxxtrial/dev/ui5test/WebContent/index.html
and i am getting 404 error
I had the xsaccess and xsapp files in the /dev/test, so i added the same in /dev/ui5test
so my xsaccess file is now like this
{
"exposed" : true,
"authentication" : [{"method":"Basic"}],
"cors" : {"enabled" : true}
}
Now when i run the index.html file its coming but now a new error, it says
https://s3hanaxs.hanatrial.ondemand.com/resources/sap-ui-core.js
is 404
In the sap ui5 app index.html its
<script src="/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.ux3,sap.ui.commons,sap.ui.table"
data-sap-ui-theme="sap_goldreflection">
</script>
Thanks a lot, it fixed that problem
Now i have one more, hope it would be the last
The odata url i am giving is
/pxxxxxtrial/dev/test/projects.xsodata/LISTS
But when i check the browser console its showing that its calling
/pxxxxxtrial/dev/test/projects.xsodata/LISTS/$metadata
and that /$metadata is causing a 400 bad request
Hi, i am having one more issue now
So the previous case UI app and XS app was on the same system and it worked
Now i am creating a html phonegap app which should receive data from the xsodata and display
So i am facing the same authentication and redirection issue
How can i solve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am facing the same issue. I have created a UI5 app in HCP ( Hana trial account ) and trying to consume xsodata. In the Chrome console i see that when the UI5 app tries to fetch the $metadata it gets redirected to 'https://account.sap.com/......." with an error message - ' which is disallowed for cross-origin requests that require preflight'.
Has anyone of you got a solution for this ?
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.