a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * The contents of this file are subject to the terms
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * of the Common Development and Distribution License
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * (the License). You may not use this file except in
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * compliance with the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * You can obtain a copy of the License at
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * See the License for the specific language governing
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * permission and limitations under the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * When distributing Covered Code, include this CDDL
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Header Notice in each file and include the License file
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * If applicable, add the following below the CDDL Header,
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * with the fields enclosed by brackets [] replaced by
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * your own identifying information:
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * $Id: CorrelationHeader.java,v 1.3 2008/06/25 05:47:22 qcheng Exp $
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Fosterpackage com.sun.identity.liberty.ws.soapbinding;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * The <code>CorrelationHeader</code> class represents <code>Correlation</code>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * element defined in SOAP binding schema. The <code>messageID</code> is a
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * required attribute and will be generated automatically when a constructor
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * is called.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @supported.all.api
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Default Construtor
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster actor = SOAPBindingConstants.DEFAULT_SOAP_ACTOR;
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * This constructor takes a <code>org.w3c.dom.Element</code>.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param correlationElement a Correlation element
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @throws SOAPBindingException if an error occurs while parsing
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * the Correlation element
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster CorrelationHeader(Element correlationElement) throws SOAPBindingException {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster String msg = Utils.bundle.getString("missingMessageID");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Utils.debug.error("CorrelationHeader: " + msg);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster refToMessageID = XMLUtils.getNodeAttributeValue(
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster String msg = Utils.bundle.getString("invalidMustUnderstand");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Utils.debug.error("CorrelationHeader: " + msg, pe);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster String msg = Utils.bundle.getString("missingCorrelationTimestamp");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Utils.debug.error("CorrelationHeader: " + msg);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster String msg = Utils.bundle.getString("invalidTimestamp");
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Utils.debug.error("CorrelationHeader: " + msg, pe);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>messageID</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>messageID</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>refToMessageID</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>refToMessageID</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>timestamp</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>timestamp</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>id</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>id</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>mustUnderstand</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>mustUnderstand</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Returns value of <code>actor</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @return value of <code>actor</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Sets value of <code>mustUnderstand</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param mustUnderstand value of <code>mustUnderstand</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public void setMustUnderstand(Boolean mustUnderstand) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Sets value of <code>actor</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param actor value of <code>actor</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Sets value of <code>refToMessageID</code> attribute.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param refToMessageID value of <code>refToMessageID</code> attribute
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster public void setRefToMessageID(String refToMessageID) {
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Converts this header to <code>org.w3c.dom.Element</code> and add to
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * parent Header Element.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * @param headerE parent Header Element
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Element correlationHeaderE = doc.createElementNS(
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster correlationHeaderE.setAttributeNS(null, SOAPBindingConstants.ATTR_id,
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster correlationHeaderE.setAttributeNS(SOAPBindingConstants.NS_SOAP,