Setting Initialization Parameters
Invoke the setInitializeConf method in the com.softwareag.mobile.data.client.Context class to pass the following initialization parameters to the Mobile Support Client:
Host and port of the
Enterprise Gateway Server through which the request will be routed
Name and version of the mobile application
Type of mobile device that is running the application
User name and password used to authenticate the mobile application user with
Integration ServerProtocol to use to communicate with the server (
0, the default, indicates to use the HTTP protocol, and
1 indicates to use the HTTPS protocol)
For more information about using the HTTPS protocol to connect to a server from a mobile application, see the section on installing custom SSL certificates on devices in Using webMethods Mobile Designer.
When a mobile application user submits a download or synchronization request, the
Mobile Support Client invokes the
wm.mobile.datasync:synchronize service on the server using the following URL:
protocol://host:port/invoke/wm.mobile.datasync:synchronize
Add desired logic to handle SyncClientException exceptions that the setInitializeConf method returns when it encounters validation errors.
Note:
If Enterprise Gateway mobile application protection filters are being used on the server to control access for certain mobile application versions on a predefined set of mobile platforms, make sure that the device type and application name and version you pass in the setInitializeConf method match those specified in the mobile application protection filter. For more information about mobile application protection filters in Enterprise Gateway rules, see webMethods Integration Server Administrator’s Guide.