Search code examples
ibm-mobilefirstmobilefirst-adapters

No response from Java Adapter


I have tried to run my first cordova client app (using MobileFirst Foundation 8.0) that will call JavaAdapter but I get no response. I used Mobile Browser Simulator.

  1. Server: Mobilefirst 8.0 Foundation Development

  2. client mfp Cordova: android 6.0(Follow the example)

    var url = "/adapters/JavaAdapter/users/"+first+"/"+middle+"/"+last;
    var resourceRequest = new WLResourceRequest(url, WLResourceRequest.POST);
    
  3. JavaAdapter (follow the example).

    • why is there no response? do i need to add plugin, or other setting like security.
    • when i checked server mobilefirst server , this errors appeared:

CNFSRVE118: attachment 'configuration' for configuration id 'ddc7365e-17b3-4303-8d85-416a2810ee75', schema 'mfp_default_schema', version '1.0' not found [AUDIT ] CWWKS1100A: Authentication did not succeed for user ID admin. An invalid user ID or password was specified.


Solution

  • It appears the fix that was meant to fix this is not yet available, as such calling adapters when previewing Cordova applications using either Simple Browser or Mobile Browser Simulator will fail.

    Instead, you can run your Cordova application in either Android Emulator, iOS Simulator or a physical device.

    From the Cordova project folder, use this command: cordova run.

    ===

    To workaround the problem with previewing the application, in the MobileFirst Console select Runtime Setting > Confidential Clients and add a "test" confidential client with the scope "*".

    You will then be able to preview the application with an adapter request returning a proper response.