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?