001    /** 
002     * 
003     * Copyright 2004 Protique Ltd
004     * 
005     * Licensed under the Apache License, Version 2.0 (the "License"); 
006     * you may not use this file except in compliance with the License. 
007     * You may obtain a copy of the License at 
008     * 
009     * http://www.apache.org/licenses/LICENSE-2.0
010     * 
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS, 
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
014     * See the License for the specific language governing permissions and 
015     * limitations under the License. 
016     * 
017     **/
018    package org.codehaus.activesoap;
019    
020    /**
021     * Represents a SOAP fault which occurred while processing the
022     * message.
023     *
024     * @version $Revision: 1.5 $
025     */
026    public class SoapFault extends Exception {
027        private String code;
028        private String subcode;
029        private String reason;
030        private String node;
031        private String role;
032    
033        public SoapFault(Exception cause) {
034            super(cause);
035        }
036    
037        public SoapFault(String code, String reason) {
038            this.code = code;
039            this.reason = reason;
040        }
041    
042        public SoapFault(String code, String subcode, String reason) {
043            this.code = code;
044            this.subcode = subcode;
045            this.reason = reason;
046        }
047    
048        public SoapFault(String code, String reason, String node, String role) {
049            this.code = code;
050            this.reason = reason;
051            this.node = node;
052            this.role = role;
053        }
054    
055        public String getCode() {
056            return code;
057        }
058    
059        public String getSubcode() {
060            return subcode;
061        }
062    
063        public String getReason() {
064            return reason;
065        }
066    
067        public String getNode() {
068            return node;
069        }
070    
071        public String getRole() {
072            return role;
073        }
074    }