use of org.springframework.ws.soap.SoapMessage in project spring-integration by spring-projects.
the class DefaultSoapHeaderMapperTests method testNullSoapHeader.
@Test
public void testNullSoapHeader() {
DefaultSoapHeaderMapper mapper = new DefaultSoapHeaderMapper();
SoapMessage soapMessage = mock(SoapMessage.class);
Map<String, Object> headers = mapper.toHeadersFromReply(soapMessage);
assertEquals(0, headers.size());
}
use of org.springframework.ws.soap.SoapMessage in project spring-integration by spring-projects.
the class AbstractWebServiceInboundGateway method fromSoapHeaders.
protected void fromSoapHeaders(MessageContext messageContext, AbstractIntegrationMessageBuilder<?> builder) {
WebServiceMessage request = messageContext.getRequest();
String[] propertyNames = messageContext.getPropertyNames();
if (propertyNames != null) {
for (String propertyName : propertyNames) {
builder.setHeader(propertyName, messageContext.getProperty(propertyName));
}
}
if (request instanceof SoapMessage) {
SoapMessage soapMessage = (SoapMessage) request;
Map<String, ?> headers = this.headerMapper.toHeadersFromRequest(soapMessage);
if (!CollectionUtils.isEmpty(headers)) {
builder.copyHeaders(headers);
}
}
}
Aggregations