|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.wss.impl.XMLUtil
public class XMLUtil
| Field Summary | |
|---|---|
protected static java.util.logging.Logger |
logger
This is a custom XML handler to load the dtds from the classpath This should be used by all the xml parsing document builders to set the default entity resolvers. |
protected static SOAPFactory |
soapFactory
|
| Constructor Summary | |
|---|---|
XMLUtil()
|
|
| Method Summary | |
|---|---|
static SOAPElement |
convertToSoapElement(org.w3c.dom.Document doc,
org.w3c.dom.Element elem)
convertToSoapElement |
static java.lang.String |
convertToXpath(java.lang.String qname)
Looks up elements with wsu:Id or Id in xenc or dsig namespace. |
static org.w3c.dom.Element |
createElement(org.w3c.dom.Document doc,
java.lang.String tag,
java.lang.String nsURI,
java.lang.String prefix)
|
static byte[] |
getDecodedBase64EncodedData(java.lang.String encodedData)
|
static com.sun.org.apache.xml.internal.security.keys.content.keyvalues.DSAKeyValue |
getDSAKeyValue(org.w3c.dom.Document doc,
java.security.cert.X509Certificate cert)
|
static java.util.List |
getElementsByTagNameNS1(org.w3c.dom.Element element,
java.lang.String nsName,
java.lang.String tagName)
This method searches children of Element element for element with tagName and namespaceURI nsName. |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node node)
|
static java.lang.String |
getFullTextFromChildren(org.w3c.dom.Element element)
|
static org.w3c.dom.Document |
getOwnerDocument(org.w3c.dom.Node node)
|
static com.sun.org.apache.xml.internal.security.keys.content.keyvalues.RSAKeyValue |
getRSAKeyValue(org.w3c.dom.Document doc,
java.security.cert.X509Certificate cert)
|
static com.sun.org.apache.xml.internal.security.keys.content.X509Data |
getX509Data(org.w3c.dom.Document doc,
java.security.cert.X509Certificate cert)
|
static boolean |
hasElementChild(org.w3c.dom.Node node)
Checks if a node has a child of ELEMENT type. |
static boolean |
inEncryptionNS(SOAPElement element)
|
static boolean |
inSamlNSv1_0(SOAPElement element)
|
static boolean |
inSamlNSv1_1(SOAPElement element)
|
static boolean |
inSamlNSv2_0(SOAPElement element)
|
static boolean |
inSignatureNS(SOAPElement element)
|
static boolean |
inWSS11_NS(SOAPElement element)
|
static boolean |
inWsscNS(SOAPElement element)
|
static boolean |
inWsse11NS(SOAPElement element)
|
static boolean |
inWsseNS(SOAPElement element)
|
static boolean |
inWsuNS(SOAPElement element)
|
static org.w3c.dom.Document |
newDocument()
Obtains a new instance of a DOM Document object |
static org.w3c.dom.Element |
prependChildElement(org.w3c.dom.Element parent,
org.w3c.dom.Element child,
boolean addWhitespace,
org.w3c.dom.Document doc)
|
static org.w3c.dom.Element |
prependChildElement(org.w3c.dom.Element parent,
org.w3c.dom.Element child,
org.w3c.dom.Document doc)
|
static java.lang.String |
print(org.w3c.dom.Node node)
Print a Node tree recursively. |
static java.lang.String |
resolveXPath(org.w3c.dom.Node element)
|
static void |
setIdAttr(org.w3c.dom.Element element,
java.lang.String Id)
|
static void |
setWsuIdAttr(org.w3c.dom.Element element,
java.lang.String wsuId)
|
static org.w3c.dom.Document |
toDOMDocument(java.io.InputStream is)
Converts the XML document from an input stream to DOM Document format. |
static org.w3c.dom.Document |
toDOMDocument(java.lang.String xmlString)
Converts the XML document from a String format to DOM Document format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.logging.Logger logger
protected static SOAPFactory soapFactory
| Constructor Detail |
|---|
public XMLUtil()
| Method Detail |
|---|
public static SOAPElement convertToSoapElement(org.w3c.dom.Document doc,
org.w3c.dom.Element elem)
throws org.w3c.dom.DOMException,
java.lang.ClassCastException
doc - the Owner Soap Document of the SOAPElement to be returnedelem - the DOM Element to be converted to SOAPElement
org.w3c.dom.DOMException
java.lang.ClassCastException
public static java.util.List getElementsByTagNameNS1(org.w3c.dom.Element element,
java.lang.String nsName,
java.lang.String tagName)
element - The root elementnsName - NamespaceURItagName - A String representing the name of the tag to be searched
for.
public static java.lang.String getFullTextFromChildren(org.w3c.dom.Element element)
public static boolean inEncryptionNS(SOAPElement element)
public static boolean inSamlNSv1_0(SOAPElement element)
public static boolean inSamlNSv2_0(SOAPElement element)
public static boolean inSamlNSv1_1(SOAPElement element)
public static boolean inSignatureNS(SOAPElement element)
public static boolean inWsseNS(SOAPElement element)
public static boolean inWsscNS(SOAPElement element)
public static boolean inWsse11NS(SOAPElement element)
public static boolean inWSS11_NS(SOAPElement element)
public static boolean inWsuNS(SOAPElement element)
public static java.lang.String resolveXPath(org.w3c.dom.Node element)
throws java.lang.Exception
java.lang.Exception
public static org.w3c.dom.Element prependChildElement(org.w3c.dom.Element parent,
org.w3c.dom.Element child,
boolean addWhitespace,
org.w3c.dom.Document doc)
public static org.w3c.dom.Element prependChildElement(org.w3c.dom.Element parent,
org.w3c.dom.Element child,
org.w3c.dom.Document doc)
public static java.lang.String print(org.w3c.dom.Node node)
node - A DOM tree Node
public static void setWsuIdAttr(org.w3c.dom.Element element,
java.lang.String wsuId)
public static void setIdAttr(org.w3c.dom.Element element,
java.lang.String Id)
public static org.w3c.dom.Document toDOMDocument(java.io.InputStream is)
is - is the InputStream that contains XML document
public static org.w3c.dom.Document toDOMDocument(java.lang.String xmlString)
xmlString - is the XML document in a String format
public static org.w3c.dom.Document newDocument()
throws javax.xml.parsers.ParserConfigurationException
java.lang.Exception - if an error occurs while constructing a new
document
javax.xml.parsers.ParserConfigurationExceptionpublic static boolean hasElementChild(org.w3c.dom.Node node)
node - a node
public static com.sun.org.apache.xml.internal.security.keys.content.keyvalues.DSAKeyValue getDSAKeyValue(org.w3c.dom.Document doc,
java.security.cert.X509Certificate cert)
throws XWSSecurityException
XWSSecurityException
public static com.sun.org.apache.xml.internal.security.keys.content.keyvalues.RSAKeyValue getRSAKeyValue(org.w3c.dom.Document doc,
java.security.cert.X509Certificate cert)
throws XWSSecurityException
XWSSecurityException
public static com.sun.org.apache.xml.internal.security.keys.content.X509Data getX509Data(org.w3c.dom.Document doc,
java.security.cert.X509Certificate cert)
throws XWSSecurityException
XWSSecurityExceptionpublic static java.lang.String convertToXpath(java.lang.String qname)
doc - id -
javax.xml.transform.TransformerException
public static byte[] getDecodedBase64EncodedData(java.lang.String encodedData)
throws XWSSecurityException
XWSSecurityExceptionpublic static org.w3c.dom.Document getOwnerDocument(org.w3c.dom.Node node)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node)
public static org.w3c.dom.Element createElement(org.w3c.dom.Document doc,
java.lang.String tag,
java.lang.String nsURI,
java.lang.String prefix)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||