INT-2466: Propagate SOAP action from inbound

JIRA: https://jira.spring.io/browse/INT-2466

Current reference documentation says that: "If the incoming web service
message is a SOAP message the SOAP Action header will be added to the
headers of the Message that is forwarded onto the request channel."
However, `DefaultSoapHeaderMapper` was actually missing to do that.

Polishing
This commit is contained in:
Mauro Molinari
2015-07-19 22:05:39 +02:00
committed by Artem Bilan
parent a8f47ee343
commit f99183afca
2 changed files with 45 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 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.
@@ -45,6 +45,7 @@ import org.springframework.xml.namespace.QNameUtils;
* @author Mark Fisher
* @author Oleg Zhurakousky
* @author Stephane Nicoll
* @author Mauro Molinari
* @since 2.0
*/
public class DefaultSoapHeaderMapper extends AbstractHeaderMapper<SoapMessage> implements SoapHeaderMapper {
@@ -61,7 +62,13 @@ public class DefaultSoapHeaderMapper extends AbstractHeaderMapper<SoapMessage> i
@Override
protected Map<String, Object> extractStandardHeaders(SoapMessage source) {
return Collections.emptyMap();
final String soapAction = source.getSoapAction();
if (StringUtils.hasText(soapAction)) {
Map<String, Object> headers = new HashMap<String, Object>(1);
headers.put(WebServiceHeaders.SOAP_ACTION, soapAction);
return headers;
} else
return Collections.emptyMap();
}
@Override