BlackBerry® Enterprise Server 5.0.1BlackBerry smartphones running BlackBerry® Device Software 5.0
The sample code below (see attachments) demonstrates how you can associate BlackBerry Enterprise Server 5.0.1 with BlackBerry smartphones using standards based on Simple Object Access Protocol (SOAP) communication (JSR172) and BlackBerry® Widget development technology.
The sample code consists of the following parts:
Admin extension — An extension for accessing the BlackBerry Enterprise Server using the BlackBerry® Administration API. This is a SOAP WebServices application programming interface (API). The extension uses the JSR172 SOAP API for communication.IT policy extension — An extension providing access to IT policy rules set by an administrator on a BlackBerry smartphone. Session extension — A lightweight session extension providing widget applications the ability to exchange information between pages.
Stubs for use by the JSR172 API were generated using the Sun® Wireless Toolkit 2.5.2 (http://java.sun.com/products/sjwtoolkit/download.htm).
Stubs were generated for the following Web Services Description Languages (WSDLs). Replace <BlackBerry Administration Service> with the name or IP address of your BlackBerry Administration Service:
You do not need to generate these stubs; they are included in the source code.
The IT policy and session extensions have no dependencies.The extensions can be integrated in the widget runtime as described above. You can register the extensions by adding the following code to the WidgetConfigImpl.java file:
After you add the extensions to the widget runtime, the widget application can be packaged using the BlackBerry Widget Packager tool distributed in the BlackBerry Widget SDK. To use the application on BlackBerry smartphones, the application needs to be signed using code signing keys.
When you run the application,set the Mobile Admin Host IT policy rule for the BlackBerry smartphone user's IT policy.