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:
Artem Bilan
2013-03-18 13:50:16 +02:00
committed by Gary Russell
parent b8980d4064
commit 70886b2543
46 changed files with 310 additions and 64 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ import org.springframework.util.StringUtils;
* Base class for url-based outbound gateway parsers.
*
* @author Mark Fisher
* @author Artem Bilan
*/
public abstract class AbstractOutboundGatewayParser extends AbstractConsumerEndpointParser {
@@ -45,6 +46,7 @@ public abstract class AbstractOutboundGatewayParser extends AbstractConsumerEndp
if (StringUtils.hasText(replyChannel)) {
builder.addPropertyReference("replyChannel", replyChannel);
}
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "requires-reply");
this.postProcessGateway(builder, element, parserContext);
return builder;
}

View File

@@ -1075,7 +1075,6 @@
</xsd:complexType>
</xsd:element>
<xsd:complexType name="serviceActivatorType">
<xsd:complexContent>
<xsd:extension base="expressionOrInnerEndpointDefinitionAware">
@@ -1083,10 +1082,8 @@
<xsd:annotation>
<xsd:documentation>
Specify whether the service method must return a non-null value. This value will be
FALSE by
default, but if set to TRUE, a MessageHandlingException will be thrown when
the underlying service method (or
expression) returns a NULL value.
'false' by default, but if set to 'true', a ReplyRequiredException will be thrown when
the underlying service method (or expression) returns a null value.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@@ -3153,9 +3150,9 @@ is provided, the return value is expected to match a channel name exactly.
<xsd:attribute name="requires-reply" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation>
Specify whether the splitter method must return a non-null value. This value will be
FALSE by default, but if set to TRUE, a MessageHandlingException will be thrown when
the underlying service method (or expression) returns a NULL value.
Specify whether the service method must return a non-null value. This value will be
'false' by default, but if set to 'true', a ReplyRequiredException will be thrown when
the underlying service method (or expression) returns a null value.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>