Fri, 07 Aug 2009 11:27:00 -0700
6813167: 6u14 JAX-WS audit mutable static bugs
6803688: Integrate latest JAX-WS (2.1.6) in to JDK 6u14
Reviewed-by: darcy, ramap
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 */
28 /**
29 *
30 * @author SAAJ RI Development Team
31 */
32 package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
34 import java.io.IOException;
35 import java.io.InputStream;
36 import java.util.logging.Level;
37 import java.util.logging.Logger;
39 import javax.xml.soap.*;
41 import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
42 import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
43 import com.sun.xml.internal.messaging.saaj.soap.MessageImpl;
44 import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
46 public class Message1_1Impl extends MessageImpl implements SOAPConstants {
48 protected static final Logger log =
49 Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
50 "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
52 public Message1_1Impl() {
53 super();
54 }
56 public Message1_1Impl(boolean isFastInfoset, boolean acceptFastInfoset) {
57 super(isFastInfoset, acceptFastInfoset);
58 }
60 public Message1_1Impl(SOAPMessage msg) {
61 super(msg);
62 }
64 // unused. can we delete this? - Kohsuke
65 public Message1_1Impl(MimeHeaders headers, InputStream in)
66 throws IOException, SOAPExceptionImpl {
67 super(headers, in);
68 }
70 public Message1_1Impl(MimeHeaders headers, ContentType ct, int stat, InputStream in)
71 throws SOAPExceptionImpl {
72 super(headers,ct,stat,in);
73 }
75 public SOAPPart getSOAPPart() {
76 if (soapPart == null) {
77 soapPart = new SOAPPart1_1Impl(this);
78 }
79 return soapPart;
80 }
82 protected boolean isCorrectSoapVersion(int contentTypeId) {
83 return (contentTypeId & SOAP1_1_FLAG) != 0;
84 }
86 public String getAction() {
87 log.log(
88 Level.SEVERE,
89 "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
90 new String[] { "Action" });
91 throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
92 }
94 public void setAction(String type) {
95 log.log(
96 Level.SEVERE,
97 "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
98 new String[] { "Action" });
99 throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
100 }
102 public String getCharset() {
103 log.log(
104 Level.SEVERE,
105 "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
106 new String[] { "Charset" });
107 throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
108 }
110 public void setCharset(String charset) {
111 log.log(
112 Level.SEVERE,
113 "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
114 new String[] { "Charset" });
115 throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
116 }
118 protected String getExpectedContentType() {
119 return isFastInfoset ? "application/fastinfoset" : "text/xml";
120 }
122 protected String getExpectedAcceptHeader() {
123 String accept = "text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
124 return acceptFastInfoset ? ("application/fastinfoset, " + accept) : accept;
125 }
127 }