Class BaseUtils

  • Direct Known Subclasses:
    JMSUtils

    public class BaseUtils
    extends Object
    • Constructor Detail

      • BaseUtils

        public BaseUtils()
    • 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 name
        msg - comment for being faulty
        axisCfg - 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)
      • handleException

        protected static void handleException​(String s,
                                              Exception e)
      • 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