public void testCreateSOAPHeader() {
try {
OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
getTestResourceFile("soap/minimalMessage.xml"));
SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
SOAPHeader soapHeader = omFactory.createSOAPHeader(soapEnvelope);
assertTrue(
"Programatically created SOAPHeader should have done = true ",
soapHeader.isComplete());
soapHeader.detach();
SOAPHeader soapHeaderTwo = omFactory.createSOAPHeader(soapEnvelope,
omBuilder);
assertTrue(
"SOAPHeader with a builder should start with done = false ",
!soapHeaderTwo.isComplete());
assertTrue("This SOAPHeader must have a builder ",
soapHeaderTwo.getBuilder() instanceof OMXMLParserWrapper);
} catch (Exception e) {
log.info(e.getMessage());
}