if (messageID != null && !isAddressingHeaderAlreadyAvailable(WSA_MESSAGE_ID, envelope, addressingNamespaceObject)) {//optional
processStringInfo(messageID, WSA_MESSAGE_ID, envelope, addressingNamespaceObject);
}
if (!isAddressingHeaderAlreadyAvailable(WSA_RELATES_TO, envelope, addressingNamespaceObject)) {
RelatesTo relatesTo = messageContextOptions.getRelatesTo();
OMElement relatesToHeader = null;
if (relatesTo != null) {
relatesToHeader =
processStringInfo(relatesTo.getValue(),
WSA_RELATES_TO,
envelope, addressingNamespaceObject);
}
if (relatesToHeader != null)
if ("".equals(relatesTo.getRelationshipType())) {
relatesToHeader.addAttribute(WSA_RELATES_TO_RELATIONSHIP_TYPE,
Submission.WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE,
addressingNamespaceObject);
} else {
relatesToHeader.addAttribute(WSA_RELATES_TO_RELATIONSHIP_TYPE,
relatesTo.getRelationshipType(),
addressingNamespaceObject);
}
}
// We are done, cleanup the references