Announcement Announcement Module
Collapse
No announcement yet.
Example of calling rest service without RestTemplate? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Example of calling rest service without RestTemplate?

    Hello,

    While we wait for the RestTemplate to be folded into the next release, does someone have an example of how we can call an existing rest service with the existing SI framework?

  • #2
    Here's a config snippet of calling Yammer's RESTful API with a custom request mapper and request executor

    Code:
    <header-enricher input-channel="getEnricher"
    		output-channel="requests">
    		<header name="springintegration_http_requestMethod" value="GET" />
    		<header name="springintegration_http_requestUrl" value="https://www.yammer.com/api/v1/messages" />
    	</header-enricher>
    
    	<http:outbound-gateway id="yammerGateway"
    		request-channel="requests" request-mapper="yammerRequestMapper"
    		request-timeout="5000" request-executor="yammerRequestExecutor"
    		reply-channel="httpIn" />

    Comment

    Working...
    X