1 /* 2 * Copyright 2007 the original author or authors. 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 17 package org.springframework.ws.soap.security; 18 19 import javax.xml.namespace.QName; 20 21 /** 22 * Exception indicating that a WS-Security executions should result in a SOAP Fault. 23 * 24 * @author Arjen Poutsma 25 * @since 1.0.1 26 */ 27 public abstract class WsSecurityFaultException extends WsSecurityException { 28 29 private QName faultCode; 30 31 private String faultString; 32 33 private String faultActor; 34 35 /** Construct a new <code>WsSecurityFaultException</code> with the given fault code, string, and actor. */ 36 public WsSecurityFaultException(QName faultCode, String faultString, String faultActor) { 37 super(faultString); 38 this.faultCode = faultCode; 39 this.faultString = faultString; 40 this.faultActor = faultActor; 41 } 42 43 /** Returns the fault code for the exception. */ 44 public QName getFaultCode() { 45 return faultCode; 46 } 47 48 /** Returns the fault string for the exception. */ 49 public String getFaultString() { 50 return faultString; 51 } 52 53 /** Returns the fault actor for the exception. */ 54 public String getFaultActor() { 55 return faultActor; 56 } 57 }