Task 7 – Configure one-button synchronization through HTTP of M-Business Client and MobiLink

When synchronizing with Microsoft OS platforms, the sample retrieves the ulpod.cab file. This file extracts itself upon retrieval through M-Business Anywhere, and copies ulconnect.exe, ulconnect.usm, and ulpod10.dll into the /Program Files/AvantGo/PODS directory, and ul10rt.dll to the Microsoft OS device's /Windows directory.

After extracting this package, set the synchronization parameters. This is done by executing the following JavaScript as part of the application:

conn.syncParms.STREAM_TYPE_HTTP; 
conn.syncParms.setUserName(document.dbsync.syncusrname.value ); 
conn.syncParms.setVersion(document.dbsync.syncver.value ); 
conn.syncParms.setStreamParms(document.dbsync.syncparm.value ); 
conn.syncParms.setMBAServer('<your_MBA_server_URL>',
        '<your_redirector_port>','/iaredirect/ml'); 
conn.saveSyncParms();

Where <your_MBA_server_URL> is the URL or IP address of your M-Business Server, and <your_redirector_port> is the redirector port it is using.

In this particular application, the synchronization parameters are set within the sync_page.htm file. For ease of use, it is convenient to set these parameters in the OnLoad event of the first page and use your application server to prepopulate the synchronization parameters with appropriate values. One can imagine setting these parameters using the X-AvantGo-User header information and using this user name within M-Business Server as the UltraLite user name.

After executing this JavaScript, MobiLink is configured to synchronize at the same time as an M-Business Client synchronization. Thereafter, at the beginning of a typical M-Business Anywhere synchronization (cradle or wireless), ulconnect.exe is executed and synchronizes MobiLink with the parameters saved, along with M-Business Anywhere content through HTTP.

Once MobiLink is configured to listen to HTTP, the redirector is properly configured, and the Web page is setting the synchronization parameters, UltraLite will synchronize at the same time as M-Business Client.

Note that independent synchronization of the UltraLite on-device database is also available. There is a SkipMBASync setting that needs to be set to True in order for this to occur. For this and other advanced settings, see UltraLite M-Business Anywhere Programming, referenced in Related publications.