KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > saaj > SOAPFaultImpl


1 /*
2  * Copyright 2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis2.saaj;
17
18 import javax.xml.soap.Detail JavaDoc;
19 import javax.xml.soap.Name JavaDoc;
20 import javax.xml.soap.SOAPException JavaDoc;
21 import javax.xml.soap.SOAPFault JavaDoc;
22 import java.util.Locale JavaDoc;
23
24 /**
25  * Class SOAPFaultImpl
26  *
27  * @author Ashutosh Shahi
28  * ashutosh.shahi@gmail.com
29  *
30  * SOAPFault specific classes not implemented in OM, so
31  * throwing unsupported operation for the time being
32  */

33 public class SOAPFaultImpl extends SOAPBodyElementImpl implements SOAPFault JavaDoc {
34     
35     /**
36      * Field fault The omSOAPFault field
37      */

38     org.apache.axis2.soap.SOAPFault fault;
39     
40     /**
41      * Constructor SOAPFaultImpl
42      * @param fault
43      */

44     public SOAPFaultImpl(org.apache.axis2.soap.SOAPFault fault){
45         this.fault = fault;
46     }
47
48     /**
49      * Method setFaultCode
50      *
51      * @param faultCode
52      * @throws SOAPException
53      * @see javax.xml.soap.SOAPFault#setFaultCode(java.lang.String)
54      */

55     public void setFaultCode(String JavaDoc faultCode) throws SOAPException JavaDoc {
56         //QName qName = new QName(faultCode);
57
//fault.setFaultCode(qName);
58
throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
59     }
60
61     /**
62      * Method getFaultCode
63      *
64      * @return
65      * @see javax.xml.soap.SOAPFault#getFaultCode()
66      */

67     public String JavaDoc getFaultCode() {
68     
69         //QName qName = fault.getFaultCode();
70
//return qName.getLocalPart();
71
throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
72     }
73
74     /**
75      * method setFaultActor
76      *
77      * @param faultActor
78      * @throws SOAPException
79      * @see javax.xml.soap.SOAPFault#setFaultActor(java.lang.String)
80      */

81     public void setFaultActor(String JavaDoc faultActor) throws SOAPException JavaDoc {
82         
83         //fault.setFaultActor(faultActor);
84
throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
85     }
86
87     /**
88      * method getFaultActor
89      *
90      * @return
91      * @see javax.xml.soap.SOAPFault#getFaultActor()
92      */

93     public String JavaDoc getFaultActor() {
94     
95         //return fault.getFaultActor();
96
throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
97     }
98
99     /**
100      * method setFaultString
101      *
102      * @param faultString
103      * @throws SOAPException
104      * @see javax.xml.soap.SOAPFault#setFaultString(java.lang.String)
105      */

106     public void setFaultString(String JavaDoc faultString) throws SOAPException JavaDoc {
107     
108         //fault.setFaultString(faultString);
109
throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
110     }
111
112     /**
113      * method getFaultString
114      *
115      * @return
116      * @see javax.xml.soap.SOAPFault#getFaultString()
117      */

118     public String JavaDoc getFaultString() {
119     
120         //return fault.getFaultString();
121
throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
122     }
123
124     /**
125      * method getDetail
126      *
127      * @return
128      * @see javax.xml.soap.SOAPFault#getDetail()
129      */

130     public Detail JavaDoc getDetail() {
131         // May need to change after w have detail and detail entry implementation
132
//in SoapEnvelope of OM
133
/*QName detailName = new QName("detail");
134         DetailImpl detail = new DetailImpl(detailName, fault);
135         OMNode entry = fault.getDetailInformation();
136         detail.addDetailEntry(entry);
137         return detail;*/

138         throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
139     }
140
141     /**
142      * method addDetail
143      *
144      * @return
145      * @throws SOAPException
146      * @see javax.xml.soap.SOAPFault#addDetail()
147      */

148     public Detail JavaDoc addDetail() throws SOAPException JavaDoc {
149         // Not sure what detail information to add
150
//May need to change later
151
/*QName detailName = new QName("detail");
152         DetailImpl detail = new DetailImpl(detailName, fault);
153         return detail;*/

154         throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
155     }
156
157     /**
158      * method setFaultCode
159      *
160      * @param name
161      * @throws SOAPException
162      * @see javax.xml.soap.SOAPFault#setFaultCode(javax.xml.soap.Name)
163      */

164     public void setFaultCode(Name JavaDoc name) throws SOAPException JavaDoc {
165         
166         /*QName qName = new QName(name.getURI(), name.getLocalName(), name.getPrefix());
167         fault.setFaultCode(qName);*/

168         throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
169     }
170
171     /**
172      * method getFaultCodeAsName
173      *
174      * @return
175      * @see javax.xml.soap.SOAPFault#getFaultCodeAsName()
176      */

177     public Name JavaDoc getFaultCodeAsName() {
178     
179         /*QName qName = fault.getFaultCode();
180         Name name = new PrefixedQName(qName);
181         return name;*/

182         throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
183     }
184
185     /**
186      * method seFaultString
187      *
188      * @param faultString
189      * @param locale
190      * @throws SOAPException
191      * @see javax.xml.soap.SOAPFault#setFaultString(java.lang.String, java.util.Locale)
192      */

193     public void setFaultString(String JavaDoc faultString, Locale JavaDoc locale)
194             throws SOAPException JavaDoc {
195     
196         //fault.setFaultString(faultString);
197
throw new UnsupportedOperationException JavaDoc("No supoprted for M2 release");
198     }
199
200     /**
201      * method getFaultStringLocale
202      *
203      * @return
204      * @see javax.xml.soap.SOAPFault#getFaultStringLocale()
205      */

206     public Locale JavaDoc getFaultStringLocale() {
207         //No implementation in Axis 1.2 also, not sure what to do here
208
return null; //TODO
209
}
210
211 }
212
Popular Tags