webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

AngularJS app integration with SoftwareAG webMethods Integration Server

  • 1.  AngularJS app integration with SoftwareAG webMethods Integration Server

    Posted Wed March 01, 2023 05:35 AM

    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}
    });
    
    }]);
    
    

    #webMethods


  • 2.  RE: AngularJS app integration with SoftwareAG webMethods Integration Server

    Posted Mon March 06, 2023 06:22 AM

    You don’t need to do this, just add ‘Content-type: application/json’ to your request headers. IS will automatically send back a json formatted response.

    I would still recommend creating an API descriptor in designer to formally document and organise all of the services you want to be able to call from your IS.
    regards,
    John.


    #webMethods