Search code examples
ibm-mobilefirst

How to call a Https Rest service from java Adapter of IBM Mobilefirst


I need a sample code for HTTPS Rest service call with post or get methods from Java Adapter . I was able to achieve this using JS Adapter with out any certificates required.

I was thinking if IBM Mobilefirst has any standard way of calling Rest services with https.


Solution

  • Java adapters in MobileFirst are basically JAX-RS applications. There is no special layer MobileFirst provides (other than its security features).

    You can take a look at the following Java adapter that makes an HTTP call...
    https://github.com/MobileFirst-Platform-Developer-Center/AdaptersMashup/blob/release80/Adapters/HTTPAdapterJava/src/main/java/com/sample/HTTPAdapterJavaResource.java