|
||||||||||
| 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 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(Document doc,
Element elem)
convertToSoapElement |
static String |
convertToXpath(String qname)
Looks up elements with wsu:Id or Id in xenc or dsig namespace. |
static Element |
createElement(Document doc,
String tag,
String nsURI,
String prefix)
|
static byte[] |
getDecodedBase64EncodedData(String encodedData)
|
static com.sun.org.apache.xml.internal.security.keys.content.keyvalues.DSAKeyValue |
getDSAKeyValue(Document doc,
X509Certificate cert)
|
static List |
getElementsByTagNameNS1(Element element,
String nsName,
String tagName)
This method searches children of Element element for element with tagName and namespaceURI nsName. |
static Element |
getFirstChildElement(Node node)
|
static String |
getFullTextFromChildren(Element element)
|
static Document |
getOwnerDocument(Node node)
|
static com.sun.org.apache.xml.internal.security.keys.content.keyvalues.RSAKeyValue |
getRSAKeyValue(Document doc,
X509Certificate cert)
|
static com.sun.org.apache.xml.internal.security.keys.content.X509Data |
getX509Data(Document doc,
X509Certificate cert)
|
static boolean |
hasElementChild(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 Document |
newDocument()
Obtains a new instance of a DOM Document object |
static Element |
prependChildElement(Element parent,
Element child,
boolean addWhitespace,
Document doc)
|
static Element |
prependChildElement(Element parent,
Element child,
Document doc)
|
static String |
print(Node node)
Print a Node tree recursively. |
static String |
resolveXPath(Node element)
|
static void |
setIdAttr(Element element,
String Id)
|
static void |
setWsuIdAttr(Element element,
String wsuId)
|
static Document |
toDOMDocument(InputStream is)
Converts the XML document from an input stream to DOM Document format. |
static Document |
toDOMDocument(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 Logger logger
protected static SOAPFactory soapFactory
| Constructor Detail |
|---|
public XMLUtil()
| Method Detail |
|---|
public static SOAPElement convertToSoapElement(Document doc,
Element elem)
throws DOMException,
ClassCastException
doc - the Owner Soap Document of the SOAPElement to be returnedelem - the DOM Element to be converted to SOAPElement
DOMException
ClassCastException
public static List getElementsByTagNameNS1(Element element,
String nsName,
String tagName)
element - The root elementnsName - NamespaceURItagName - A String representing the name of the tag to be searched
for.
public static String getFullTextFromChildren(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 String resolveXPath(Node element)
throws Exception
Exception
public static Element prependChildElement(Element parent,
Element child,
boolean addWhitespace,
Document doc)
public static Element prependChildElement(Element parent,
Element child,
Document doc)
public static String print(Node node)
node - A DOM tree Node
public static void setWsuIdAttr(Element element,
String wsuId)
public static void setIdAttr(Element element,
String Id)
public static Document toDOMDocument(InputStream is)
is - is the InputStream that contains XML document
public static Document toDOMDocument(String xmlString)
xmlString - is the XML document in a String format
public static Document newDocument()
throws ParserConfigurationException
Exception - if an error occurs while constructing a new
document
ParserConfigurationExceptionpublic static boolean hasElementChild(Node node)
node - a node
public static com.sun.org.apache.xml.internal.security.keys.content.keyvalues.DSAKeyValue getDSAKeyValue(Document doc,
X509Certificate cert)
throws XWSSecurityException
XWSSecurityException
public static com.sun.org.apache.xml.internal.security.keys.content.keyvalues.RSAKeyValue getRSAKeyValue(Document doc,
X509Certificate cert)
throws XWSSecurityException
XWSSecurityException
public static com.sun.org.apache.xml.internal.security.keys.content.X509Data getX509Data(Document doc,
X509Certificate cert)
throws XWSSecurityException
XWSSecurityExceptionpublic static String convertToXpath(String qname)
doc - id -
TransformerException
public static byte[] getDecodedBase64EncodedData(String encodedData)
throws XWSSecurityException
XWSSecurityExceptionpublic static Document getOwnerDocument(Node node)
public static Element getFirstChildElement(Node node)
public static Element createElement(Document doc,
String tag,
String nsURI,
String prefix)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||