How do i connect my webMethods REStful service to my spring boot application

All i wanted to know is that if i have a flow service in SoftwareAG webMethods and i have converted it into a REStful service by making a rest resource and i have exposed it, so how do i make a call to that service via a spring boot appplication.

This is my code for the my spring application, Can someone please suggest me that how do i make a rest call to a webMethods Rest Resource flow service which is already been exposed.

A quick help is appreciated.

package com.scb.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.scb.entity.ReadingEntity;

import java.util.concurrent.atomic.AtomicLong;


@RestController
public class PreProcessorController {

    private List<ReadingEntity> myEntity=new ArrayList();
    private final AtomicLong counter = new AtomicLong();

    @GetMapping("/GetData")
    public void getData(@RequestBody ReadingSCBMLEntity entity) {
        //myEntity.add(entity);
        final String uri="http://uklvadapp881.uk.dev.net:5555/invoke/scb.wb.fm.support.flow.ResourceGet/_get?";

        RestTemplate template=new RestTemplate();
         String result=template.getForObject(uri, String.class);

        System.out.println(result);
    }
}

What you have seems to be a rest service provided by your spring app. But you need to write a consumer. There are many tutorials in the internet. A key word would be restTemplate.

1 Like