KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > soap > impl > llom > SOAPFaultSubCodeImpl


1 package org.apache.axis2.soap.impl.llom;
2
3 import org.apache.axis2.om.OMElement;
4 import org.apache.axis2.om.OMXMLParserWrapper;
5 import org.apache.axis2.soap.SOAPFaultSubCode;
6 import org.apache.axis2.soap.SOAPFaultValue;
7 import org.apache.axis2.soap.impl.llom.soap12.SOAP12Constants;
8 import org.apache.axis2.soap.impl.llom.util.UtilProvider;
9
10 /*
11  * Copyright 2004,2005 The Apache Software Foundation.
12  *
13  * Licensed under the Apache License, Version 2.0 (the "License");
14  * you may not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * http://www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an "AS IS" BASIS,
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  *
25  * author : Eran Chinthaka (chinthaka@apache.org)
26  */

27
28 public abstract class SOAPFaultSubCodeImpl extends SOAPElement implements SOAPFaultSubCode {
29
30     protected SOAPFaultValue value;
31     protected SOAPFaultSubCode subCode;
32
33
34     protected SOAPFaultSubCodeImpl(OMElement parent, String JavaDoc localName) throws SOAPProcessingException {
35         super(parent, localName, true);
36     }
37
38     protected SOAPFaultSubCodeImpl(OMElement parent, String JavaDoc localName, OMXMLParserWrapper builder) {
39         super(parent, localName, builder);
40     }
41
42     public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException {
43         UtilProvider.setNewElement(this, value, soapFaultSubCodeValue);
44     }
45
46     public SOAPFaultValue getValue() {
47         if (value == null) {
48             value = (SOAPFaultValue) UtilProvider.getChildWithName(this, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME);
49         }
50         return value;
51     }
52
53     public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
54         UtilProvider.setNewElement(this, this.subCode, subCode);
55
56     }
57
58     public SOAPFaultSubCode getSubCode() {
59         if (subCode == null) {
60             subCode = (SOAPFaultSubCode) UtilProvider.getChildWithName(this, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
61         }
62         return subCode;
63     }
64 }
65
Popular Tags