< prev index next >

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

Print this page


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


  37  * <P>
  38  * A {@code SOAPPart} object is a MIME part and has the MIME headers
  39  * Content-Id, Content-Location, and Content-Type.  Because the value of
  40  * Content-Type must be "text/xml", a {@code SOAPPart} object automatically
  41  * has a MIME header of Content-Type with its value set to "text/xml".
  42  * The value must be "text/xml" because content in the SOAP part of a
  43  * message must be in XML format.  Content that is not of type "text/xml"
  44  * must be in an {@code AttachmentPart} object rather than in the
  45  * {@code SOAPPart} object.
  46  * <P>
  47  * When a message is sent, its SOAP part must have the MIME header Content-Type
  48  * set to "text/xml". Or, from the other perspective, the SOAP part of any
  49  * message that is received must have the MIME header Content-Type with a
  50  * value of "text/xml".
  51  * <P>
  52  * A client can access the {@code SOAPPart} object of a
  53  * {@code SOAPMessage} object by
  54  * calling the method {@code SOAPMessage.getSOAPPart}. The
  55  * following  line of code, in which {@code message} is a
  56  * {@code SOAPMessage} object, retrieves the SOAP part of a message.
  57  * <PRE>
  58  *   SOAPPart soapPart = message.getSOAPPart();
  59  * </PRE>
  60  * <P>
  61  * A {@code SOAPPart} object contains a {@code SOAPEnvelope} object,
  62  * which in turn contains a {@code SOAPBody} object and a
  63  * {@code SOAPHeader} object.
  64  * The {@code SOAPPart} method {@code getEnvelope} can be used
  65  * to retrieve the {@code SOAPEnvelope} object.
  66  *
  67  * @since 1.6
  68  */
  69 public abstract class SOAPPart implements org.w3c.dom.Document, Node {
  70 
  71     /**
  72      * Gets the {@code SOAPEnvelope} object associated with this
  73      * {@code SOAPPart} object. Once the SOAP envelope is obtained, it
  74      * can be used to get its contents.
  75      *
  76      * @return the {@code SOAPEnvelope} object for this
  77      *           {@code SOAPPart} object
  78      * @exception SOAPException if there is a SOAP error
  79      */


   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


  37  * <P>
  38  * A {@code SOAPPart} object is a MIME part and has the MIME headers
  39  * Content-Id, Content-Location, and Content-Type.  Because the value of
  40  * Content-Type must be "text/xml", a {@code SOAPPart} object automatically
  41  * has a MIME header of Content-Type with its value set to "text/xml".
  42  * The value must be "text/xml" because content in the SOAP part of a
  43  * message must be in XML format.  Content that is not of type "text/xml"
  44  * must be in an {@code AttachmentPart} object rather than in the
  45  * {@code SOAPPart} object.
  46  * <P>
  47  * When a message is sent, its SOAP part must have the MIME header Content-Type
  48  * set to "text/xml". Or, from the other perspective, the SOAP part of any
  49  * message that is received must have the MIME header Content-Type with a
  50  * value of "text/xml".
  51  * <P>
  52  * A client can access the {@code SOAPPart} object of a
  53  * {@code SOAPMessage} object by
  54  * calling the method {@code SOAPMessage.getSOAPPart}. The
  55  * following  line of code, in which {@code message} is a
  56  * {@code SOAPMessage} object, retrieves the SOAP part of a message.
  57  * {@code
  58  *   SOAPPart soapPart = message.getSOAPPart();
  59  * }
  60  * <P>
  61  * A {@code SOAPPart} object contains a {@code SOAPEnvelope} object,
  62  * which in turn contains a {@code SOAPBody} object and a
  63  * {@code SOAPHeader} object.
  64  * The {@code SOAPPart} method {@code getEnvelope} can be used
  65  * to retrieve the {@code SOAPEnvelope} object.
  66  *
  67  * @since 1.6
  68  */
  69 public abstract class SOAPPart implements org.w3c.dom.Document, Node {
  70 
  71     /**
  72      * Gets the {@code SOAPEnvelope} object associated with this
  73      * {@code SOAPPart} object. Once the SOAP envelope is obtained, it
  74      * can be used to get its contents.
  75      *
  76      * @return the {@code SOAPEnvelope} object for this
  77      *           {@code SOAPPart} object
  78      * @exception SOAPException if there is a SOAP error
  79      */


< prev index next >