src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java
author aefimov
Thu, 23 Nov 2017 18:23:15 +0000
changeset 47930 f2de2c55c6c7
parent 47216 71c04702a3d5
permissions -rw-r--r--
8187954: Update JAX-WS RI integration to latest version Reviewed-by: lancea Contributed-by: zheng.jun.li@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     1
/*
45678
65fdff10664d 8176508: Update JAX-WS RI integration to latest version
aefimov
parents: 31746
diff changeset
     2
 * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     4
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    10
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    15
 * accompanied this code).
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    16
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    20
 *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    23
 * questions.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    24
 */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    25
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    26
package javax.xml.soap;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    27
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    28
import java.util.Iterator;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    29
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    30
import javax.xml.transform.Source;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    31
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    32
/**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    33
 * The container for the SOAP-specific portion of a {@code SOAPMessage}
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    34
 * object. All messages are required to have a SOAP part, so when a
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    35
 * {@code SOAPMessage} object is created, it will automatically
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    36
 * have a {@code SOAPPart} object.
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    37
 * <P>
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    38
 * A {@code SOAPPart} object is a MIME part and has the MIME headers
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    39
 * Content-Id, Content-Location, and Content-Type.  Because the value of
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    40
 * Content-Type must be "text/xml", a {@code SOAPPart} object automatically
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    41
 * has a MIME header of Content-Type with its value set to "text/xml".
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    42
 * The value must be "text/xml" because content in the SOAP part of a
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    43
 * message must be in XML format.  Content that is not of type "text/xml"
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    44
 * must be in an {@code AttachmentPart} object rather than in the
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    45
 * {@code SOAPPart} object.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    46
 * <P>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    47
 * When a message is sent, its SOAP part must have the MIME header Content-Type
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    48
 * set to "text/xml". Or, from the other perspective, the SOAP part of any
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    49
 * message that is received must have the MIME header Content-Type with a
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    50
 * value of "text/xml".
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    51
 * <P>
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    52
 * A client can access the {@code SOAPPart} object of a
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    53
 * {@code SOAPMessage} object by
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    54
 * calling the method {@code SOAPMessage.getSOAPPart}. The
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    55
 * following  line of code, in which {@code message} is a
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    56
 * {@code SOAPMessage} object, retrieves the SOAP part of a message.
31746
7573de6b8e46 8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents: 30005
diff changeset
    57
 * <pre>{@code
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    58
 *   SOAPPart soapPart = message.getSOAPPart();
31746
7573de6b8e46 8130753: Sync-up javadoc changes in jax-ws area - includes JAX-B API, JAX-WS API, SAAJ-API
mkos
parents: 30005
diff changeset
    59
 * }</pre>
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    60
 * <P>
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    61
 * A {@code SOAPPart} object contains a {@code SOAPEnvelope} object,
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    62
 * which in turn contains a {@code SOAPBody} object and a
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    63
 * {@code SOAPHeader} object.
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    64
 * The {@code SOAPPart} method {@code getEnvelope} can be used
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    65
 * to retrieve the {@code SOAPEnvelope} object.
25840
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 22679
diff changeset
    66
 *
c2002453eec3 8047724: @since tag cleanup in jaxws
henryjen
parents: 22679
diff changeset
    67
 * @since 1.6
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    68
 */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    69
