added reply-timeout support for WS inbound-gateway

This commit is contained in:
Mark Fisher
2011-12-16 16:37:40 -05:00
parent 962fcb000a
commit cd499cfc50
3 changed files with 25 additions and 0 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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 {