+

Search Tips   |   Advanced Search

Invoking a back-end service

We can use MobileFirst Studio to invoke a back-end service and receive the data retrieved by the service.

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

In MobileFirst Studio, we can invoke a back-end service and immediately receive the data retrieved by the service in XML and JSON formats. We can also define and test a custom XSL transformation that converts the resulting XML into JSON.

To run a back-end service:

  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, provide the invocation service parameters. We can copy them from the code and paste them directly into the dialog box.

    Figure 2. Invocation parameters.

    A browser window opens, displaying the retrieved data in XML and JSON format, and the XSL transformation (if defined) that was used to convert the XML to JSON.

  3. Optional: Change the XSL transformation by editing it in the edit box, then click Apply XSL to regenerate the JSON format.

    Figure 3. Browser window, showing retrieved data in XML and JSON format.


Parent topic: Develop the server side of a MobileFirst application