use of org.apache.axiom.soap.SOAPBody in project webservices-axiom by apache.
the class TestGetFaultNoFault method runTest.
@Override
protected void runTest() throws Throwable {
SOAPBody body = soapFactory.getDefaultEnvelope().getBody();
body.addChild(soapFactory.createOMElement(qname.getLocalPart(), qname.getNamespaceURI(), qname.getPrefix()));
assertNull(body.getFault());
}
use of org.apache.axiom.soap.SOAPBody in project webservices-axiom by apache.
the class TestGetFaultFakeFault method runTest.
@Override
protected void runTest() throws Throwable {
SOAPBody body = soapFactory.getDefaultEnvelope().getBody();
soapFactory.createOMElement("Fault", soapFactory.getNamespace(), body);
assertNull(body.getFault());
}
use of org.apache.axiom.soap.SOAPBody in project webservices-axiom by apache.
the class TestGetFirstElementLocalNameWithParser2 method runTest.
@Override
protected void runTest(SOAPEnvelope envelope) throws Throwable {
SOAPBody body = envelope.getBody();
if (buildPayload) {
body.getFirstElement().build();
}
assertThat(body.getFirstElementLocalName()).isEqualTo("test");
}
use of org.apache.axiom.soap.SOAPBody in project webservices-axiom by apache.
the class TestGetFirstElementLocalNameWithParserNoLookahead method runTest.
@Override
protected void runTest() throws Throwable {
SOAPEnvelope orgEnvelope = soapFactory.getDefaultEnvelope();
OMElement payload = soapFactory.createOMElement("payload", soapFactory.createOMNamespace("urn:test", "p"), orgEnvelope.getBody());
OMElement child = soapFactory.createOMElement("child", null, payload);
soapFactory.createOMElement("grandchild", null, child);
SOAPModelBuilder builder = OMXMLBuilderFactory.createSOAPModelBuilder(metaFactory, new StringReader(orgEnvelope.toString()));
SOAPBody body = builder.getSOAPEnvelope().getBody();
body.getFirstElement().getFirstElement();
assertThat(body.getFirstElementLocalName()).isEqualTo("payload");
}
use of org.apache.axiom.soap.SOAPBody in project webservices-axiom by apache.
the class TestHasFaultFakeFault method runTest.
@Override
protected void runTest() throws Throwable {
SOAPBody body = soapFactory.getDefaultEnvelope().getBody();
soapFactory.createOMElement("Fault", soapFactory.getNamespace(), body);
assertFalse(body.hasFault());
}
Aggregations