Results 1 to 2 of 2

Thread: Example of calling rest service without RestTemplate?

  1. #1
    Join Date
    Mar 2005
    Posts
    144

    Question 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. #2
    Join Date
    Nov 2008
    Location
    Swansea, Wales
    Posts
    204

    Default

    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" />

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •