KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > soap > impl > llom > soap11 > SOAP11FaultSubCodeImpl


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

29
30 public class SOAP11FaultSubCodeImpl extends SOAPFaultSubCodeImpl{
31     //changed
32
public SOAP11FaultSubCodeImpl(SOAPFaultCode parent) throws SOAPProcessingException {
33         super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
34     }
35
36     //changed
37
public SOAP11FaultSubCodeImpl(SOAPFaultCode parent, OMXMLParserWrapper builder) {
38         super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder);
39     }
40
41     public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent) throws SOAPProcessingException {
42         super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
43     }
44
45     public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent, OMXMLParserWrapper builder) {
46         super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder);
47     }
48
49     protected void checkParent(OMElement parent) throws SOAPProcessingException {
50         if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) {
51             throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP FaultSubCode or SOAP FaultCode as the parent. But received some other implementation");
52         }
53     }
54
55     public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
56         if (!(subCode instanceof SOAP11FaultSubCodeImpl)) {
57             throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Sub Code. But received some other implementation");
58         }
59         super.setSubCode(subCode);
60     }
61
62     public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException {
63         if (!(soapFaultSubCodeValue instanceof SOAP11FaultValueImpl)) {
64             throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Value. But received some other implementation");
65         }
66         super.setValue(soapFaultSubCodeValue);
67     }
68
69
70 }
71
Popular Tags