【问题标题】:getting error 200 when i am calling ibm worklight adapter with mobile web application当我使用移动 Web 应用程序调用 ibm worklight 适配器时出现错误 200
【发布时间】:2016-08-18 17:15:01
【问题描述】:

我们遇到了类似的错误

klass {responseHeaders: Object, status: 200, responseText: "undefined", errorCode: "API_INVOCATION_FAILURE", errorMsg: "Unsupported environment"…}

当我们使用移动 Web 应用程序工作灯调用适配器时

我的代码:

    var resourceRequest = new WLResourceRequest("/adapters/testt/getFeed", WLResourceRequest.GET);
    resourceRequest.setQueryParameter("params", []);
    resourceRequest.send().then(
        $scope.branchShowSuccess,
        $scope.branchShowFailure
    );
}

$scope.branchShowSuccess = function(result) {
    alert("success adapter1 "+JSON.stringify(result));
    console.log(result);
}

$scope.branchShowFailure = function(data) {
    alert("failure adapter1 "+JSON.stringify(data));
    console.log(JSON.stringify(data));
}

我是这个 ibm 工作灯的新手,请帮助我更正我的代码

【问题讨论】:

    标签: ibm-mobilefirst worklight-adapters worklight-server


    【解决方案1】:

    移动 Web 环境不支持 WLResourceRequest。您需要改用 WL.Client.invokeProcedure。

    【讨论】:

    • 我们如何从移动网络使用 WL.Client.invokeProcedure 调用 JavaAdapter?
    • 无法从 JavaScript 适配器调用 Java 适配器。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多