Merge branch '4.0.x'

Closes gh-1508
This commit is contained in:
Stéphane Nicoll
2025-03-25 15:14:29 +01:00

View File

@@ -19,45 +19,53 @@ package org.springframework.ws.soap;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
/** /**
* Represents the {@code Fault} element in the body of a SOAP message. * Represent the {@code Fault} element in the body of a SOAP message.
* <p> * <p>
* A fault consists of a {@link #getFaultCode() fault code}, {@link #getFaultActorOrRole * A fault consists of a {@linkplain #getFaultCode() fault code},
* fault string/reason}, and {@link #getFaultActorOrRole() role}. * {@linkplain #getFaultStringOrReason() fault string/reason}, and
* {@link #getFaultActorOrRole() role}.
* <p>
* A fault also can have a {@link SoapFaultDetail detail}.
* *
* @author Arjen Poutsma * @author Arjen Poutsma
* @since 1.0.0 * @since 1.0.0
*/ */
public interface SoapFault extends SoapElement { public interface SoapFault extends SoapElement {
/** Returns the fault code. */ /**
* Return the type of fault.
*/
QName getFaultCode(); QName getFaultCode();
/** /**
* Returns the fault string or reason. For SOAP 1.1, this returns the fault string. * Return a human-readable information about the nature of the fault. For SOAP 1.1,
* For SOAP 1.2, this returns the fault reason for the default locale. * this returns the fault string. For SOAP 1.2, this returns the fault reason for the
* default locale.
*/ */
String getFaultStringOrReason(); String getFaultStringOrReason();
/** /**
* Returns the fault actor or role. For SOAP 1.1, this returns the actor. For SOAP * Return the optional fault actor or role. For SOAP 1.1, this returns the URI of the
* 1.2, this returns the role. * SOAP node that generated the fault. For SOAP 1.2, this returns the URI that
* identifies the role in which the node was operating at the point the fault
* occurred.
*/ */
String getFaultActorOrRole(); String getFaultActorOrRole();
/** /**
* Sets the fault actor. For SOAP 1.1, this sets the actor. For SOAP 1.2, this sets * Set the fault actor or role. For SOAP 1.1, this sets the actor. For SOAP 1.2, this
* the role. * sets the role.
*/ */
void setFaultActorOrRole(String faultActor); void setFaultActorOrRole(String faultActor);
/** /**
* Returns the optional detail element for this {@code SoapFault}. * Return the optional {@linkplain SoapFaultDetail detail element} of this fault.
* @return a fault detail * @return a fault detail
*/ */
SoapFaultDetail getFaultDetail(); SoapFaultDetail getFaultDetail();
/** /**
* Creates an optional {@code SoapFaultDetail} object and assigns it to this fault. * Create a {@link SoapFaultDetail} and assign it to this fault.
* @return the created detail * @return the created detail
*/ */
SoapFaultDetail addFaultDetail(); SoapFaultDetail addFaultDetail();