INT-1751 fliped the way inbound/outboundHeaderNames are set on DefaultHttpHeaderMapper when botstrapping http inbound gateway/adapter

This commit is contained in:
Oleg Zhurakousky
2011-01-24 12:43:13 -05:00
parent 02de94e2f0
commit fe527cd4c5
4 changed files with 8 additions and 8 deletions

View File

@@ -108,8 +108,8 @@ public class HttpInboundEndpointParser extends AbstractSingleBeanDefinitionParse
else if (StringUtils.hasText(mappedRequestHeaders) || StringUtils.hasText(mappedResponseHeaders)) {
BeanDefinitionBuilder headerMapperBuilder = BeanDefinitionBuilder.genericBeanDefinition(
"org.springframework.integration.http.support.DefaultHttpHeaderMapper");
IntegrationNamespaceUtils.setValueIfAttributeDefined(headerMapperBuilder, element, "mapped-request-headers", "outboundHeaderNames");
IntegrationNamespaceUtils.setValueIfAttributeDefined(headerMapperBuilder, element, "mapped-response-headers", "inboundHeaderNames");
IntegrationNamespaceUtils.setValueIfAttributeDefined(headerMapperBuilder, element, "mapped-request-headers", "inboundHeaderNames");
IntegrationNamespaceUtils.setValueIfAttributeDefined(headerMapperBuilder, element, "mapped-response-headers", "outboundHeaderNames");
builder.addPropertyValue("headerMapper", headerMapperBuilder.getBeanDefinition());
}
}

View File

@@ -85,13 +85,13 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="mapped-response-headers" type="xsd:string">
<xsd:attribute name="mapped-request-headers" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Comma-separated list of names of HttpHeaders to be mapped from the HTTP response into the MessageHeaders.
Comma-separated list of names of MessageHeaders to be mapped into the HttpHeaders of the HTTP request.
This can only be provided if the 'header-mapper' reference is not being set directly. The values in
this list can also be simple patterns to be matched against the header names (e.g. "foo*" or "*foo").
The String "HTTP_RESPONSE_HEADERS" will match against any of the standard HTTP Response headers.
The String "HTTP_REQUEST_HEADERS" will match against any of the standard HTTP Request headers.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>

View File

@@ -25,6 +25,6 @@
<inbound-channel-adapter id="inboundController" channel="requests" view-name="foo" error-code="oops"/>
<inbound-channel-adapter id="withMappedHeaders" channel="requests"
mapped-response-headers="foo,bar"/>
mapped-request-headers="foo,bar"/>
</beans:beans>

View File

@@ -22,7 +22,7 @@
<inbound-gateway id="inboundController" request-channel="requests" reply-channel="responses" view-name="foo" error-code="oops"/>
<inbound-gateway id="withMappedHeaders" request-channel="requests"
mapped-response-headers="foo,bar"
mapped-request-headers="abc, xyz"/>
mapped-response-headers="abc, xyz"
mapped-request-headers="foo,bar"/>
</beans:beans>