< prev index next >

jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java

Print this page


   1 /*
   2  * Copyright (c) 2004, 2015, 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


 196      * exists, this method adds the specified value to the already
 197      * existing value(s).
 198      * <P>
 199      * Note that RFC822 headers can contain only US-ASCII characters.
 200      *
 201      * @param   name    a {@code String} giving the header name
 202      * @param   value   a {@code String} giving the value to be set
 203      *                  or added
 204      * @exception IllegalArgumentException if there was a problem with
 205      *            the specified mime header name or value
 206      */
 207     public abstract void addMimeHeader(String name, String value);
 208 
 209     /**
 210      * Retrieves all the headers for this {@code SOAPPart} object
 211      * as an iterator over the {@code MimeHeader} objects.
 212      *
 213      * @return  an {@code Iterator} object with all of the Mime
 214      *          headers for this {@code SOAPPart} object
 215      */
 216     public abstract Iterator getAllMimeHeaders();
 217 
 218     /**
 219      * Retrieves all {@code MimeHeader} objects that match a name in
 220      * the given array.
 221      *
 222      * @param names a {@code String} array with the name(s) of the
 223      *        MIME headers to be returned
 224      * @return  all of the MIME headers that match one of the names in the
 225      *           given array, returned as an {@code Iterator} object
 226      */
 227     public abstract Iterator getMatchingMimeHeaders(String[] names);
 228 
 229     /**
 230      * Retrieves all {@code MimeHeader} objects whose name does
 231      * not match a name in the given array.
 232      *
 233      * @param names a {@code String} array with the name(s) of the
 234      *        MIME headers not to be returned
 235      * @return  all of the MIME headers in this {@code SOAPPart} object
 236      *          except those that match one of the names in the
 237      *           given array.  The nonmatching MIME headers are returned as an
 238      *           {@code Iterator} object.
 239      */
 240     public abstract Iterator getNonMatchingMimeHeaders(String[] names);
 241 
 242     /**
 243      * Sets the content of the {@code SOAPEnvelope} object with the data
 244      * from the given {@code Source} object. This {@code Source}
 245      * must contain a valid SOAP document.
 246      *
 247      * @param source the {@code javax.xml.transform.Source} object with the
 248      *        data to be set
 249      *
 250      * @exception SOAPException if there is a problem in setting the source
 251      * @see #getContent
 252      */
 253     public abstract void setContent(Source source) throws SOAPException;
 254 
 255     /**
 256      * Returns the content of the SOAPEnvelope as a JAXP {@code Source}
 257      * object.
 258      *
 259      * @return the content as a {@code javax.xml.transform.Source} object
 260      *
   1 /*
   2  * Copyright (c) 2004, 2017, 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


 196      * exists, this method adds the specified value to the already
 197      * existing value(s).
 198      * <P>
 199      * Note that RFC822 headers can contain only US-ASCII characters.
 200      *
 201      * @param   name    a {@code String} giving the header name
 202      * @param   value   a {@code String} giving the value to be set
 203      *                  or added
 204      * @exception IllegalArgumentException if there was a problem with
 205      *            the specified mime header name or value
 206      */
 207     public abstract void addMimeHeader(String name, String value);
 208 
 209     /**
 210      * Retrieves all the headers for this {@code SOAPPart} object
 211      * as an iterator over the {@code MimeHeader} objects.
 212      *
 213      * @return  an {@code Iterator} object with all of the Mime
 214      *          headers for this {@code SOAPPart} object
 215      */
 216     public abstract Iterator<MimeHeader> getAllMimeHeaders();
 217 
 218     /**
 219      * Retrieves all {@code MimeHeader} objects that match a name in
 220      * the given array.
 221      *
 222      * @param names a {@code String} array with the name(s) of the
 223      *        MIME headers to be returned
 224      * @return  all of the MIME headers that match one of the names in the
 225      *           given array, returned as an {@code Iterator} object
 226      */
 227     public abstract Iterator<MimeHeader> getMatchingMimeHeaders(String[] names);
 228 
 229     /**
 230      * Retrieves all {@code MimeHeader} objects whose name does
 231      * not match a name in the given array.
 232      *
 233      * @param names a {@code String} array with the name(s) of the
 234      *        MIME headers not to be returned
 235      * @return  all of the MIME headers in this {@code SOAPPart} object
 236      *          except those that match one of the names in the
 237      *           given array.  The nonmatching MIME headers are returned as an
 238      *           {@code Iterator} object.
 239      */
 240     public abstract Iterator<MimeHeader> getNonMatchingMimeHeaders(String[] names);
 241 
 242     /**
 243      * Sets the content of the {@code SOAPEnvelope} object with the data
 244      * from the given {@code Source} object. This {@code Source}
 245      * must contain a valid SOAP document.
 246      *
 247      * @param source the {@code javax.xml.transform.Source} object with the
 248      *        data to be set
 249      *
 250      * @exception SOAPException if there is a problem in setting the source
 251      * @see #getContent
 252      */
 253     public abstract void setContent(Source source) throws SOAPException;
 254 
 255     /**
 256      * Returns the content of the SOAPEnvelope as a JAXP {@code Source}
 257      * object.
 258      *
 259      * @return the content as a {@code javax.xml.transform.Source} object
 260      *
< prev index next >