Our team is using PDSOE w/ OE Mobile App Builder to develop an inward facing mobile app for our consultant/sales team. Eah developer is running local instances of Tomcat, a REST manager and a REST broker (appServer). This affords team members the most latitude with regards to testing.
For each defined Mobile Service in the associated Mobile App, we have set the default values for 'serviceURI' and 'catalogURI' as 'http://localhost:8980...'. This allows each developer to effectively test against their own web server / appserver.
The pinch point comes into play when we want to deploy/'publish' our mobile app to another server for in-house user testing. When a user, that does not have the web app installed locally in the aforementioned Tomcat/AppServer configuration, attempts to test the web app, they are unable to do so because the serviceURI and catalogURI entries in the published service.js file point to 'localhost'.
Is there process or procedure that others in the Progress Community have already created which enables the dev team to continue to test with the serviceURI and catalogURI pointing to 'localhost' but also allows stakeholders to run the web app and the serviceURI and catalogURI values point to the production server? We have assumed we can simply open the service.js file on the server and manually update the value for these two entries, however, we also believe that others in the Community with more experience can provide further insight. Thanks!
Just a quick reply.
A possible approach is to set the serviceURI and catalogURI in the settings to one value and then programmatically change the values used by the SessionService to point to the other value.
For example, you could use the production URIs in the settings and change the base URL to localhost:8980 programmatically based on some condition - perhaps based on the username.
You could even get the values for the production and test systems from another file at runtime.
The following thread has a somewhat similar question:
I hope this helps.