Example usage for javax.xml.soap SOAPEnvelope getAttribute

List of usage examples for javax.xml.soap SOAPEnvelope getAttribute

Introduction

In this page you can find the example usage for javax.xml.soap SOAPEnvelope getAttribute.

Prototype

public String getAttribute(String name);

Source Link

Document

Retrieves an attribute value by name.

Usage

From source file:ee.ria.xroad.common.message.SoapUtils.java

/**
 * Returns true, if the SOAP message is RPC-encoded.
 * @param soap the SOAP message/*from  w  w w  . j a  v a2  s. c  o  m*/
 * @return boolean
 * @throws Exception if there are errors reading the SOAP envelope
 */
public static boolean isRpcMessage(SOAPMessage soap) throws Exception {
    SOAPEnvelope envelope = soap.getSOAPPart().getEnvelope();
    return RPC_ENCODING.equals(envelope.getAttribute(RPC_ATTR));
}