public TestSetDetail(OMMetaFactory metaFactory, SOAPSpec spec) {
super(metaFactory, spec);
}
protected void runTest() throws Throwable {
SOAPFault soapFault = soapFactory.createSOAPFault();
soapFault.setDetail(soapFactory.createSOAPFaultDetail(soapFault));
assertNotNull(
"Fault Test:- After calling setDetail method, Fault has no detail",
soapFault.getDetail());
assertEquals("Fault Test:- Fault detail local name mismatch",
spec.getFaultDetailQName(), soapFault.getDetail().getQName());
try {
soapFault.setDetail(altSoapFactory.createSOAPFaultDetail());
fail("SOAPFaultDetail should not be set in to a SOAPFault for a different SOAP version");
} catch (SOAPProcessingException e) {
assertTrue(true);
}
}