E
egarcia
Guest
Hello, Good help has already been posted in this thread: references to CORS, workarounds for CORS issues and the issue with mixed URI scheme: http vs https. I talked to Ricardo Perdigao yesteday and tried to post but there was an issue with the post going through. I think that the two main factors are the following: - REST service does not return an Access-Control-Allow-Origin (your email from this morning confirms - see screenshots below) - Issues loading HTTP content from HTTPS site (Mobile App Builder). I also noticed that the REST service internally uses JQuery $.ajax() API which seems to fail when loading data from HTTP from HTTPS site. (This behavior does not seem to happen with the JSDO Services ...) A possible way to solve this issue is to remove some of the factors: - Add Access-Control-Allow-Origin header. See enable-cors.org/server_aspnet.html or link that Ricardo Perdigao provided above. (The http://enable-cors.org/ we site provides good information CORS.) - To avoid the issue when loading mixed content (HTTP/HTTPS), you could run the app from Progress Developer Studio which will then copy the HTML/JS/CSS of the app and serve it using HTTP in the Tomcat in the box. - Another alternative, is to have the app hosted on the same server as the REST service. In this scenario, both the CORS and HTTP/HTTPS issue would not occur since it the same server. The difference between the services that you are testing "sofuture" and "espn" is that the "espn" includes and Access-Control-Allow-Origin header. Please notice the response headers in the attached screenshots. Once that you add the header to your service then it should work. I hope this helps.
Continue reading...
Continue reading...