1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/jaxws_classes/javax/xml/soap/Detail.java Wed Apr 27 01:27:09 2016 +0800 1.3 @@ -0,0 +1,99 @@ 1.4 +/* 1.5 + * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 + 1.29 +package javax.xml.soap; 1.30 + 1.31 +import java.util.Iterator; 1.32 + 1.33 +import javax.xml.namespace.QName; 1.34 + 1.35 +/** 1.36 + * A container for <code>DetailEntry</code> objects. <code>DetailEntry</code> 1.37 + * objects give detailed error information that is application-specific and 1.38 + * related to the <code>SOAPBody</code> object that contains it. 1.39 + *<P> 1.40 + * A <code>Detail</code> object, which is part of a <code>SOAPFault</code> 1.41 + * object, can be retrieved using the method <code>SOAPFault.getDetail</code>. 1.42 + * The <code>Detail</code> interface provides two methods. One creates a new 1.43 + * <code>DetailEntry</code> object and also automatically adds it to 1.44 + * the <code>Detail</code> object. The second method gets a list of the 1.45 + * <code>DetailEntry</code> objects contained in a <code>Detail</code> 1.46 + * object. 1.47 + * <P> 1.48 + * The following code fragment, in which <i>sf</i> is a <code>SOAPFault</code> 1.49 + * object, gets its <code>Detail</code> object (<i>d</i>), adds a new 1.50 + * <code>DetailEntry</code> object to <i>d</i>, and then gets a list of all the 1.51 + * <code>DetailEntry</code> objects in <i>d</i>. The code also creates a 1.52 + * <code>Name</code> object to pass to the method <code>addDetailEntry</code>. 1.53 + * The variable <i>se</i>, used to create the <code>Name</code> object, 1.54 + * is a <code>SOAPEnvelope</code> object. 1.55 + * <PRE> 1.56 + * Detail d = sf.getDetail(); 1.57 + * Name name = se.createName("GetLastTradePrice", "WOMBAT", 1.58 + * "http://www.wombat.org/trader"); 1.59 + * d.addDetailEntry(name); 1.60 + * Iterator it = d.getDetailEntries(); 1.61 + * </PRE> 1.62 + */ 1.63 +public interface Detail extends SOAPFaultElement { 1.64 + 1.65 + /** 1.66 + * Creates a new <code>DetailEntry</code> object with the given 1.67 + * name and adds it to this <code>Detail</code> object. 1.68 + * 1.69 + * @param name a <code>Name</code> object identifying the 1.70 + * new <code>DetailEntry</code> object 1.71 + * 1.72 + * @exception SOAPException thrown when there is a problem in adding a 1.73 + * DetailEntry object to this Detail object. 1.74 + * 1.75 + * @see Detail#addDetailEntry(QName qname) 1.76 + */ 1.77 + public DetailEntry addDetailEntry(Name name) throws SOAPException; 1.78 + 1.79 + /** 1.80 + * Creates a new <code>DetailEntry</code> object with the given 1.81 + * QName and adds it to this <code>Detail</code> object. This method 1.82 + * is the preferred over the one using Name. 1.83 + * 1.84 + * @param qname a <code>QName</code> object identifying the 1.85 + * new <code>DetailEntry</code> object 1.86 + * 1.87 + * @exception SOAPException thrown when there is a problem in adding a 1.88 + * DetailEntry object to this Detail object. 1.89 + * 1.90 + * @see Detail#addDetailEntry(Name name) 1.91 + * @since SAAJ 1.3 1.92 + */ 1.93 + public DetailEntry addDetailEntry(QName qname) throws SOAPException; 1.94 + 1.95 + /** 1.96 + * Gets an Iterator over all of the <code>DetailEntry</code>s in this <code>Detail</code> object. 1.97 + * 1.98 + * @return an <code>Iterator</code> object over the <code>DetailEntry</code> 1.99 + * objects in this <code>Detail</code> object 1.100 + */ 1.101 + public Iterator getDetailEntries(); 1.102 +}