Showing results for 
Search instead for 
Did you mean: 

How can local application access xsodata services exposed on the hana cloud platform?

Former Member
0 Kudos

I'm developing an sapui5 application. Another colleague is developing some xsodata services and have deployed them onto the hana cloud platform.

Now I'm hosting my application locally on tomcat. So I've configured the odata model url to the correct xsodata service.( Actually I've configured a simple servlet to reverse proxy my request to hcp, I don't know if it's necessary, if not doing that, I think there will be cross origin issues ). But when I open the application. there's always the error: invalid meta data , because every time the odata request sent to the server, a log on page is returned. but the odata model is expecting some odata model xml.

I'm setting the username password in the servlet like below:

String encoded = new String(Base64.encodeBase64(new String("xxxx:yyyy").getBytes()));

conn.setRequestProperty("Authorization", "Basic " + encoded);

But it doesn't seem to be working, and idea how to do that?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

     I faced the same problem in private instance. Even with the .xsodata "method":"Basic", you need to go to http://<hana_host>:<hana_port>/sap/hana/xs/admin/ and set "Basic" on "Authentication Methods" under the package of your xsodata.

     I´m also using the local Tomcat and I also have to extend the SimpleProxyServlet to put the user and password (encoded) into the Header requisition to make it work.

Tip: Some versions of Hana admin console, doesn't open the admin console in Chrome, use IE.

Wish you luck.

Answers (0)