Interface FaultAwareWebServiceConnection

All Superinterfaces:
AutoCloseable, WebServiceConnection
All Known Implementing Classes:
AbstractHttpSenderConnection, ClientHttpRequestConnection, CommonsHttpConnection, HttpComponents5Connection, HttpComponentsConnection, HttpExchangeConnection, HttpServletConnection, HttpUrlConnection, JdkHttpClientConnection

public interface FaultAwareWebServiceConnection extends WebServiceConnection
Sub-interface of WebServiceConnection that is aware of any Fault messages received. Fault messages (such as SoapFault SOAP Faults) often require different processing rules. Typically, fault detection is done by inspecting connection error codes, etc.
Since:
1.0.0
Author:
Arjen Poutsma
  • Method Details

    • hasFault

      boolean hasFault() throws IOException
      Indicates whether this connection received a fault.

      Typically implemented by looking at an HTTP status code.

      Returns:
      true if this connection received a fault; false otherwise.
      Throws:
      IOException - in case of I/O errors
    • setFault

      @Deprecated void setFault(boolean fault) throws IOException
      Deprecated.
      Sets whether this connection will send a fault.

      Typically implemented by setting an HTTP status code.

      Parameters:
      fault - true if this will send a fault; false otherwise.
      Throws:
      IOException - in case of I/O errors
    • setFaultCode

      void setFaultCode(QName faultCode) throws IOException
      Sets a specific fault code.

      Typically implemented by setting an HTTP status code.

      Parameters:
      faultCode - the fault code to be set on the connection, or null for no fault.
      Throws:
      IOException - in case of I/O errors