Search in sources :

Example 1 with SaajSoapMessage

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]);
                }
            }
        }
    }
}
Also used : SaajSoapMessage(org.springframework.ws.soap.saaj.SaajSoapMessage) MimeHeaders(javax.xml.soap.MimeHeaders) SOAPMessage(javax.xml.soap.SOAPMessage)

Aggregations

MimeHeaders (javax.xml.soap.MimeHeaders)1 SOAPMessage (javax.xml.soap.SOAPMessage)1 SaajSoapMessage (org.springframework.ws.soap.saaj.SaajSoapMessage)1