|
Oracle Security Developer Tools Web Services Security Java API Reference 11g (11.1.1) E10678-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.security.xmlsec.wss.util.WSSUtils
public class WSSUtils
A set of utility methods.
| Constructor Summary | |
|---|---|
WSSUtils() |
|
| Method Summary | |
|---|---|
static void |
addWsuIdToElement(java.lang.String id, org.w3c.dom.Element element)Adds a wsu:Id attribute to the given element. |
static java.lang.String |
collectTextFromChild(oracle.security.xmlsec.util.XMLElement contextElement, java.lang.String namespaceURI, java.lang.String localName)Return the textual content for the text node. |
static WSSecurityToken |
createSecurityToken(org.w3c.dom.Element element)Deprecated. Use WSSTokenUtils.createSecurityToken(Element) |
static byte[] |
decodeBinary(java.lang.String encoded, java.lang.String encodingType)Decode the previously encoded bytes. |
static java.lang.String |
encodeBinary(byte[] value, java.lang.String encodingType)Encode the bytes. |
static oracle.security.xmlsec.util.XMLElement |
getChildElement(oracle.security.xmlsec.util.XMLElement contextElement, java.lang.String nsURI, java.lang.String localName)Get the child element. |
static java.util.List |
getChildElements(oracle.security.xmlsec.util.XMLElement contextElement, java.lang.String nsURI, java.lang.String localName)Get the child element. |
static oracle.security.xmlsec.util.XMLElement |
getInstance(org.w3c.dom.Element element, java.lang.String tag, java.lang.String ns)Creates a new instance of the implementation class for the given tag name, and uses it to wrap the Element. |
static java.lang.String |
getTypeAttribute(org.w3c.dom.Element element, java.lang.String attrName)Get the Type attribute. |
static org.w3c.dom.Element |
insertChildElementWithText(oracle.security.xmlsec.util.XMLElement contextElement, java.lang.String namespaceURI, java.lang.String localName, java.lang.String[] namespaceURIs, java.lang.String[] localNames, java.lang.String text, boolean replaceExisting)Convert the content string into a text org.w3c.dom.Node and append to the specified org.w3c.dom.Element. |
static void |
prependChild(oracle.security.xmlsec.util.XMLNode parent, org.w3c.dom.Node newChild)Prepend the supplied node. |
static java.lang.Object |
resolveReference(oracle.security.xmlsec.dsig.ObjectReference ref, javax.xml.soap.SOAPMessage msg, java.util.Map STRToST)Find out what the reference is pointing to by performing all transforms, except the canonicalization ones. |
static java.util.List |
resolveReferences(oracle.security.xmlsec.dsig.XSSignature sig, javax.xml.soap.SOAPMessage msg, java.util.Map STRToST)Calls @link #resolveReference(ObjectReference, SOAPMessage, Map) for each references in a signature and puts them into a list |
static void |
setChildElement(oracle.security.xmlsec.util.XMLElement contextElement, oracle.security.xmlsec.util.XMLElement element, java.lang.String[] nsURIs, java.lang.String[] localNames)Set the specified element as the child. |
static void |
setTypeAttribute(org.w3c.dom.Element element, java.lang.String attrName, java.lang.String attrVal)Set the Type attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WSSUtils()
| Method Detail |
|---|
public static java.lang.String encodeBinary(byte[] value,
java.lang.String encodingType)
value - The bytes to encode.encodingType - The URI of the encoding algorithm to use.
public static byte[] decodeBinary(java.lang.String encoded,
java.lang.String encodingType)
encoded - The bytes to decode.encodingType - The URI of the encoding algorithm used.
public static void setTypeAttribute(org.w3c.dom.Element element,
java.lang.String attrName,
java.lang.String attrVal)
element - The parent element of the attribute.attrName - The name of the attribute.attrVal - The attribute value.
public static java.lang.String getTypeAttribute(org.w3c.dom.Element element,
java.lang.String attrName)
element - The parent element of the attribute.attrName - The name of the attribute.
public static org.w3c.dom.Element insertChildElementWithText(oracle.security.xmlsec.util.XMLElement contextElement,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String[] namespaceURIs,
java.lang.String[] localNames,
java.lang.String text,
boolean replaceExisting)
throws org.w3c.dom.DOMException
org.w3c.dom.Node and append to the specified org.w3c.dom.Element.contextElement - The parent element of the text node to be inserted.namespaceURI - The namespace of the parent element.localName -namespaceURIs - The namespace list corresponding to the list of local names.localNames - The local name list after which the text node will be inserted.text - The content string.replaceExisting - If true, any existing text Node will be replaced.org.w3c.dom.Node .org.w3c.dom.DOMException
public static java.lang.String collectTextFromChild(oracle.security.xmlsec.util.XMLElement contextElement,
java.lang.String namespaceURI,
java.lang.String localName)
contextElement - The element whose children will be searched for text Nodes.namespaceURI - The namespace of the child Node.localName - The tag name of the child Node.
public static void setChildElement(oracle.security.xmlsec.util.XMLElement contextElement,
oracle.security.xmlsec.util.XMLElement element,
java.lang.String[] nsURIs,
java.lang.String[] localNames)
contextElement - The parent element.element - The element that will be added as the child.nsURIs - The namespace URI list.localNames - The local name list.
public static oracle.security.xmlsec.util.XMLElement getChildElement(oracle.security.xmlsec.util.XMLElement contextElement,
java.lang.String nsURI,
java.lang.String localName)
contextElement - The element whose sub-tree will be searched.nsURI - The namespace of the child.localName - The local name of the child.
public static java.util.List getChildElements(oracle.security.xmlsec.util.XMLElement contextElement,
java.lang.String nsURI,
java.lang.String localName)
contextElement - The element whose sub-tree will be searched.nsURI - The namespace of the child.localName - The local name of the child.
public static oracle.security.xmlsec.util.XMLElement getInstance(org.w3c.dom.Element element,
java.lang.String tag,
java.lang.String ns)
element - The element to be wrapped.tag - The tag name to look for; if null, the tag will be taken from the element (or its xsi:type attribute).ns - The namespace in which tag is defined; if null, the namespace will be taken from the element.XMLElement, or null if a corresponding implementation class cannot be identified or instantiated.
public static void prependChild(oracle.security.xmlsec.util.XMLNode parent,
org.w3c.dom.Node newChild)
parent - The parent node.newChild - The node to prepend.
public static WSSecurityToken createSecurityToken(org.w3c.dom.Element element)
throws WSSException
WSSecurityToken from the given org.w3c.dom.Element.element - A security token that conforms to a supported security token schema.WSSException
public static void addWsuIdToElement(java.lang.String id,
org.w3c.dom.Element element)
id -element -
public static java.lang.Object resolveReference(oracle.security.xmlsec.dsig.ObjectReference ref,
javax.xml.soap.SOAPMessage msg,
java.util.Map STRToST)
throws oracle.security.xmlsec.dsig.ReferenceException,
oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.xmlsec.transform.TransformationException
Transforms
ref - the reference to be resolvedmsg - the soap messages - only used for resolving cid: referencesSTRToST - if a non null Map is passed in and if there is an STRTransform this reference's list of transforms, then the STRToST will be filled up a mapping of WSSecurityTokenReference objects to corresponding WSSecurityToken objects. The WSSecurityToken objects are obtained by following the KeyRetrieversoracle.security.xmlsec.dsig.ReferenceException - if a reference cannot be resolved, of if the transform has invalid syntax, or if there isoracle.security.crypto.core.AlgorithmIdentifierException - if there is a unrecognized transformoracle.security.xmlsec.transform.TransformationException
public static java.util.List resolveReferences(oracle.security.xmlsec.dsig.XSSignature sig,
javax.xml.soap.SOAPMessage msg,
java.util.Map STRToST)
throws oracle.security.xmlsec.dsig.ReferenceException,
oracle.security.crypto.core.AlgorithmIdentifierException,
oracle.security.xmlsec.transform.TransformationException
sig -msg -STRToST -oracle.security.xmlsec.dsig.ReferenceExceptionoracle.security.crypto.core.AlgorithmIdentifierExceptionoracle.security.xmlsec.transform.TransformationException
|
Oracle Security Developer Tools Web Services Security Java API Reference 11g (11.1.1) E10678-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||