Class AxisServer

  • Direct Known Subclasses:
    SimpleAxis2Server

    public class AxisServer
    extends Object
    This class provide a very convenient way of creating server and deploying services. Once someone call start method it will fire up configuration context and start up the listeners. One can provide repository location and axis.xml as system properties.
    • Constructor Detail

      • AxisServer

        public AxisServer​(boolean startOnDeploy)
        If you do not want Axis2 to start the server automatically then pass the "false" else "true"
        Parameters:
        startOnDeploy - : boolean
      • AxisServer

        public AxisServer()
        Server will start automatically if you call deployService
    • Method Detail

      • deployService

        public void deployService​(String serviceClassName)
                           throws AxisFault
        Will make Java class into a web service
        Parameters:
        serviceClassName - : Actual class you want to make as a web service
        Throws:
        AxisFault - : If something went wrong
      • start

        protected void start()
                      throws AxisFault
        Will create a configuration context from the avialable data and then it will start the listener manager
        Throws:
        AxisFault - if something went wrong
      • stop

        public void stop()
                  throws AxisFault
        Stop the server, automatically terminates the listener manager as well.
        Throws:
        AxisFault
      • setConfigurationContext

        public void setConfigurationContext​(ConfigurationContext configContext)
        Set the configuration context. Please call this before you call deployService or start method
        Parameters:
        configContext - ConfigurationContext
      • getConfigurationContext

        public ConfigurationContext getConfigurationContext()
                                                     throws AxisFault
        Creates a default configuration context if one is not set already via setConfigurationContext
        Returns:
        ConfigurationContext
        Throws:
        AxisFault
      • createDefaultConfigurationContext

        protected ConfigurationContext createDefaultConfigurationContext()
                                                                  throws AxisFault
        Users extending this class can override this method to supply a custom ConfigurationContext
        Returns:
        ConfigurationContext
        Throws:
        AxisFault