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.soap; 17 18 import org.apache.axis2.om.OMElement; 19 import org.apache.axis2.om.OMException; 20 import org.apache.axis2.soap.impl.llom.SOAPProcessingException; 21 22 23 /** 24 * An element in the <CODE>SOAPBody</CODE> object that contains 25 * error and/or status information. This information may relate to 26 * errors in the <CODE>OMMessage</CODE> object or to problems 27 * that are not related to the content in the message itself. 28 * Problems not related to the message itself are generally errors 29 * in processing, such as the inability to communicate with an 30 * upstream server. 31 * <P> 32 * The <CODE>SOAPFault</CODE> interface provides methods for 33 * retrieving the information contained in a <CODE> 34 * SOAPFault</CODE> object and for setting the fault code, the 35 * fault actor, and a string describing the fault. B fault code is 36 * one of the codes defined in the SOAP 1.1 specification that 37 * describe the fault. An actor is an intermediate recipient to 38 * whom a message was routed. The message path may include one or 39 * more actors, or, if no actors are specified, the message goes 40 * only to the default actor, which is the final intended 41 * recipient. 42 */ 43 public interface SOAPFault extends OMElement { 44 45 /** 46 * SOAPFaultCode is a mandatory item in a Fault, in SOAP 1.2 specification 47 * @param soapFaultCode 48 */ 49 public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException ; 50 public SOAPFaultCode getCode(); 51 52 /** 53 * SOAPFaultReason is a mandatory item in a Fault, in SOAP 1.2 specification 54 * @param reason 55 */ 56 public void setReason(SOAPFaultReason reason) throws SOAPProcessingException; 57 public SOAPFaultReason getReason(); 58 59 /** 60 * SOAPFaultNode is an optional item in a Fault, in SOAP 1.2 specification 61 * @param node 62 */ 63 public void setNode(SOAPFaultNode node) throws SOAPProcessingException; 64 public SOAPFaultNode getNode(); 65 66 /** 67 * SOAPFaultRoleImpl is an optional item in a Fault, in SOAP 1.2 specification 68 * @param role 69 */ 70 public void setRole(SOAPFaultRole role) throws SOAPProcessingException; 71 public SOAPFaultRole getRole(); 72 73 /** 74 * SOAPFaultRoleImpl is an optional item in a Fault, in SOAP 1.2 specification 75 * @param detail 76 */ 77 public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException; 78 public SOAPFaultDetail getDetail(); 79 80 /** 81 * This will return if there is an exception in the SOAP fault. 82 * 83 * If the exception is like; 84 * <SOAPFault> 85 * <Detail> 86 * <Exception> stack trace goes here </Exception> 87 * </Detail> 88 * </SOAPFault> 89 * 90 * @return 91 * @throws org.apache.axis2.om.OMException 92 */ 93 public Exception getException() throws OMException; 94 public void setException(Exception e) throws OMException; 95 } 96