added reply-timeout support for WS inbound-gateway
This commit is contained in:
@@ -290,6 +290,14 @@ this list can also be simple patterns to be matched against the header names (e.
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="reply-timeout" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Maximum time in milliseconds to wait for a reply from the downstream message flow initiated by this gateway.
|
||||
This attribute is only relevant if at least some part of the downstream flow is asynchronous.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="error-channel" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:appinfo>
|
||||
|
||||
@@ -46,4 +46,11 @@
|
||||
|
||||
<bean id="testHeaderMapper" class="org.springframework.integration.ws.config.WebServiceInboundGatewayParserTests$TestHeaderMapper"/>
|
||||
|
||||
<si:channel id="replyTimeoutRequests">
|
||||
<si:queue/>
|
||||
</si:channel>
|
||||
|
||||
<ws:inbound-gateway id="replyTimeoutGateway" request-channel="replyTimeoutRequests"
|
||||
reply-timeout="1234"/>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -179,6 +179,16 @@ public class WebServiceInboundGatewayParserTests {
|
||||
assertEquals(testHeaderMapper, headerMapper);
|
||||
}
|
||||
|
||||
@Autowired @Qualifier("replyTimeoutGateway")
|
||||
private SimpleWebServiceInboundGateway replyTimeoutGateway;
|
||||
|
||||
@Test
|
||||
public void testReplyTimeout() throws Exception {
|
||||
DirectFieldAccessor accessor = new DirectFieldAccessor(replyTimeoutGateway);
|
||||
Object replyTimeout = accessor.getPropertyValue("replyTimeout");
|
||||
assertEquals(1234L, replyTimeout);
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class TestHeaderMapper implements SoapHeaderMapper {
|
||||
|
||||
Reference in New Issue
Block a user