Package org.jibx.ws.soap.server

Examples of org.jibx.ws.soap.server.SoapFaultHandler.handleException()


        SoapFaultHandler faultHandler = new SoapFaultHandler(true);
       
        try {
            throw new IllegalStateException("Dummy Exception");
        } catch (Throwable t) {
            faultHandler.handleException(t, m_processor, StubbedChannel.getOutConnection());
        }
        String expected = SoapMaker.envelope(SoapMaker.body("<SOAP:Fault>\n" + "<faultcode>SOAP:Server</faultcode>\n"
            + "<faultstring>Dummy Exception</faultstring>\n" + "<detail>\n"
            + "<Exception>java.lang.IllegalStateException: Dummy Exception\n\tat" + "</Exception>\n" + "</detail>\n"
            + "</SOAP:Fault>\n"));
View Full Code Here


    public void testSendFaultOnErrorWithoutStackTrace() throws Exception {
        SoapFaultHandler faultHandler = new SoapFaultHandler(false);
        try {
            throw new AssertionError("Dummy Assertion Error <99>");
        } catch (Throwable t) {
            faultHandler.handleException(t, m_processor, StubbedChannel.getOutConnection());
        }

        String expected = SoapMaker.envelope(SoapMaker.body("<SOAP:Fault>\n" + "<faultcode>SOAP:Server</faultcode>\n"
            + "<faultstring>Dummy Assertion Error &lt;99></faultstring>\n"
            + "</SOAP:Fault>\n"));
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.