JSDO properties, methods, and events reference : services property
  

services property

Returns an array of objects that identifies the Data Object Services that have been loaded for the current JSDOSession or Session object and its web application.
Data type: Array of Object
Access: Read-only
Applies to: progress.data.JSDOSession class, progress.data.Session class
You load Data Object Services for a JSDOSession or Session object by loading the corresponding Data Service Catalogs using the object's addCatalog( ) method. You can load these Catalogs either before or after you log into a web application using the object's login( ) method.
Each object in the array returned by this session property contains two properties:
*name — The name of a Data Object Service that is loaded for the specified session.
*uri — The URI for the service. If the address of the service in the Catalog is an absolute URI, this value is that URI. If the service address is relative, this value is the relative address concatenated to the value of the JSDOSession or Session object's serviceURI property, which contains the web application URI used by the object's login( ) method.
Note: To return a corresponding list of URIs for the loaded Data Service Catalogs, read the catalogURIs property.

Example

Given two Catalogs, CustomerSvc.json and ItemSvc.json, that specify their services this way:
*"CustomerSvc" service with this URI: "/rest/CustomerSvc"
*"ItemSvc" service with this URI: "http://itemhost:8080/SportsApp/rest/ItemSvc"
The following code fragment produces the output that follows:
// create Session
pdsession = new progress.data.JSDOSession('http://custhost:8080/SportsApp');

window.loginView = kendo.observable({
submit: function() {

// load 2 unprotected Catalogs
pdsession.addCatalog([
"http://custhost:8080/SportsApp/static/CustomerSvc.json",

"http://itemhost:8080/SportsApp/static/ItemSvc.json" ]
).done(
function(JSDOsession, result, info) {

// log in anonymously
JSDOSession.login(
)
.done(
function(JSDOSession, result, info) {

/* Use services property to print services
loaded by this Session object */
for (var i=0; i < JSDOSession.services.length; i++) {
console.log( JSDOSession.services[i].name + "   "
+ JSDOSession.services[i].uri );
}
// Stuff with widgets and DataSources . . .
}).fail( // log in
function(JSDOSession, result, info) { . . .
});
}).fail( // Add Catalogs
function(JSDOSession, result, details) { . . .
});
}
});
Output from the preceding code fragment:
CustomerSvc   http://custhost:8080/SportsApp/rest/CustomerSvc
ItemSvc   http://itemhost:8080/SportsApp/rest/ItemSvc

See also:

addCatalog( ) method (JSDOSession class), addCatalog( ) method (Session class), catalogURIs property, login( ) method (JSDOSession class), login( ) method (Session class), serviceURI property