+

Search Tips   |   Advanced Search

Invoking a back-end service for USSD

We can invoke a MobileFirst HTTP adapter to test the USSD functionality.

This feature is only available within MobileFirst Studio for HTTP adapters. It is not available when we run an adapter on a stand-alone server based on WebSphere Application Server or Tomcat.

In MobileFirst Studio, we can invoke an HTTP-based USSD adapter and see the results that are returned to the USSD gateway to verify that the adapter is performing correctly.

  1. Right-click an adapter file, and select Run As > Invoke MobileFirst Back-end Service.

    Figure 1. Invoking a MobileFirst back-end service

  2. In the dialog box, from the Connect as drop-down list, select gateway. Then provide the options for invoking the USSD handler in the text box. The USSD gateway can send HTTP parameters, headers, cookies, or body.

    Figure 2. Invocation parameters.

    A browser window opens, displaying the result of the adapter invocation

  3. We can follow this procedure as many times as required to test the menu flow with the USSD gateway. Here are some examples that use the different types of parameters that are passed from the USSD gateway.

    Example 1: Passing query string parameters.

    Example 2: Passing JSON parameters in the body.

    Example 3: Passing XML in the body.

    If the body that you pass is not a JSON object, then enclose the object in quotes (" "). If it is a JSON object, then surround it with curly brackets ({ }).


Parent topic: Develop the server side of a MobileFirst application