src/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java

Mon, 04 May 2009 21:10:41 -0700

author
tbell
date
Mon, 04 May 2009 21:10:41 -0700
changeset 50
42dfec6871f6
parent 45
31822b475baa
child 78
860b95cc8d1d
permissions
-rw-r--r--

6658158: Mutable statics in SAAJ (findbugs)
6658163: txw2.DatatypeWriter.BUILDIN is a mutable static (findbugs)
Reviewed-by: darcy

     1 /*
     2  * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Sun designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Sun in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    22  * CA 95054 USA or visit www.sun.com if you need additional information or
    23  * have any questions.
    24  */
    25 /*
    26  *
    27  */
    31 /**
    32 *
    33 * @author SAAJ RI Development Team
    34 */
    35 package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
    37 import java.util.List;
    38 import java.util.Iterator;
    39 import java.util.logging.Level;
    40 import java.util.logging.Logger;
    42 import javax.xml.namespace.QName;
    43 import javax.xml.soap.*;
    45 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
    46 import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
    47 import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl;
    48 import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
    49 import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
    51 public class Header1_1Impl extends HeaderImpl {
    53     protected static final Logger log =
    54         Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
    55                          "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
    57     public Header1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
    58             super(ownerDocument, NameImpl.createHeader1_1Name(prefix));
    59     }
    61     protected NameImpl getNotUnderstoodName() {
    62         log.log(
    63             Level.SEVERE,
    64             "SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1",
    65             new String[] { "getNotUnderstoodName" });
    66         throw new UnsupportedOperationException("Not supported by SOAP 1.1");
    67     }
    69     protected NameImpl getUpgradeName() {
    70         return NameImpl.create(
    71             "Upgrade",
    72             getPrefix(),
    73             SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
    74     }
    76     protected NameImpl getSupportedEnvelopeName() {
    77         return NameImpl.create(
    78             "SupportedEnvelope",
    79             getPrefix(),
    80             SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
    81     }
    83     public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
    84         throws SOAPException {
    85         log.log(
    86             Level.SEVERE,
    87             "SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1",
    88             new String[] { "addNotUnderstoodHeaderElement" });
    89         throw new UnsupportedOperationException("Not supported by SOAP 1.1");
    90     }
    92     protected SOAPHeaderElement createHeaderElement(Name name) {
    93         return new HeaderElement1_1Impl(
    94             ((SOAPDocument) getOwnerDocument()).getDocument(),
    95             name);
    96     }
    97     protected SOAPHeaderElement createHeaderElement(QName name) {
    98         return new HeaderElement1_1Impl(
    99             ((SOAPDocument) getOwnerDocument()).getDocument(),
   100             name);
   101     }
   102 }

mercurial