Package org.jibx.ws.soap.server

Examples of org.jibx.ws.soap.server.SoapFaultHandler


     *
     * @throws Exception
     */
    public void testSendFaultOnExceptionWithStackTrace() throws Exception {
       
        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


    /**
     * Tests that sending an error without a stack trace creates correct output.
     * @throws Exception
     */
    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

Related Classes of org.jibx.ws.soap.server.SoapFaultHandler

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.