use of org.springframework.ws.soap.SoapHeaderException in project spring-integration by spring-projects.
the class DefaultSoapHeaderMapper method populateUserDefinedHeader.
@Override
protected void populateUserDefinedHeader(String headerName, Object headerValue, SoapMessage target) {
SoapHeader soapHeader = target.getSoapHeader();
if (headerValue instanceof String) {
QName qname = QNameUtils.parseQNameString(headerName);
soapHeader.addAttribute(qname, (String) headerValue);
} else if (headerValue instanceof Source) {
Result result = soapHeader.getResult();
try {
this.transformerHelper.transform((Source) headerValue, result);
} catch (TransformerException e) {
throw new SoapHeaderException("Could not transform source [" + headerValue + "] to result [" + result + "]", e);
}
}
}
Aggregations