Example usage for javax.xml.soap SOAPHeaderElement addNamespaceDeclaration

List of usage examples for javax.xml.soap SOAPHeaderElement addNamespaceDeclaration

Introduction

In this page you can find the example usage for javax.xml.soap SOAPHeaderElement addNamespaceDeclaration.

Prototype

public SOAPElement addNamespaceDeclaration(String prefix, String uri) throws SOAPException;

Source Link

Document

Adds a namespace declaration with the specified prefix and URI to this SOAPElement object.

Usage

From source file:org.apache.axis.message.SOAPHeader.java

public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException {
    SOAPHeaderElement child = new SOAPHeaderElement(uri, localName);
    child.setPrefix(prefix);//  w  ww. j a  va 2  s  .  com
    child.addNamespaceDeclaration(prefix, uri);
    addChildElement(child);
    return child;
}