protected boolean hasFault(WebServiceMessage response) throws IOException { if (response instanceof FaultAwareWebServiceMessage) { FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response; return faultMessage.hasFault(); } return false; }
/** * Returns true if the message has fault. * @param messageContext * @return */ protected boolean hasFault(MessageContext messageContext) { boolean hasFault = false; WebServiceMessage response = messageContext.getResponse(); if (response instanceof FaultAwareWebServiceMessage) { hasFault = ((FaultAwareWebServiceMessage) response).hasFault(); } return hasFault; }
/** * Determines whether the given connection or message has a fault. * * <p>This implementation checks the {@link FaultAwareWebServiceConnection#hasFault() connection} if the {@link * #setCheckConnectionForFault(boolean) checkConnectionForFault} property is true, and defaults to the {@link * FaultAwareWebServiceMessage#hasFault() message} otherwise. * * @param connection the connection (possibly a {@link FaultAwareWebServiceConnection} * @param response the response message (possibly a {@link FaultAwareWebServiceMessage} * @return {@code true} if either the connection or the message has a fault; {@code false} otherwise * @throws IOException in case of I/O errors */ protected boolean hasFault(WebServiceConnection connection, WebServiceMessage response) throws IOException { if (checkConnectionForFault && connection instanceof FaultAwareWebServiceConnection) { // check whether the connection has a fault (i.e. status code 500 in HTTP) FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection; if (!faultConnection.hasFault()) { return false; } } if (response instanceof FaultAwareWebServiceMessage) { // either the connection has a fault, or checkConnectionForFault is false: let's verify the fault FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response; return faultMessage.hasFault(); } return false; }
/** * Determines whether the given connection or message has a fault. * * <p>This implementation checks the {@link FaultAwareWebServiceConnection#hasFault() connection} if the {@link * #setCheckConnectionForFault(boolean) checkConnectionForFault} property is true, and defaults to the {@link * FaultAwareWebServiceMessage#hasFault() message} otherwise. * * @param connection the connection (possibly a {@link FaultAwareWebServiceConnection} * @param response the response message (possibly a {@link FaultAwareWebServiceMessage} * @return {@code true} if either the connection or the message has a fault; {@code false} otherwise * @throws IOException in case of I/O errors */ protected boolean hasFault(WebServiceConnection connection, WebServiceMessage response) throws IOException { if (checkConnectionForFault && connection instanceof FaultAwareWebServiceConnection) { // check whether the connection has a fault (i.e. status code 500 in HTTP) FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection; if (!faultConnection.hasFault()) { return false; } } if (response instanceof FaultAwareWebServiceMessage) { // either the connection has a fault, or checkConnectionForFault is false: let's verify the fault FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response; return faultMessage.hasFault(); } return false; }
/** * Determines whether the given connection or message has a fault. * <p/> * This implementation checks the {@link FaultAwareWebServiceConnection#hasFault() connection} if the {@link * #setCheckConnectionForFault(boolean) checkConnectionForFault} property is true, and defaults to the {@link * FaultAwareWebServiceMessage#hasFault() message} otherwise. * * @param connection the connection (possibly a {@link FaultAwareWebServiceConnection} * @param response the response message (possibly a {@link FaultAwareWebServiceMessage} * @return <code>true</code> if either the connection or the message has a fault; <code>false</code> otherwise * @throws IOException in case of I/O errors */ protected boolean hasFault(WebServiceConnection connection, WebServiceMessage response) throws IOException { if (checkConnectionForFault && connection instanceof FaultAwareWebServiceConnection) { // check whether the connection has a fault (i.e. status code 500 in HTTP) FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection; if (!faultConnection.hasFault()) { return false; } } if (response instanceof FaultAwareWebServiceMessage) { // either the connection has a fault, or checkConnectionForFault is false: let's verify the fault FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response; return faultMessage.hasFault(); } return false; }
/** * Determines whether the given connection or message has a fault. * * <p>This implementation checks the {@link FaultAwareWebServiceConnection#hasFault() connection} if the {@link * #setCheckConnectionForFault(boolean) checkConnectionForFault} property is true, and defaults to the {@link * FaultAwareWebServiceMessage#hasFault() message} otherwise. * * @param connection the connection (possibly a {@link FaultAwareWebServiceConnection} * @param response the response message (possibly a {@link FaultAwareWebServiceMessage} * @return {@code true} if either the connection or the message has a fault; {@code false} otherwise * @throws IOException in case of I/O errors */ protected boolean hasFault(WebServiceConnection connection, WebServiceMessage response) throws IOException { if (checkConnectionForFault && connection instanceof FaultAwareWebServiceConnection) { // check whether the connection has a fault (i.e. status code 500 in HTTP) FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection; if (!faultConnection.hasFault()) { return false; } } if (response instanceof FaultAwareWebServiceMessage) { // either the connection has a fault, or checkConnectionForFault is false: let's verify the fault FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response; return faultMessage.hasFault(); } return false; }
public void match(WebServiceMessage request, WebServiceMessage response) throws IOException, AssertionError { if (response instanceof FaultAwareWebServiceMessage) { FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response; if (faultMessage.hasFault()) { fail("Response has a SOAP Fault: \"" + faultMessage.getFaultReason() + "\""); } } }
public void match(WebServiceMessage request, WebServiceMessage response) throws IOException, AssertionError { if (response instanceof FaultAwareWebServiceMessage) { FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response; if (faultMessage.hasFault()) { fail("Response has a SOAP Fault: \"" + faultMessage.getFaultReason() + "\""); } } }
public void match(WebServiceMessage request, WebServiceMessage response) throws IOException, AssertionError { if (response instanceof FaultAwareWebServiceMessage) { FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response; if (faultMessage.hasFault()) { fail("Response has a SOAP Fault: \"" + faultMessage.getFaultReason() + "\""); } } }
WebServiceMessage response = messageContext.getResponse(); if (response instanceof FaultAwareWebServiceMessage) { hasFault = ((FaultAwareWebServiceMessage) response).hasFault();
WebServiceMessage response = messageContext.getResponse(); if (response instanceof FaultAwareWebServiceMessage) { hasFault = ((FaultAwareWebServiceMessage) response).hasFault();
WebServiceMessage response = messageContext.getResponse(); if (response instanceof FaultAwareWebServiceMessage) { hasFault = ((FaultAwareWebServiceMessage) response).hasFault();
WebServiceMessage response = messageContext.getResponse(); if (response instanceof FaultAwareWebServiceMessage) { hasFault = ((FaultAwareWebServiceMessage) response).hasFault();
FaultAwareWebServiceMessage faultResponse = (FaultAwareWebServiceMessage) response; FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection; faultConnection.setFault(faultResponse.hasFault());