-
Notifications
You must be signed in to change notification settings - Fork 15
/
Header1_1Impl.java
87 lines (74 loc) · 2.79 KB
/
Header1_1Impl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package com.sun.xml.messaging.saaj.soap.ver1_1;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.namespace.QName;
import jakarta.xml.soap.*;
import com.sun.xml.messaging.saaj.soap.SOAPDocument;
import com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl;
import com.sun.xml.messaging.saaj.soap.impl.HeaderImpl;
import com.sun.xml.messaging.saaj.soap.name.NameImpl;
import com.sun.xml.messaging.saaj.util.LogDomainConstants;
import org.w3c.dom.Element;
public class Header1_1Impl extends HeaderImpl {
private static final Logger log =
Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
"com.sun.xml.messaging.saaj.soap.ver1_1.LocalStrings");
public Header1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
super(ownerDocument, NameImpl.createHeader1_1Name(prefix));
}
public Header1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) {
super(ownerDoc, domElement);
}
@Override
protected NameImpl getNotUnderstoodName() {
log.log(
Level.SEVERE,
"SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1",
new String[] { "getNotUnderstoodName" });
throw new UnsupportedOperationException("Not supported by SOAP 1.1");
}
@Override
protected NameImpl getUpgradeName() {
return NameImpl.create(
"Upgrade",
getPrefix(),
SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
}
@Override
protected NameImpl getSupportedEnvelopeName() {
return NameImpl.create(
"SupportedEnvelope",
getPrefix(),
SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
}
@Override
public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
throws SOAPException {
log.log(
Level.SEVERE,
"SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1",
new String[] { "addNotUnderstoodHeaderElement" });
throw new UnsupportedOperationException("Not supported by SOAP 1.1");
}
@Override
protected SOAPHeaderElement createHeaderElement(Name name) {
return new HeaderElement1_1Impl(
((SOAPDocument) getOwnerDocument()).getDocument(),
name);
}
@Override
protected SOAPHeaderElement createHeaderElement(QName name) {
return new HeaderElement1_1Impl(
((SOAPDocument) getOwnerDocument()).getDocument(),
name);
}
}