Home Ask Login Register

Developers Planet

Your answer is one click away!

Nazmul Hasan February 2016

can not invoke java adapter resource by windows phone 8 Application in MobileFirst platform

I am using mobilefirst 7.1 for my hybrid application development (For iOS, Android and windows phone devices). I tried with WLResourceRequest.POST for java Adapter, but its not working for windows phone 8 .


function testBodyJavaAdapter(){

    var baseUrlJavaAdapter="/adapters/JavaAdapterTest/api/postHelloUserBody";

    var req = new WLResourceRequest(baseUrlJavaAdapter, WLResourceRequest.POST);

       var json={ 

        req.setHeader("Content-Type", "application/json");



java Adapter code:

public class JavaAdapterTestResource {

    static Logger logger = Logger.getLogger(JavaAdapterTestResource.class.getName());

    //Define the server api to be able to perform server operations
    WLServerAPI api = WLServerAPIProvider.getWLServerAPI();

    public String postHelloUserBody(@HeaderParam("Content-Type") String type,  JSONObject json) throws IOException{
        return "Hello " + json.get("first") + " " + json.get("middle") + " " + json.get("last");

MobileFirst: version

visual studio 2013

windows phone 8.1 Microsoft lumia 640

project uploaded here:https://github.com/nazmulkp/MobileFirst-Hybrid-Application-AdapterTest

Thank you


Idan Adar February 2016

As mentioned by Vivin in the comments - this was identified to be a defect in the product and should be handled as a PMR (support ticket). Once you open the PMR, please mention its number in the question or in comments.

Post Status

Asked in February 2016
Viewed 1,903 times
Voted 10
Answered 1 times


Leave an answer

Quote of the day: live life