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.


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 java.util.concurrent.atomic.AtomicLong;

public class PreProcessorController {

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

    public void getData(@RequestBody ReadingSCBMLEntity entity) {
        final String uri="";

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


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