KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > lib > webservice > WebServiceException


1 /*
2  * CoadunationLib: The coaduntion implementation library.
3  * Copyright (C) 2006 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * WebServiceException.java
20  *
21  * The web service exception thrown when there is an error working with the
22  * web services.
23  */

24
25 // package path
26
package com.rift.coad.lib.webservice;
27
28 // imports
29
import com.rift.coad.lib.httpd.MimeTypes;
30
31 /**
32  * The web service exception thrown when there is an error working with the web
33  * services.
34  *
35  * @author Brett Chaldecott
36  */

37 public class WebServiceException extends java.lang.Exception JavaDoc {
38     
39     private String JavaDoc encoding = MimeTypes.PLAIN;
40     
41     /**
42      * Creates a new instance of <code>WebServiceException</code> without detail message.
43      *
44      * @param msg the detail message.
45      */

46     public WebServiceException(String JavaDoc msg) {
47         super(msg);
48     }
49     
50     
51     /**
52      * Creates a new instance of <code>WebServiceException</code> without detail message.
53      *
54      * @param msg the detail message.
55      * @param encoding The encoding of the string
56      */

57     public WebServiceException(String JavaDoc msg, String JavaDoc encoding) {
58         super(msg);
59         this.encoding = encoding;
60     }
61     
62     
63     /**
64      * Constructs an instance of <code>WebServiceException</code> with the specified detail message.
65      *
66      * @param msg the detail message.
67      * @param ex The exception stack trace.
68      */

69     public WebServiceException(String JavaDoc msg,Throwable JavaDoc ex) {
70         super(msg,ex);
71     }
72     
73     
74     /**
75      * Constructs an instance of <code>WebServiceException</code> with the specified detail message.
76      *
77      * @param msg the detail message.
78      * @param encoding The encoding of the string
79      * @param ex The exception stack trace.
80      */

81     public WebServiceException(String JavaDoc msg,String JavaDoc encoding,Throwable JavaDoc ex) {
82         super(msg,ex);
83         this.encoding = encoding;
84     }
85     
86     
87     /**
88      * This method returns the encoding of the message.
89      *
90      * @return Encoding of the string message.
91      */

92     public String JavaDoc getEncoding() {
93         return encoding;
94     }
95 }
96
Popular Tags