I am unable to invoke adapter from the cordova MFP application in the app preview mode. it's working fine if I invoke in Swagger, but not with App. Cordova code for calling Adapter.
var resourceRequest = new WLResourceRequest(
"/adapters/Example/unprotected",
WLResourceRequest.GET
);
resourceRequest.send().then(app.onSuccess,app.onFailure);
it's always calling the failure method.
Adapter code.
<displayName>Example</displayName>
<description>Example</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>https</protocol>
<domain>mobilefirstplatform.ibmcloud.com</domain>
<port>443</port>
<connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
<socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
<maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode>
</connectionPolicy>
</connectivity>
<procedure name="getFeed"/>
<procedure name="unprotected" secured="false"/>
When previewing Cordova applications using the mfpdev app preview command, your application will not be able to call JavaScript adapters under certain circumstances. Specifically, your app will be unable to call JavaScript adapters that are unprotected (secure=false), and your app will be unable to call JavaScript adapter procedures that take parameters. This limitation only extends to the preview environment, and your app will behave as expected when running on native device hardware, or your platform’s native simulator.
The mfpdev app preview's purpose is for the developer to verify their UI changes and not the MFP server related functionalities.