Example usage for org.springframework.integration.http.inbound HttpRequestHandlingMessagingGateway setRequestPayloadType

List of usage examples for org.springframework.integration.http.inbound HttpRequestHandlingMessagingGateway setRequestPayloadType

Introduction

In this page you can find the example usage for org.springframework.integration.http.inbound HttpRequestHandlingMessagingGateway setRequestPayloadType.

Prototype

public void setRequestPayloadType(ResolvableType requestPayloadType) 

Source Link

Document

Specify the type of payload to be generated when the inbound HTTP request content is read by the converters/encoders.

Usage

From source file:soap.client.Application.java

@Bean
public HttpRequestHandlingMessagingGateway httpGate() {
    HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
    RequestMapping mapping = new RequestMapping();
    mapping.setMethods(HttpMethod.GET);/*from  w w  w.j  ava  2  s.c  om*/
    mapping.setPathPatterns("/foo");
    gateway.setRequestMapping(mapping);
    gateway.setRequestChannel(requestChannel());
    gateway.setRequestPayloadType(String.class);
    return gateway;
}

From source file:rest.json.Application.java

@Bean
public HttpRequestHandlingMessagingGateway httpGate() {
    HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
    RequestMapping mapping = new RequestMapping();
    mapping.setMethods(HttpMethod.POST);
    mapping.setPathPatterns("/foo");
    gateway.setRequestMapping(mapping);// w  w w . j  ava 2  s . c o  m
    gateway.setRequestChannel(requestChannel());
    gateway.setRequestPayloadType(String.class);
    return gateway;
}

From source file:simple.flow.Application.java

@Bean
public HttpRequestHandlingMessagingGateway httpGate1() {
    HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
    RequestMapping mapping = new RequestMapping();
    mapping.setMethods(HttpMethod.POST);
    mapping.setPathPatterns("/requestChannel1");
    gateway.setRequestMapping(mapping);/*from www  .j a va2  s  .  co m*/
    gateway.setRequestChannel(requestChannel1());
    gateway.setRequestPayloadType(String.class);
    return gateway;
}

From source file:simple.flow.Application.java

@Bean
public HttpRequestHandlingMessagingGateway httpGate2() {
    HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(true);
    RequestMapping mapping = new RequestMapping();
    mapping.setMethods(HttpMethod.POST);
    mapping.setPathPatterns("/requestChannel2");
    gateway.setRequestMapping(mapping);/*from   w ww  .j  ava 2  s.  c  o m*/
    gateway.setRequestChannel(requestChannel2());
    gateway.setRequestPayloadType(String.class);
    return gateway;
}