protected void runTest() throws Throwable {
SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
SOAPBody body = soapFactory.createSOAPBody(envelope);
SOAPFault fault = soapFactory.createSOAPFault(body);
SOAPFaultDetail soapFaultDetail = soapFactory.createSOAPFaultDetail(fault);
OMNamespace omNamespace = soapFactory.createOMNamespace("http://www.test.org", "test");
Iterator iterator = soapFaultDetail.getAllDetailEntries();
assertFalse(
"SOAP Fault Detail Test : - After creating SOAP11FaultDetail element, it has DetailEntries",
iterator.hasNext());
soapFaultDetail.addDetailEntry(
soapFactory.createOMElement("DetailEntry", omNamespace));
iterator = soapFaultDetail.getAllDetailEntries();
OMElement detailEntry = (OMElement) iterator.next();
assertNotNull(
"SOAP Fault Detail Test : - After calling addDetailEntry method, getAllDetailEntries method returns empty iterator",
detailEntry);
assertEquals(