SOAPHeader soapHeader = envelope.getHeader();
// if there is no soap header in the envelope being processed, add one.
if (soapHeader == null) {
SOAPFactory soapFac = msgContext.isSOAP11() ? OMAbstractFactory.getSOAP11Factory() : OMAbstractFactory.getSOAP12Factory();
soapHeader = soapFac.createSOAPHeader(envelope);
}
// by this time, we definitely have some addressing information to be sent. This is because,
// we have tested at the start of this whether messageInformationHeaders are null or not.
// So rather than declaring addressing namespace in each and every addressing header, lets