SOAPResponse

public class SOAPResponse

The SOAPResponse class represents a SOAP response. It is independent of which transport protocol it is using and contains the SOAP message of the target response.

Author:Hugo Y. K. Lam

Constructors

SOAPResponse

SOAPResponse()

Creates a new instance of SOAPResponse.

SOAPResponse

SOAPResponse(Object target)

Creates a new instance of SOAPResponse.

Parameters:
  • target – the target that this response should be committed to.

Methods

addFault

public SOAPFault addFault(String code, String actor, String desc)

Adds a SOAP fault to the SOAP message of this response.

Parameters:
  • code – the fault code.
  • actor – the fault actor.
  • desc – the fault description.
Throws:
  • SOAPException – a SOAP error occurred when adding the the fault.
Returns:

the SOAP fault which has been added to the SOAP message. null if there is no SOAP message in this response or the fault has already been added.

addFault

public SOAPFault addFault(Throwable cause)

Adds a SOAP fault to the SOAP message of this response.

Parameters:
  • cause – the exception cause.
Throws:
  • SOAPException – a SOAP error occurred when adding the the fault.
Returns:

the SOAP fault which has been added to the SOAP message. null if there is no SOAP message in this response or the fault has already been added.

getMessage

public SOAPMessage getMessage()

Gets the SOAP message of this response.

Returns:the SOAP message of this response.

getTarget

public Object getTarget()

Gets the target that this response should be committed to.

Returns:the target that this response should be committed to.

setMessage

public void setMessage(SOAPMessage message)

Sets the SOAP message of this response.

Parameters:
  • message – the SOAP message of this response.

setTarget

void setTarget(Object target)

Sets the target that this response should be committed to.

Parameters:
  • target – the target that this response should be committed to.