Class BaseUtils

java.lang.Object
org.apache.axis2.transport.base.BaseUtils

public class BaseUtils extends Object
  • Constructor Details

    • BaseUtils

      public BaseUtils()
  • Method Details

    • 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, org.apache.axis2.engine.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 org.apache.axiom.om.OMOutputFormat getOMOutputFormat(org.apache.axis2.context.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 org.apache.axis2.kernel.MessageFormatter getMessageFormatter(org.apache.axis2.context.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(org.apache.axis2.description.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