Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPBody.addFault()


    protected void runTest() throws Throwable {
        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        assertFalse(envelope.hasFault());
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        assertFalse(envelope.hasFault());
        body.addFault(new Exception("This an exception for testing"));
        assertTrue(envelope.hasFault());
    }
}
View Full Code Here


    }

    protected void runTest() throws Throwable {
        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        body.addFault(soapFactory.createSOAPFault());
        assertTrue(
                "Body Test:- After calling addFault method, SOAP body has no fault",
                body.hasFault());
    }
}
View Full Code Here

        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        assertFalse(
                "Body Test:- After creating a soap body it has a fault",
                body.hasFault());
        body.addFault(new Exception("This an exception for testing"));
        assertTrue(
                "Body Test:- After calling addFault method, hasFault method returns false",
                body.hasFault());
    }
}
View Full Code Here

        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        assertNull(
                "Body Test:- After creating a soap body it has a fault",
                body.getFault());
        body.addFault(new Exception("This an exception for testing"));
        assertNotNull(
                "Body Test:- After calling addFault method, getFault method returns null",
                body.getFault());
    }
}
View Full Code Here

    }

    protected void runTest() throws Throwable {
        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        body.addFault(new Exception("This an exception for testing"));
        assertTrue(
                "Body Test:- After calling addFault method, SOAP body has no fault",
                body.hasFault());
    }
}
View Full Code Here

    }

    protected void runTest() throws Throwable {
        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        body.addFault(soapFactory.createSOAPFault(body));
        assertTrue(
                "Body Test:- After calling addFault method, SOAP body has no fault",
                body.hasFault());
    }
}
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.