public abstract class SOAPPart implements org.w3c.dom.Document, Node {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    70
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    71
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    72
     * Gets the {@code SOAPEnvelope} object associated with this
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    73
     * {@code SOAPPart} object. Once the SOAP envelope is obtained, it
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    74
     * can be used to get its contents.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    75
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    76
     * @return the {@code SOAPEnvelope} object for this
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    77
     *           {@code SOAPPart} object
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    78
     * @exception SOAPException if there is a SOAP error
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    79
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    80
    public abstract SOAPEnvelope getEnvelope() throws SOAPException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    81
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    82
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    83
     * Retrieves the value of the MIME header whose name is "Content-Id".
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    84
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    85
     * @return a {@code String} giving the value of the MIME header
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    86
     *         named "Content-Id"
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    87
     * @see #setContentId
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    88
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    89
    public String getContentId() {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    90
        String[] values = getMimeHeader("Content-Id");
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    91
        if (values != null && values.length > 0)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    92
            return values[0];
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    93
        return null;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    94
    }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    95
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    96
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    97
     * Retrieves the value of the MIME header whose name is "Content-Location".
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
    98
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
    99
     * @return a {@code String} giving the value of the MIME header whose
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   100
     *          name is "Content-Location"
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   101
     * @see #setContentLocation
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   102
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   103
    public String getContentLocation() {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   104
        String[] values = getMimeHeader("Content-Location");
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   105
        if (values != null && values.length > 0)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   106
            return values[0];
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   107
        return null;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   108
    }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   109
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   110
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   111
     * Sets the value of the MIME header named "Content-Id"
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   112
     * to the given {@code String}.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   113
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   114
     * @param contentId a {@code String} giving the value of the MIME
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   115
     *        header "Content-Id"
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   116
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   117
     * @exception IllegalArgumentException if there is a problem in
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   118
     * setting the content id
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   119
     * @see #getContentId
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   120
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   121
    public void setContentId(String contentId)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   122
    {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   123
        setMimeHeader("Content-Id", contentId);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   124
    }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   125
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   126
     * Sets the value of the MIME header "Content-Location"
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   127
     * to the given {@code String}.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   128
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   129
     * @param contentLocation a {@code String} giving the value
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   130
     *        of the MIME
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   131
     *        header "Content-Location"
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   132
     * @exception IllegalArgumentException if there is a problem in
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   133
     *            setting the content location.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   134
     * @see #getContentLocation
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   135
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   136
    public void setContentLocation(String contentLocation)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   137
    {
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   138
        setMimeHeader("Content-Location", contentLocation);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   139
    }
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   140
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   141
     * Removes all MIME headers that match the given name.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   142
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   143
     * @param header a {@code String} giving the name of the MIME header(s) to
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   144
     *               be removed
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   145
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   146
    public abstract void removeMimeHeader(String header);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   147
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   148
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   149
     * Removes all the {@code MimeHeader} objects for this
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   150
     * {@code SOAPEnvelope} object.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   151
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   152
    public abstract void removeAllMimeHeaders();
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   153
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   154
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   155
     * Gets all the values of the {@code MimeHeader} object
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   156
     * in this {@code SOAPPart} object that
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   157
     * is identified by the given {@code String}.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   158
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   159
     * @param name the name of the header; example: "Content-Type"
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   160
     * @return a {@code String} array giving all the values for the
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   161
     *         specified header
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   162
     * @see #setMimeHeader
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   163
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   164
    public abstract String[] getMimeHeader(String name);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   165
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   166
    /**
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   167
     * Changes the first header entry that matches the given header name
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   168
     * so that its value is the given value, adding a new header with the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   169
     * given name and value if no
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   170
     * existing header is a match. If there is a match, this method clears
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   171
     * all existing values for the first header that matches and sets the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   172
     * given value instead. If more than one header has
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   173
     * the given name, this method removes all of the matching headers after
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   174
     * the first one.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   175
     * <P>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   176
     * Note that RFC822 headers can contain only US-ASCII characters.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   177
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   178
     * @param   name    a {@code String} giving the header name
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   179
     *                  for which to search
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   180
     * @param   value   a {@code String} giving the value to be set.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   181
     *                  This value will be substituted for the current value(s)
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   182
     *                  of the first header that is a match if there is one.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   183
     *                  If there is no match, this value will be the value for
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   184
     *                  a new {@code MimeHeader} object.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   185
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   186
     * @exception IllegalArgumentException if there was a problem with
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   187
     *            the specified mime header name or value
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   188
     * @see #getMimeHeader
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   189
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   190
    public abstract void setMimeHeader(String name, String value);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   191
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   192
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   193
     * Creates a {@code MimeHeader} object with the specified
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   194
     * name and value and adds it to this {@code SOAPPart} object.
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   195
     * If a {@code MimeHeader} with the specified name already
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   196
     * exists, this method adds the specified value to the already
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   197
     * existing value(s).
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   198
     * <P>
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   199
     * Note that RFC822 headers can contain only US-ASCII characters.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   200
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   201
     * @param   name    a {@code String} giving the header name
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   202
     * @param   value   a {@code String} giving the value to be set
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   203
     *                  or added
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   204
     * @exception IllegalArgumentException if there was a problem with
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   205
     *            the specified mime header name or value
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   206
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   207
    public abstract void addMimeHeader(String name, String value);
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   208
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   209
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   210
     * Retrieves all the headers for this {@code SOAPPart} object
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   211
     * as an iterator over the {@code MimeHeader} objects.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   212
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   213
     * @return  an {@code Iterator} object with all of the Mime
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   214
     *          headers for this {@code SOAPPart} object
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   215
     */
45678
65fdff10664d 8176508: Update JAX-WS RI integration to latest version
aefimov
parents: 31746
diff changeset
   216
    public abstract Iterator<MimeHeader> getAllMimeHeaders();
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   217
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   218
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   219
     * Retrieves all {@code MimeHeader} objects that match a name in
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   220
     * the given array.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   221
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   222
     * @param names a {@code String} array with the name(s) of the
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   223
     *        MIME headers to be returned
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   224
     * @return  all of the MIME headers that match one of the names in the
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   225
     *           given array, returned as an {@code Iterator} object
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   226
     */
45678
65fdff10664d 8176508: Update JAX-WS RI integration to latest version
aefimov
parents: 31746
diff changeset
   227
    public abstract Iterator<MimeHeader> getMatchingMimeHeaders(String[] names);
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   228
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   229
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   230
     * Retrieves all {@code MimeHeader} objects whose name does
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   231
     * not match a name in the given array.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   232
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   233
     * @param names a {@code String} array with the name(s) of the
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   234
     *        MIME headers not to be returned
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   235
     * @return  all of the MIME headers in this {@code SOAPPart} object
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   236
     *          except those that match one of the names in the
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   237
     *           given array.  The nonmatching MIME headers are returned as an
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   238
     *           {@code Iterator} object.
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   239
     */
45678
65fdff10664d 8176508: Update JAX-WS RI integration to latest version
aefimov
parents: 31746
diff changeset
   240
    public abstract Iterator<MimeHeader> getNonMatchingMimeHeaders(String[] names);
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   241
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   242
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   243
     * Sets the content of the {@code SOAPEnvelope} object with the data
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   244
     * from the given {@code Source} object. This {@code Source}
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   245
     * must contain a valid SOAP document.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   246
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   247
     * @param source the {@code javax.xml.transform.Source} object with the
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   248
     *        data to be set
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   249
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   250
     * @exception SOAPException if there is a problem in setting the source
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   251
     * @see #getContent
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   252
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   253
    public abstract void setContent(Source source) throws SOAPException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   254
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   255
    /**
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   256
     * Returns the content of the SOAPEnvelope as a JAXP {@code Source}
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   257
     * object.
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   258
     *
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   259
     * @return the content as a {@code javax.xml.transform.Source} object
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   260
     *
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   261
     * @exception SOAPException if the implementation cannot convert
30005
b2f720a258c4 8077332: tidy warnings from javax/xml
avstepan
parents: 28326
diff changeset
   262
     *                          the specified {@code Source} object
12009
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   263
     * @see #setContent
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   264
     */
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   265
    public abstract Source getContent() throws SOAPException;
4abb694f273a 7150322: Stop using drop source bundles in jaxws
ohair
parents:
diff changeset
   266
}