if (headerElement == null || !(headerElement instanceof SOAPHeader))
throw new OMException(SandeshaMessageHelper.getMessage(
SandeshaMessageKeys.seqElementCannotBeAddedToNonHeader));
SOAPHeader soapHeader = (SOAPHeader) headerElement;
if (identifier == null)
throw new OMException(SandeshaMessageHelper.getMessage(
SandeshaMessageKeys.nullMsgId));
if (messageNumber == null)
throw new OMException(SandeshaMessageHelper.getMessage(
SandeshaMessageKeys.seqPartIsNull));
OMFactory factory = headerElement.getOMFactory();
OMNamespace rmNamespace = factory.createOMNamespace(
namespaceValue, Sandesha2Constants.WSRM_COMMON.NS_PREFIX_RM);
SOAPHeaderBlock sequenceHeaderBlock = soapHeader.addHeaderBlock(
Sandesha2Constants.WSRM_COMMON.SEQUENCE, rmNamespace);
sequenceHeaderBlock.setMustUnderstand(isMustUnderstand());
identifier.toOMElement(sequenceHeaderBlock);
messageNumber.toOMElement(sequenceHeaderBlock);