public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static ResourceBundle |
bundle |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static String |
BooleanToString(Boolean bool)
Converts a Boolean object to a String representing XML boolean.
|
static Object |
convertElementToJAXB(Element element)
Converts a
org.w3c.dom.Element to a JAXB object. |
static List |
convertElementToJAXB(List elements)
Converts a list of
org.w3c.dom.Element to a list of
JAXB objects. |
static List |
convertJAXBToElement(List jaxbObjs)
Converts a list of JAXB objects to a list of
org.w3c.dom.Element |
static Element |
convertJAXBToElement(Object jaxbObj)
Converts a JAXB object to a
org.w3c.dom.Element . |
static Element |
convertJAXBToElement(Object jaxbObj,
boolean checkIdref)
Converts a JAXB object to a
org.w3c.dom.Element . |
static QName |
convertStringToQName(String str,
Element element)
Converts a string value to a QName.
|
static SOAPMessage |
DocumentToSOAPMessage(Document doc)
Converts Document to SOAPMessage
|
static void |
enforceProcessingRules(Message message,
String requestMessageID,
boolean isServer)
Enforces message processiong rules defined in the spec.
|
static String |
getDefaultWSFVersion()
Returns the default web services version.
|
static String |
getJAXBPackages()
Returns a String of JAXB packages seperated by ":".
|
static String |
getNamespaceForPrefix(String prefix,
Element e)
Gets the XML namespace URI that is mapped to the specified prefix, in
the context of the DOM element e
|
static Map |
getNamespacePrefixMapping()
Returns JAXB namespace prefix mapping.
|
static String |
getString(String key,
Object[] params)
Gets localized string from resource bundle.
|
static Boolean |
StringToBoolean(String str)
Converts a value of XML boolean type to Boolean object.
|
public static ResourceBundle bundle
public static Map getNamespacePrefixMapping()
public static String getJAXBPackages()
public static SOAPMessage DocumentToSOAPMessage(Document doc) throws SOAPBindingException
doc
- the source DocumentSOAPBindingException
- if an error occurs while converting
the documentpublic static List convertJAXBToElement(List jaxbObjs) throws JAXBException
org.w3c.dom.Element
jaxbObjs
- a list of JAXB objectsorg.w3c.dom.Element
JAXBException
- if an error occurs while converting JAXB objects.public static Element convertJAXBToElement(Object jaxbObj) throws JAXBException
org.w3c.dom.Element
.jaxbObj
- a JAXB objectorg.w3c.dom.Element
JAXBException
- if an error occurs while converting JAXB object.public static Element convertJAXBToElement(Object jaxbObj, boolean checkIdref) throws JAXBException
org.w3c.dom.Element
.jaxbObj
- a JAXB objectorg.w3c.dom.Element
JAXBException
- if an error occurs while converting JAXB object.public static List convertElementToJAXB(List elements) throws JAXBException
org.w3c.dom.Element
to a list of
JAXB objects.elements
- a list of org.w3c.dom.Element
JAXBException
- if an error occurs while converting
org.w3c.dom.Element
.public static Object convertElementToJAXB(Element element) throws JAXBException
org.w3c.dom.Element
to a JAXB object.element
- a org.w3c.dom.Element
.JAXBException
- if an error occurs while converting
org.w3c.dom.Element
public static Boolean StringToBoolean(String str) throws Exception
str
- a value of XML boolean typeException
- if there is a syntax errorpublic static String BooleanToString(Boolean bool)
bool
- a Boolean object.public static QName convertStringToQName(String str, Element element)
str
- the String to be converted.element
- the Element object.public static String getNamespaceForPrefix(String prefix, Element e)
prefix
- The namespace prefix to mape
- The DOM element in which to calculate the prefix bindingpublic static void enforceProcessingRules(Message message, String requestMessageID, boolean isServer) throws SOAPBindingException, SOAPFaultException
message
- a messagerequestMessageID
- the request messageID if we are checking a
response message or null if we are checking a
request messageisServer
- true if this is a serverSOAPBindingException
- if the message violates rules on client.SOAPFaultException
- if the message violates rules on server.public static String getString(String key, Object[] params)
key
- a key to a resource bundleparams
- parameters to MessageFormatpublic static String getDefaultWSFVersion()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.