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

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

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

    Posted Thu May 14, 2020 12:27 PM

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

    #API-Management
    #webMethods
    #soa


  • 2.  RE: How do i connect my webMethods REStful service to my spring boot application

    Posted Thu May 21, 2020 12:18 PM

    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.


    #webMethods
    #soa
    #API-Management