You Bluemix XPage server can interact with other services using the VCAP_SERVICES where all the credentials for contacting other services is stored. This JSON data can be retrieved using
var services = fromJson(bluemixContext.getVCAP_SERVICES());
This will give you a direct access to the connected services credentials and exposed information, the credentials is what I have found updated each time you deploy a new version of you code so you need to use this way to get the credentials.
If you login to your Bluemix dashboard and click on your XPage service icon, you’ll find environment variables in the left hand navigator. This will display the structure of the VCAP_SERVICES JSON data check it out.
Most of the services has different methods of accessing them, I’m still investigating how to use different services and future posts will show how to use Bluemix services using XPages