Example usage for javax.xml.soap SOAPBody setParentElement

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

Introduction

In this page you can find the example usage for javax.xml.soap SOAPBody 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:org.apache.axis.message.SOAPEnvelope.java

/**
 * Set the soap body// www  .  j  a v  a  2s .c  o  m
 * @param body
 */
public void setBody(SOAPBody body) {
    if (this.body != null) {
        removeChild(this.body);
    }
    this.body = body;
    try {
        body.setParentElement(this);
    } catch (SOAPException ex) {
        // class cast should never fail when parent is a SOAPEnvelope
        log.fatal(Messages.getMessage("exception00"), ex);
    }
}