* @param request the WebService Request
*/
private void extractSourceFromSoapHeader(Map<String, Object> headers, WebServiceMessage request) {
if (request instanceof SoapMessage) {
SoapMessage soapMessage = (SoapMessage) request;
SoapHeader soapHeader = soapMessage.getSoapHeader();
if (soapHeader != null) {
//Set the raw soap header as a header in the exchange.
headers.put(SpringWebserviceConstants.SPRING_WS_SOAP_HEADER, soapHeader.getSource());
//Set header values for the soap header attributes
Iterator<QName> attIter = soapHeader.getAllAttributes();
while (attIter.hasNext()) {
QName name = attIter.next();
headers.put(name.getLocalPart(), soapHeader.getAttributeValue(name));
}
//Set header values for the soap header elements
Iterator<SoapHeaderElement> elementIter = soapHeader.examineAllHeaderElements();
while (elementIter.hasNext()) {
SoapHeaderElement element = elementIter.next();
QName name = element.getName();
headers.put(name.getLocalPart(), element);