Package org.springframework.ws

Examples of org.springframework.ws.FaultAwareWebServiceMessage


        resolver = new SimpleFaultMessageResolver();
    }

    @Test
    public void testResolveFault() throws Exception {
        FaultAwareWebServiceMessage messageMock = createMock(FaultAwareWebServiceMessage.class);
        String message = "message";
        expect(messageMock.getFaultReason()).andReturn(message);

        replay(messageMock);

        try {
            resolver.resolveFault(messageMock);
View Full Code Here


    public static ResponseMatcher noFault() {
        return new ResponseMatcher() {
            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() + "\"");
                    }
                }
            }

        };
View Full Code Here

            receiver.receive(messageContext);
            if (messageContext.hasResponse()) {
                WebServiceMessage response = messageContext.getResponse();
                if (response instanceof FaultAwareWebServiceMessage &&
                        connection instanceof FaultAwareWebServiceConnection) {
                    FaultAwareWebServiceMessage faultResponse = (FaultAwareWebServiceMessage) response;
                    FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection;
                    faultConnection.setFaultCode(faultResponse.getFaultCode());
                }
                connection.send(messageContext.getResponse());
            }
        }
        catch (NoEndpointFoundException ex) {
View Full Code Here

                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;
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.FaultAwareWebServiceMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.