*
* @param envelope the SOAP 1.1 envelope to process
* @param headerBlock the header to add
*/
public static void addSOAP11HeaderBlock(Envelope envelope, XMLObject headerBlock) {
Header envelopeHeader = envelope.getHeader();
if (envelopeHeader == null) {
envelopeHeader = (Header) Configuration.getBuilderFactory().getBuilder(Header.DEFAULT_ELEMENT_NAME)
.buildObject(Header.DEFAULT_ELEMENT_NAME);
envelope.setHeader(envelopeHeader);
}
envelopeHeader.getUnknownXMLObjects().add(headerBlock);
}