Hello Experts,
I'm using WebIDE and I want to test a JSON service (written as a java servlet).
WebIDE uses https protocol.
My service uses http protocol.
I'm getting Cross Origin Policy error:
Mixed Content: The page at 'https://<webide>.dispatcher.hanatrial.ondemand.co….html&sap-ui-appCacheBuster=..%2F&sap-ui-language=en&sap-ui-xx-fakeOS=ipad' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://<server:<port>/<context root>/CompanySpecsServlet'. This request has been blocked; the content must be served over HTTPS.
[index.html] The following problem occurred: error - undefined,0,NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://<server:<port>/<context root>/CompanySpecsServlet'.
Uncaught TypeError: Cannot read property 'length' of undefined
Chrome was loaded with -disable-web-security option.
If I copy the code to Eclipse and run it from Eclipse's internal browser (which uses same protocol but different server name and port number) it works (chrome was also executed with -disable-web-security option is this case).
Can I test http services from WebIDE (which uses https)?
p.s
This is only for test purposes. In production both UI5/Java code will be on the same J2EE project.
Regards,
Omri