Example usage for javax.xml.soap SOAPPart setParentElement

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

Introduction

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

Prototype

public void setParentElement(SOAPElement parent) throws SOAPException;

Source Link

Document

Sets the parent of this Node object to the given SOAPElement object.

Usage

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

@Validated
@Test(expected = SOAPException.class)
public void testSetParentElementNull() throws Exception {
    SOAPPart soapPart = factory.createMessage().getSOAPPart();
    soapPart.setParentElement(null);
}

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

@Validated
@Test(expected = SOAPException.class)
public void testSetParentElement() throws Exception {
    SOAPPart soapPart = factory.createMessage().getSOAPPart();
    SOAPElement element = (SOAPElement) soapPart.createElementNS("urn:ns", "p:root");
    soapPart.setParentElement(element);
}