Package org.apache.axis2.transport.base
Class BaseUtils
- java.lang.Object
-
- org.apache.axis2.transport.base.BaseUtils
-
-
Constructor Summary
Constructors Constructor Description BaseUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Hashtable<String,String>getEPRProperties(String url)Extract the properties from an endpoint reference.static MessageFormattergetMessageFormatter(MessageContext msgContext)Get the MessageFormatter for the given message.static OMOutputFormatgetOMOutputFormat(MessageContext msgContext)Get the OMOutput format for the given messagestatic QNamegetQNameFromString(Object obj)Return a QName from the String passed in of the form {ns}elementprotected static voidhandleException(String s)protected static voidhandleException(String s, Exception e)static booleanisBlank(String str)Utility method to check if a string is null or emptystatic booleanisUsingTransport(AxisService service, String transportName)static PropertiesloadProperties(String filePath)Loads the properties from a given property file pathstatic voidmarkServiceAsFaulty(String serviceName, String msg, AxisConfiguration axisCfg)Marks the given service as faulty with the given comment
-
-
-
Method Detail
-
getQNameFromString
public static QName getQNameFromString(Object obj)
Return a QName from the String passed in of the form {ns}element- Parameters:
obj- a QName or a String containing a QName in {ns}element form- Returns:
- a corresponding QName object
-
markServiceAsFaulty
public static void markServiceAsFaulty(String serviceName, String msg, AxisConfiguration axisCfg)
Marks the given service as faulty with the given comment- Parameters:
serviceName- service namemsg- comment for being faultyaxisCfg- configuration context
-
getOMOutputFormat
public static OMOutputFormat getOMOutputFormat(MessageContext msgContext)
Get the OMOutput format for the given message- Parameters:
msgContext- the axis message context- Returns:
- the OMOutput format to be used
-
getMessageFormatter
public static MessageFormatter getMessageFormatter(MessageContext msgContext)
Get the MessageFormatter for the given message.- Parameters:
msgContext- the axis message context- Returns:
- the MessageFormatter to be used
-
handleException
protected static void handleException(String s)
-
isBlank
public static boolean isBlank(String str)
Utility method to check if a string is null or empty- Parameters:
str- the string to check- Returns:
- true if the string is null or empty
-
isUsingTransport
public static boolean isUsingTransport(AxisService service, String transportName)
-
getEPRProperties
public static Hashtable<String,String> getEPRProperties(String url)
Extract the properties from an endpoint reference.- Parameters:
url- an endpoint reference- Returns:
- the extracted properties
-
loadProperties
public static Properties loadProperties(String filePath)
Loads the properties from a given property file path- Parameters:
filePath- Path of the property file- Returns:
- Properties loaded from given file
-
-