Example usage for javax.xml.soap SOAPPart appendChild

List of usage examples for javax.xml.soap SOAPPart appendChild

Introduction

In this page you can find the example usage for javax.xml.soap SOAPPart appendChild.

Prototype

public Node appendChild(Node newChild) throws DOMException;

Source Link

Document

Adds the node newChild to the end of the list of children of this node.

Usage

From source file:com.googlecode.ddom.saaj.SOAPPartTest.java

@Validated
@Test/*from www .  j av  a 2  s .co m*/
public void testCreateEnvelopeWithCreateElementNS() throws Exception {
    SOAPPart soapPart = factory.createMessage().getSOAPPart();
    Element element = soapPart.createElementNS(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "SOAP-ENV:Envelope");
    assertTrue(element instanceof SOAPEnvelope);
    soapPart.appendChild(element);
    SOAPEnvelope envelope = soapPart.getEnvelope();
    assertNotNull(envelope);
}