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

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

mercurial