01: /*
02: *
03: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
04: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License version
08: * 2 only, as published by the Free Software Foundation.
09: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * General Public License version 2 for more details (a copy is
14: * included at /legal/license.txt).
15: *
16: * You should have received a copy of the GNU General Public License
17: * version 2 along with this work; if not, write to the Free Software
18: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19: * 02110-1301 USA
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
22: * Clara, CA 95054 or visit www.sun.com if you need additional
23: * information or have any questions.
24: */
25:
26: package javax.microedition.xml.rpc;
27:
28: import javax.xml.namespace.QName;
29:
30: /**
31: * The <code>FaultDetailException</code> class
32: * is used to return service specific exception detail values, and
33: * an associated <code>QName</code>, to a <code>Stub</code> instance.
34: *
35: * <p>This exception class is returned from the runtime implementation
36: * as the <code>cause</code> of a <code>JAXRPCException</code> and
37: * retrieved via the <code>JAXRPCException.getLinkedCause</code> method.
38: *
39: * @see javax.xml.rpc.JAXRPCException
40: * @see javax.microedition.xml.rpc.FaultDetailHandler
41: * @version 1.0
42: */
43: public class FaultDetailException extends java.lang.Exception {
44:
45: private Object faultDetail;
46: private QName faultDetailName;
47:
48: /**
49: * Constructs a new exception with the specified fault detail
50: * and associated fault detail <code>QName</code>.
51: *
52: * @param faultDetail Object array containing the values for
53: * SOAP fault detail. The values are retrieved using
54: * the getFaultDetail method
55: * @param faultDetailName the <code>QName</code> of the SOAP fault
56: * detail element
57: *
58: * @see javax.xml.namespace.QName
59: */
60: public FaultDetailException(QName faultDetailName,
61: Object faultDetail) {
62: this .faultDetail = faultDetail;
63: this .faultDetailName = faultDetailName;
64: }
65:
66: /**
67: * Returns the fault detail values
68: *
69: * @return the fault detail values for the service specific exception
70: */
71: public Object getFaultDetail() {
72: return this .faultDetail;
73: }
74:
75: /**
76: * Returns the QName of the fault detail element associated
77: * with this exception.
78: *
79: * @return the <code>QName</code> of the fault detail element
80: * @see javax.xml.namespace.QName
81: */
82: public QName getFaultDetailName() {
83: return this.faultDetailName;
84: }
85:
86: }
|