Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-04


oracle.security.xmlsec.util
Class SOAPMessageUtils

java.lang.Object
  extended by oracle.security.xmlsec.util.SOAPMessageUtils


public class SOAPMessageUtils
extends java.lang.Object

Utilities to work with SOAPMessage.
Note: These utilities could have been in XMLUtils as well, but to prevent non SOAP users from depending on saaj-api.jar, mail.jar and activation.jar, these utility functions have been separated out.


Nested Class Summary
static class SOAPMessageUtils.ByteArrayDataSource
           

 

Constructor Summary
SOAPMessageUtils()
           

 

Method Summary
static org.w3c.dom.Element addChildElementWithBinaryContent(org.w3c.dom.Element parent, java.lang.String localName, java.lang.String prefix, java.lang.String uri, byte[] value, boolean useLineBreaks)
          MTOM aware method to create a child Element under the parent Element with the specified prefix, localname and uri, and create a text node under the child element containing the byte array as a base 64 encoded string.
static java.io.InputStream getBinaryContentForChildElement(org.w3c.dom.Element elem)
           
static org.w3c.dom.Node importSoapElementNode(org.w3c.dom.Document doc, org.w3c.dom.Node importNode)
          RH Import/Add soapNode to Document through either SOAPFactory.createElement (SAAJ 1.3 API) or importNode (DOM API) ImportNode is not implemented in JBOSS Saaj
static javax.xml.soap.MimeHeaders readHeaders(java.io.InputStream is)
          Read the Mime headers and position the InputStrea to just after the headers
static void writeTo(javax.xml.soap.SOAPMessage msg, java.io.OutputStream out)
          Wrapper over SOAPMessage.writeTo(OutputStream) to write out the headers as well as the body.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SOAPMessageUtils

public SOAPMessageUtils()

Method Detail

addChildElementWithBinaryContent

public static org.w3c.dom.Element addChildElementWithBinaryContent(org.w3c.dom.Element parent,
                                                                   java.lang.String localName,
                                                                   java.lang.String prefix,
                                                                   java.lang.String uri,
                                                                   byte[] value,
                                                                   boolean useLineBreaks)
                                                            throws org.w3c.dom.DOMException
MTOM aware method to create a child Element under the parent Element with the specified prefix, localname and uri, and create a text node under the child element containing the byte array as a base 64 encoded string.
If the parent.getOwnerDocument().getDocumentElement() is an Oracle SAAJ object i.e. className startsWith oracle.j2ee.ws.saaj, then this method does't use DOM to create the child Element but instead uses SOAPElement.addChildElement() to create the element and then calls OracleSOAPElement.setDataHandler to set the bytes into it.
Parameters:
parent -
localName -
prefix -
uri -
value -
Returns:
Throws:
org.w3c.dom.DOMException

getBinaryContentForChildElement

public static java.io.InputStream getBinaryContentForChildElement(org.w3c.dom.Element elem)

writeTo

public static void writeTo(javax.xml.soap.SOAPMessage msg,
                           java.io.OutputStream out)
                    throws java.io.IOException,
                           javax.xml.soap.SOAPException
Wrapper over SOAPMessage.writeTo(OutputStream) to write out the headers as well as the body.
Parameters:
msg - The SOAPMessage that needs to be written out
out - where it is to be written
Throws:
java.io.IOException
javax.xml.soap.SOAPException

readHeaders

public static javax.xml.soap.MimeHeaders readHeaders(java.io.InputStream is)
                                              throws java.io.IOException
Read the Mime headers and position the InputStrea to just after the headers
Parameters:
is -
Returns:
Throws:
java.io.IOException

importSoapElementNode

public static org.w3c.dom.Node importSoapElementNode(org.w3c.dom.Document doc,
                                                     org.w3c.dom.Node importNode)
                                              throws XEException
RH Import/Add soapNode to Document through either SOAPFactory.createElement (SAAJ 1.3 API) or importNode (DOM API) ImportNode is not implemented in JBOSS Saaj
Parameters:
Document, - importNode
Returns:
importNode
Throws:
XEException

Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-04


Copyright © 2005, 2011 , Oracle. All rights reserved.