INT-2822: 'requires-reply' for Outbound Gateways
* Add `requires-reply` attribute for all adapters outbound gateways as `true` by default * WS-outbound-gateway is still without it, because it has its own specific attribute `ignore-empty-responses` * Make `requires-reply` as `false` by default for `jdbc:stored-proc-outbound-gateway` inasmuch as `jdbc:stored-proc-outbound-adapter` doesn't have ability to configure `returning-resultset` * add parser tests for `requires-reply` JIRA: https://jira.springsource.org/browse/INT-2822 INT-2822 'requires-reply' for ws:outbound-gateway Default false. INT-2822: Polishing after rebase INT-2822: deprecate 'ignore-empty-responses' * Add 'requires-reply' section into What's New INT-2822: remove 'ignore-empty-responses' from RM INT-2822: Polishing after rebase INT-2822: Rebased and polished INT-2822: Rebased and polished Add WARN within deprecated `AbstractWebServiceOutboundGateway#setIgnoreEmptyResponses` Revert 'ignore-empty-responses'; Doc Polishing
This commit is contained in:
committed by
Gary Russell
parent
b8980d4064
commit
70886b2543
@@ -435,6 +435,15 @@
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="requires-reply" type="xsd:string" use="optional" default="true">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Specify whether this outbound gateway must return a non-null value. This value is
|
||||
'true' by default, and a ReplyRequiredException will be thrown when
|
||||
the underlying service returns a null value.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
command-options="-P"
|
||||
expression="payload"
|
||||
order="2"
|
||||
requires-reply="false"
|
||||
>
|
||||
<int-ftp:request-handler-advice-chain>
|
||||
<bean class="org.springframework.integration.ftp.config.FtpOutboundGatewayParserTests$FooAdvice" />
|
||||
|
||||
@@ -84,6 +84,7 @@ public class FtpOutboundGatewayParserTests {
|
||||
|
||||
Long sendTimeout = TestUtils.getPropertyValue(gateway, "messagingTemplate.sendTimeout", Long.class);
|
||||
assertEquals(Long.valueOf(777), sendTimeout);
|
||||
assertTrue(TestUtils.getPropertyValue(gateway, "requiresReply", Boolean.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -101,6 +102,7 @@ public class FtpOutboundGatewayParserTests {
|
||||
Set<String> options = TestUtils.getPropertyValue(gateway, "options", Set.class);
|
||||
assertTrue(options.contains(Option.PRESERVE_TIMESTAMP));
|
||||
gateway.handleMessage(new GenericMessage<String>("foo"));
|
||||
assertFalse(TestUtils.getPropertyValue(gateway, "requiresReply", Boolean.class));
|
||||
assertEquals(1, adviceCalled);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user