Im new to Spring Integration, I have to get a list of online agents from 3rd party web services, i tried to configure spring integration to get it, but for the channel
part, i not really sure how to configure it.
My original configuration was the following, i copied from a sample that use to send request to 3rd party web services:
public interface WebServiceGateway {
@Gateway(requestChannel = "getStatusChannel")
public String getStatus(String var); <------ being forced to send something
}
In my integration configuration,
@Configuration
public class IntegrationConfiguration {
@Bean
public MessageChannel getStatusChannel() {
return MessageChannels.direct().get();
}
}
The problem is, im not sending any parameter to the webservices, in requestChannel
it force me to do so, so i modified the gateway
part:
public interface WebServiceGateway {
@Gateway(replyChannel = "getStatusChannel")
public String getStatus();
}
This part remains unchanged:
@Configuration
public class IntegrationConfiguration {
@Bean
public MessageChannel getStatusChannel() {
return MessageChannels.direct().get();
}
}
It prompted me java.lang.IllegalStateException: receive is not supported, because no pollable reply channel has been configured
, why can't i use MessageChannel
as the reply channel? How should i configure the IntegrationConfiguration
?