Folks, stepping through the debugger shows the header elements as being present, however what actually comes out in the soap envelope/header does not have any header attributes.
Code:
public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception {
SoapHeader header = ((SoapMessage) messageContext.getRequest()).getSoapHeader();
for (Iterator<SoapHeaderElement> iterator = header.examineAllHeaderElements(); iterator.hasNext();) {
SoapHeaderElement headerElement = (SoapHeaderElement) iterator.next();
// the header has the elements from the incoming request's soap header
// I can add additional elements
}
return true;
}
It does not matter what I add or what is already present. The outgoing message's soap header section has none of the elements that I am seeing while I step through the handleResponse or handleFault methods.
I am sure I am missing something very trivial or overlooking a detail. I would appreciate any suggestions that would steer me in the right direction.
Thanks.