< prev index next >

src/java.xml.ws/share/classes/javax/xml/soap/SOAPBody.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


 241      */
 242     public SOAPBodyElement addBodyElement(Name name) throws SOAPException;
 243 
 244 
 245     /**
 246      * Creates a new {@code SOAPBodyElement} object with the specified
 247      * QName and adds it to this {@code SOAPBody} object.
 248      *
 249      * @param qname
 250      *            a {@code QName} object with the qname for the new
 251      *            {@code SOAPBodyElement} object
 252      * @return the new {@code SOAPBodyElement} object
 253      * @exception SOAPException
 254      *                if a SOAP error occurs
 255      * @see SOAPBody#addBodyElement(Name)
 256      * @since 1.6, SAAJ 1.3
 257      */
 258     public SOAPBodyElement addBodyElement(QName qname) throws SOAPException;
 259 
 260     /**
 261      * Adds the root node of the DOM <code>{@link org.w3c.dom.Document}</code>
 262      * to this {@code SOAPBody} object.
 263      * <p>
 264      * Calling this method invalidates the {@code document} parameter.
 265      * The client application should discard all references to this {@code Document}
 266      * and its contents upon calling {@code addDocument}. The behavior
 267      * of an application that continues to use such references is undefined.
 268      *
 269      * @param document
 270      *            the {@code Document} object whose root node will be
 271      *            added to this {@code SOAPBody}.
 272      * @return the {@code SOAPBodyElement} that represents the root node
 273      *         that was added.
 274      * @exception SOAPException
 275      *                if the {@code Document} cannot be added
 276      * @since 1.6, SAAJ 1.2
 277      */
 278     public SOAPBodyElement addDocument(org.w3c.dom.Document document)
 279         throws SOAPException;
 280 
 281     /**
 282      * Creates a new DOM <code>{@link org.w3c.dom.Document}</code> and sets
 283      * the first child of this {@code SOAPBody} as it's document
 284      * element. The child {@code SOAPElement} is removed as part of the
 285      * process.
 286      *
 287      * @return the <code>{@link org.w3c.dom.Document}</code> representation
 288      *         of the {@code SOAPBody} content.
 289      *
 290      * @exception SOAPException
 291      *            if there is not exactly one child {@code SOAPElement} of the
 292      *            {@code SOAPBody}.
 293      *
 294      * @since 1.6, SAAJ 1.3
 295      */
 296     public org.w3c.dom.Document extractContentAsDocument()
 297         throws SOAPException;
 298 }
   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


 241      */
 242     public SOAPBodyElement addBodyElement(Name name) throws SOAPException;
 243 
 244 
 245     /**
 246      * Creates a new {@code SOAPBodyElement} object with the specified
 247      * QName and adds it to this {@code SOAPBody} object.
 248      *
 249      * @param qname
 250      *            a {@code QName} object with the qname for the new
 251      *            {@code SOAPBodyElement} object
 252      * @return the new {@code SOAPBodyElement} object
 253      * @exception SOAPException
 254      *                if a SOAP error occurs
 255      * @see SOAPBody#addBodyElement(Name)
 256      * @since 1.6, SAAJ 1.3
 257      */
 258     public SOAPBodyElement addBodyElement(QName qname) throws SOAPException;
 259 
 260     /**
 261      * Adds the root node of the DOM {@link org.w3c.dom.Document}
 262      * to this {@code SOAPBody} object.
 263      * <p>
 264      * Calling this method invalidates the {@code document} parameter.
 265      * The client application should discard all references to this {@code Document}
 266      * and its contents upon calling {@code addDocument}. The behavior
 267      * of an application that continues to use such references is undefined.
 268      *
 269      * @param document
 270      *            the {@code Document} object whose root node will be
 271      *            added to this {@code SOAPBody}.
 272      * @return the {@code SOAPBodyElement} that represents the root node
 273      *         that was added.
 274      * @exception SOAPException
 275      *                if the {@code Document} cannot be added
 276      * @since 1.6, SAAJ 1.2
 277      */
 278     public SOAPBodyElement addDocument(org.w3c.dom.Document document)
 279         throws SOAPException;
 280 
 281     /**
 282      * Creates a new DOM {@link org.w3c.dom.Document} and sets
 283      * the first child of this {@code SOAPBody} as it's document
 284      * element. The child {@code SOAPElement} is removed as part of the
 285      * process.
 286      *
 287      * @return the {@link org.w3c.dom.Document} representation
 288      *         of the {@code SOAPBody} content.
 289      *
 290      * @exception SOAPException
 291      *            if there is not exactly one child {@code SOAPElement} of the
 292      *            {@code SOAPBody}.
 293      *
 294      * @since 1.6, SAAJ 1.3
 295      */
 296     public org.w3c.dom.Document extractContentAsDocument()
 297         throws SOAPException;
 298 }
< prev index next >