我在桌面平台中调用适配器时遇到500(内部服务器错误)问题

时间:2016-08-18 08:23:04

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

当我运行以下代码时,我收到错误,如返回错误:worklight.js:11988 GET http://localhost:10080/sampleProj/apps/services/api/sampleApp/desktopbrowser/adapters/testt/getFeed?params=%5B%5D 500(内部服务器错误)任何人都可以帮助我,我们使用下面的代码:

 $scope.resourceRequest = new
 WLResourceRequest("/adapters/Test/procedure3", WLResourceRequest.GET);

     $scope.resourceRequest.setQueryParameter("params", []);
    $scope.resourceRequest.send().then(
    $scope.branchShowSuccess,
    $scope.branchShowFailure
  );

};$scope.branchShowSuccess = function(result) {
 console.log(result);}   $scope.branchShowFailure = function(data) {
console.log(data);
   }

我是ibm工作灯的新手我们在ibm工作灯中实现桌面浏览器应用程序在Android平台上运行的同一代码在andriod平台geeting成功但在桌面浏览器中无法正常工作请对我有任何帮助

1 个答案:

答案 0 :(得分:0)

MobileFirst Platform Foundation 7.1中的桌面浏览器环境不支持WLResourceRequest API。您需要使用WL.Client.invokeProcedure