* @return the resulting SOAPEnvelope
*/
public static SOAPEnvelope removeAddressingHeaders(MessageContext axisMsgCtx) {
SOAPEnvelope env = axisMsgCtx.getEnvelope();
SOAPHeader soapHeader = env.getHeader();
ArrayList addressingHeaders;
if (soapHeader != null) {
addressingHeaders = soapHeader.getHeaderBlocksWithNSURI(
AddressingConstants.Submission.WSA_NAMESPACE);
if (addressingHeaders != null && addressingHeaders.size() != 0) {
detachAddressingInformation(addressingHeaders);
} else {
addressingHeaders = soapHeader.getHeaderBlocksWithNSURI(
AddressingConstants.Final.WSA_NAMESPACE);
if (addressingHeaders != null && addressingHeaders.size() != 0) {
detachAddressingInformation(addressingHeaders);
}
}