Developers

Local Navigation

Home > Developers > Developers Knowledge Base

Back

How To - Push data to a BlackBerry MDS Runtime Application created in BlackBerry MDS Studio

Last Updated: 10 October 2008
Article Number: DB-00683

Summary

This article applies to the following:

  • BlackBerry® MDS Studio

Details

The BlackBerry® Plug-in for Microsoft® Visual Studio® introduced the ability to push data to a BlackBerry® MDS Runtime Application. For a demonstration, see the following video: http://www.blackberry.com/DevMediaLibrary/view.do?name=push

Previously, this type of functionality was offered to applications created in BlackBerry MDS Studio by making use of a web service that implements the WS-Eventing standard. Although this feature has not been integrated in BlackBerry MDS Studio the way BlackBerry Plug-in for Microsoft Visual Studio has, it is possible to use this feature in an application created in BlackBerry MDS Studio. To use this feature, perform the following steps:

  1. Create a project using the Top-Down approach. In the example, the BlackBerry MDS Runtime Application is called Studio_XMLPush and the default Uniform Resource Identifier (URI) is research_in_motion/studio_xmlpush.
  2. Create an inbound message to accept the push. In the example, the message is called myResponseMsg.
  3. Add a field to the message called mp0 using the default field type, which is string.
  4. Create a script that executes when the response message gets to the BlackBerry smartphone. The following is an example:
  5.     function MyResponseScript() {
            Dialog.display("Pushed string: " + myResponseMsg.mp0);
        }

  6. Generate a Web Services Description Language (WSDL) using the default settings.
  7. Publish the BlackBerry MDS Runtime Application to a BlackBerry® Enterprise Server running BlackBerry MDS Integration Service 1.1.2 or later.
  8. Install and run the BlackBerry MDS Runtime Application on the BlackBerry smartphone.
  9. Send an HTTP POST with the appropriate configuration to the BlackBerry MDS Integration Service server. Here are some examples of the format of the connection URL:
  10. Simple Object Access Protocol (SOAP) request parameter for a broadcast

    http://<myServer>:<myPushPort>/mds/PushListener?
    appUri=research_in_motion/
    studio_xmlpush&appLocale=en&appVersion=1.1.0& HTTP/1.1

    SOAP request parameter when sending to a specific BlackBerry smartphone

    http://<myServer>:<myPushPort>/mds/
    PushListener?destination=<BlackBerryPINOrEmailAddress>
    &appUri=research_in_motion/
    studio_xmlpush&appLocale=en&appVersion=1.1.0& HTTP/1.1

    Raw Extensible Markup Language (XML) pushed

    <string_Wrap>Eureka!</string_Wrap>

    Note: The default BlackBerry MDS Integration Service push port for the BlackBerry Enterprise Server is 7090. For BlackBerry MDS Studio 2.0 and later, the default port is 17090.

  11. Observe Eureka! displayed within a dialog window in the BlackBerry MDS Runtime Application.
  12. Note: This feature requires BlackBerry MDS Integration Service 1.1.2 or later.


Keywords

MDS Studio, push, XML, data, WS, eventing