Eladerezador
Eladerezador

Reputation: 1301

IBM MobileFirst - Properties files

I have a MobileFirst APP, calling three web services, when I call these Web services, using an IP (localhost), but when I connect my mobile PC have to use another IP calls, and then have to use other production.

To make it easy and comfortable setup, as I can do in MobileFirst, it is the worklight.properties file?

Greetings and thank you,

Upvotes: 0

Views: 204

Answers (1)

Idan Adar
Idan Adar

Reputation: 44516

That's some crazy English going on there...

If your question is really "can I save the web service IP address (that I am using in my adapter XML file) in a variable in worklight.properties, so that different IPs will be used for my adapters in different environments (DEV, QA, PROD)" - yes.

I believe that in this case JNDI properties will not help, but you could do the following.

You will need to create a different copy of worklight.properties per the environment you want to test at, and in each file add custom properties, for example:

myWebServiceIP=192.168.123.1 (you'll need to change this value per file)

Then in the adapter XML file, use it like this:

<domain>${myWebServiceIP}</domain> 

Upvotes: 1

Related Questions