Getting familiar with IBM MobileFirst Platform Foundation Java Adapters [Part 2]

IBM MobileFirst Platform Foundation 7.0 introduced a new concept of Java Adapters. Java Adapters are implemented according to JAX-RS specification and allow a wide array of possibilities that were not available before in JavaScript adapters.

This is a second part of the introduction to new Java Adapters provided in IBM MobileFirst Platform Foundation 7.0. You can watch the first part here

The prerequisite for this video is a decent knowledge of MobileFirst adapters framework. You can learn more about it using this link

In this video I’m walking through common patters on using MobileFirst Java Adapters such as
1. Consuming various type of request parameters - query, path and form
2. Supporting various types of http requests - GET, POST
3. Logging and debugging adapter Java code
4. Consuming and producing JSON objects
5. Consuming and producing XML objects
6. Converting JSON to XML and vice-versa
7. Consuming and producing raw data and raw responses
8. Generating QR code using ZXing

As usual – watch it in HD for max resolution.

Download the sample project used in the above video from here

Important thing to note is that Java adapters are based on the JAX-RS specification and expose a full REST API to the client. In other words Java adapter is a JAX-RS service that can be deployed to MobileFirst Server and that by default, has access to MobileFirst Server APIs. Being a RESTful endpoint they cannot be accessed using WL.Client.invokeProcedure() API which uses an RPC model. Starting with v7.0 the IBM MobileFirst Platform provides a WLResourceRequest class which should be used to access Java adapters. To summarize
1. Java adapters can be only accessed using WLResourceRequest
2. JavaScript adapters can be accessed using WL.Client.invokeProcedure() API
3. JavaScript adapters can be accessed using WLResourceRequest (read here)

Below links might provide additional insights regarding Java Adapters usage

Last modified on May 01, 2016
Share this post: