use of org.apache.axiom.soap.SOAPEnvelope in project webservices-axiom by apache.
the class TestBodyHeaderOrder method runTest.
@Override
protected void runTest() throws Throwable {
SOAPEnvelope env = soapFactory.createSOAPEnvelope();
soapFactory.createSOAPBody(env);
soapFactory.createSOAPHeader(env);
assertTrue("Header isn't the first child!", env.getFirstElement() instanceof SOAPHeader);
}
use of org.apache.axiom.soap.SOAPEnvelope in project webservices-axiom by apache.
the class TestGetBodyOnEnvelopeWithHeaderOnly method runTest.
@Override
protected void runTest() throws Throwable {
SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
soapFactory.createSOAPHeader(envelope);
assertNull(envelope.getBody());
}
use of org.apache.axiom.soap.SOAPEnvelope in project webservices-axiom by apache.
the class TestAddFault2 method runTest.
@Override
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());
}
use of org.apache.axiom.soap.SOAPEnvelope in project webservices-axiom by apache.
the class TestGetFirstElementNSEmptyBody method runTest.
@Override
protected void runTest() throws Throwable {
SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
assertNull(envelope.getBody().getFirstElementNS());
}
use of org.apache.axiom.soap.SOAPEnvelope in project webservices-axiom by apache.
the class TestHasFault method runTest.
@Override
protected void runTest() throws Throwable {
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());
}
Aggregations