use of org.springframework.ws.soap.saaj.SaajSoapMessage in project camel by apache.
the class SpringWebserviceConsumer method populateExchangeWithBreadcrumbFromMessageContext.
private void populateExchangeWithBreadcrumbFromMessageContext(MessageContext messageContext, Exchange exchange) {
SaajSoapMessage saajSoap = (SaajSoapMessage) messageContext.getRequest();
SOAPMessage soapMessageRequest = null;
if (saajSoap != null) {
soapMessageRequest = saajSoap.getSaajMessage();
if (soapMessageRequest != null) {
MimeHeaders mimeHeaders = soapMessageRequest.getMimeHeaders();
if (mimeHeaders != null) {
String[] breadcrumbIdHeaderValues = mimeHeaders.getHeader(Exchange.BREADCRUMB_ID);
// may be required to implement
if (breadcrumbIdHeaderValues != null && breadcrumbIdHeaderValues.length >= 1) {
exchange.getIn().setHeader(Exchange.BREADCRUMB_ID, breadcrumbIdHeaderValues[0]);
}
}
}
}
}
Aggregations