I’ve been trying to create a test AngularJS application using the webMethods Integration Server as the backend. I can quickly get plain JSON files using $resource and edit the data they contain; my JSON is preloaded with games from one site. However, to display the data in the application, I want to create services in webMethods Designer and call them from AngularJS using $resource. The problem is that I can’t use AngularJS to get the data I need from the service I’m developing in Designer. I can use documentToJSONString in Designer (in WMPublic) to get a text that looks like this:
jsonString {"id": "1", "name game": "5 Dragons"}
Here is my services.js file:
/* Services */
var orderServices = angular.module('orderServices', ['ngResource']);
order services.factory('Order', ['$resource',
function($resource){
return $resource('url', {}, {
query: {method:'GET', isArray: true}
});
}]);