1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. 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. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /**
27 *
28 * @author SAAJ RI Development Team
29 */
30 package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
31
32 import java.io.IOException;
33 import java.io.InputStream;
34 import java.util.logging.Level;
35 import java.util.logging.Logger;
36
37 import javax.xml.soap.*;
38
39 import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
40 import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
41 import com.sun.xml.internal.messaging.saaj.soap.MessageImpl;
42 import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
43
44 public class Message1_1Impl extends MessageImpl implements SOAPConstants {
45
46 protected static final Logger log =
47 Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
48 "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
49
50 public Message1_1Impl() {
51 super();
52 }
53
54 public Message1_1Impl(boolean isFastInfoset, boolean acceptFastInfoset) {
55 super(isFastInfoset, acceptFastInfoset);
56 }
57
58 public Message1_1Impl(SOAPMessage msg) {
59 super(msg);
60 }
61
62 // unused. can we delete this? - Kohsuke
63 public Message1_1Impl(MimeHeaders headers, InputStream in)
64 throws IOException, SOAPExceptionImpl {
65 super(headers, in);
66 }
67
68 public Message1_1Impl(MimeHeaders headers, ContentType ct, int stat, InputStream in)
69 throws SOAPExceptionImpl {
70 super(headers,ct,stat,in);
71 }
72
73 public SOAPPart getSOAPPart() {
74 if (soapPartImpl == null) {
75 soapPartImpl = new SOAPPart1_1Impl(this);
76 }
77 return soapPartImpl;
78 }
79
80 protected boolean isCorrectSoapVersion(int contentTypeId) {
81 return (contentTypeId & SOAP1_1_FLAG) != 0;
82 }
83
84 public String getAction() {
85 log.log(
86 Level.SEVERE,
87 "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
88 new String[] { "Action" });
89 throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
90 }
91
92 public void setAction(String type) {
|
1 /*
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. 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. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /**
27 *
28 * @author SAAJ RI Development Team
29 */
30 package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
31
32 import java.io.IOException;
33 import java.io.InputStream;
34 import java.util.logging.Level;
35 import java.util.logging.Logger;
36
37 import javax.xml.soap.*;
38 import javax.xml.stream.XMLStreamReader;
39
40 import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
41 import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
42 import com.sun.xml.internal.messaging.saaj.soap.MessageImpl;
43 import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
44
45 public class Message1_1Impl extends MessageImpl implements SOAPConstants {
46
47 protected static final Logger log =
48 Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
49 "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
50
51 public Message1_1Impl() {
52 super();
53 }
54
55 public Message1_1Impl(boolean isFastInfoset, boolean acceptFastInfoset) {
56 super(isFastInfoset, acceptFastInfoset);
57 }
58
59 public Message1_1Impl(SOAPMessage msg) {
60 super(msg);
61 }
62
63 // unused. can we delete this? - Kohsuke
64 public Message1_1Impl(MimeHeaders headers, InputStream in)
65 throws IOException, SOAPExceptionImpl {
66 super(headers, in);
67 }
68
69 public Message1_1Impl(MimeHeaders headers, ContentType ct, int stat, InputStream in)
70 throws SOAPExceptionImpl {
71 super(headers,ct,stat,in);
72 }
73
74 public Message1_1Impl(MimeHeaders headers, ContentType ct, int stat, XMLStreamReader reader)
75 throws SOAPExceptionImpl {
76 super(headers,ct,stat,reader);
77 }
78
79 public SOAPPart getSOAPPart() {
80 if (soapPartImpl == null) {
81 soapPartImpl = new SOAPPart1_1Impl(this);
82 }
83 return soapPartImpl;
84 }
85
86 protected boolean isCorrectSoapVersion(int contentTypeId) {
87 return (contentTypeId & SOAP1_1_FLAG) != 0;
88 }
89
90 public String getAction() {
91 log.log(
92 Level.SEVERE,
93 "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
94 new String[] { "Action" });
95 throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
96 }
97
98 public void setAction(String type) {
|