Examples of Soap11Fault


Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new MyClientException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Client error", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new MyServerException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getServerOrReceiverFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Server error", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new NonAnnotatedException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "faultstring", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new MyCustomException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", new QName("http://springframework.org/spring-ws", "Fault"),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "MyCustomException thrown", fault.getFaultStringOrReason());
        Assert.assertEquals("Invalid fault locale on fault", new Locale("nl"), fault.getFaultStringLocale());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new MySubClientException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Client error", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new NoStringOrReasonException("Exception message"));
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Exception message", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new IllegalArgumentException("bla"));
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Response has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Client error", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new IllegalArgumentException("bla"));
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Response has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getServerOrReceiverFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Server error", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new IllegalArgumentException("bla"));
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Response has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "bla", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());

        // SWS-226
        result = resolver.resolveException(context, null, new IllegalArgumentException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Response has no fault", response.getSoapBody().hasFault());
        fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "java.lang.IllegalArgumentException",
                fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap11.Soap11Fault

        boolean result = resolver.resolveException(context, null, new IOException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Response has no fault", response.getSoapBody().hasFault());
        Soap11Fault fault = (Soap11Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_11.getServerOrReceiverFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "java.io.IOException", fault.getFaultStringOrReason());
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.