01.06.2013 Views

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

addCatalog( ) method<br />

addCatalog( ) method<br />

Loads the JSDO catalog for a login session established using the login( ) method. If<br />

the login( ) method has not been called on the current Session object, or has been<br />

called but failed, the method throws an Error object.<br />

Return type: Number<br />

Applies to: progress.data.Session class<br />

Syntax<br />

addCatalog ( catalog-uri [ , cat-user-name [ , cat-password ] ] )<br />

catalog-uri<br />

The URI of a JSDO catalog file. The file is typically in a location relative to the<br />

<strong>Mobile</strong> Web application where the Session object has a login session.<br />

If the <strong>Mobile</strong> App from which you are logging in is a <strong>Mobile</strong> Web App deployed to<br />

the same Apache Tomcat server as the <strong>Mobile</strong> Web application, you can specify<br />

catalog-uri as a relative URI, for example:<br />

/Sports<strong>Mobile</strong>App/static/mobile/OrderEntrySvc.json, which is relative to<br />

the deployment end point (Tomcat server domain or host and port).<br />

If the <strong>Mobile</strong> App from which you are logging in is a <strong>Mobile</strong> Native App that will be<br />

installed to run directly in a native device container, or if it is a <strong>Mobile</strong> Web App<br />

deployed to a different Web server from the <strong>Mobile</strong> Web application, you must<br />

specify catalog-uri as an absolute URI to the Tomcat server domain or host and<br />

port, for example,<br />

http://www.progress.com/Sports<strong>Mobile</strong>App/static/mobile/OrderEntrySv<br />

c.json, or perhaps for testing,<br />

http://testmach:8980/Sports<strong>Mobile</strong>App/static/mobile/OrderEntrySvc.j<br />

son.<br />

Note: For any <strong>Mobile</strong> App that must specify catalog-uri as an absolute URI,<br />

you must maintain separate JavaScript sources to deploy the <strong>Mobile</strong> App<br />

for different <strong>Mobile</strong> Web application environments, such as one for testing<br />

and one for production.<br />

Note: The default catalog URI for a catalog created for a <strong>Mobile</strong> service, relative<br />

to the Apache Tomcat server domain or host and port where the session is<br />

logged in, is the following:<br />

cat-user-name<br />

/<strong>Mobile</strong>WebApplicationName/static/mobile/ServiceName.json<br />

Where <strong>Mobile</strong>WebApplicationName is the name of the <strong>Mobile</strong> Web<br />

application and ServiceName is the name of the <strong>Mobile</strong> service for which<br />

the JSDO catalog is created.<br />

A string expression containing a user ID to authenticate access to a protected<br />

catalog. If you do not specify cat-user-name, catalog access is authorized using<br />

existing user credentials (if any).<br />

<strong>OpenEdge</strong> ® <strong>Development</strong>: <strong>Mobile</strong> <strong>Applications</strong> 177

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!