Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxws/src/share/jaxws_classes/javax/xml/soap/Detail.java
38890 views
/*1* Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.xml.soap;2627import java.util.Iterator;2829import javax.xml.namespace.QName;3031/**32* A container for <code>DetailEntry</code> objects. <code>DetailEntry</code>33* objects give detailed error information that is application-specific and34* related to the <code>SOAPBody</code> object that contains it.35*<P>36* A <code>Detail</code> object, which is part of a <code>SOAPFault</code>37* object, can be retrieved using the method <code>SOAPFault.getDetail</code>.38* The <code>Detail</code> interface provides two methods. One creates a new39* <code>DetailEntry</code> object and also automatically adds it to40* the <code>Detail</code> object. The second method gets a list of the41* <code>DetailEntry</code> objects contained in a <code>Detail</code>42* object.43* <P>44* The following code fragment, in which <i>sf</i> is a <code>SOAPFault</code>45* object, gets its <code>Detail</code> object (<i>d</i>), adds a new46* <code>DetailEntry</code> object to <i>d</i>, and then gets a list of all the47* <code>DetailEntry</code> objects in <i>d</i>. The code also creates a48* <code>Name</code> object to pass to the method <code>addDetailEntry</code>.49* The variable <i>se</i>, used to create the <code>Name</code> object,50* is a <code>SOAPEnvelope</code> object.51* <PRE>52* Detail d = sf.getDetail();53* Name name = se.createName("GetLastTradePrice", "WOMBAT",54* "http://www.wombat.org/trader");55* d.addDetailEntry(name);56* Iterator it = d.getDetailEntries();57* </PRE>58*/59public interface Detail extends SOAPFaultElement {6061/**62* Creates a new <code>DetailEntry</code> object with the given63* name and adds it to this <code>Detail</code> object.64*65* @param name a <code>Name</code> object identifying the66* new <code>DetailEntry</code> object67*68* @exception SOAPException thrown when there is a problem in adding a69* DetailEntry object to this Detail object.70*71* @see Detail#addDetailEntry(QName qname)72*/73public DetailEntry addDetailEntry(Name name) throws SOAPException;7475/**76* Creates a new <code>DetailEntry</code> object with the given77* QName and adds it to this <code>Detail</code> object. This method78* is the preferred over the one using Name.79*80* @param qname a <code>QName</code> object identifying the81* new <code>DetailEntry</code> object82*83* @exception SOAPException thrown when there is a problem in adding a84* DetailEntry object to this Detail object.85*86* @see Detail#addDetailEntry(Name name)87* @since SAAJ 1.388*/89public DetailEntry addDetailEntry(QName qname) throws SOAPException;9091/**92* Gets an Iterator over all of the <code>DetailEntry</code>s in this <code>Detail</code> object.93*94* @return an <code>Iterator</code> object over the <code>DetailEntry</code>95* objects in this <code>Detail</code> object96*/97public Iterator getDetailEntries();98}99100101