import org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory;
public class SOAPEnvelopeTest extends TestCase {
public void testAppendSOAP11() throws Exception {
SOAP11Factory factory;
SOAPEnvelope env;
// SOAP 1.1 allows for arbitrary elements after SOAPBody element
// these addChild() should fail since appending before SOAPBody
// but they do not at this point (need a better check).
factory = new SOAP11Factory();
env = factory.createSOAPEnvelope();
checkAddChild(env, false);
factory = new SOAP11Factory();
env = factory.createSOAPEnvelope();
factory.createSOAPHeader(env);
checkAddChild(env, false);
// these addChild() should work since appending after SOAPBody
factory = new SOAP11Factory();
env = factory.createSOAPEnvelope();
factory.createSOAPBody(env);
checkAddChild(env, false);
factory = new SOAP11Factory();
env = factory.createSOAPEnvelope();
factory.createSOAPHeader(env);
factory.createSOAPBody(env);
checkAddChild(env, false);
}