Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.AxisConfiguration


                String serverName = (String)
                        messageContext.getProperty(SynapseConstants.Axis2Param.SYNAPSE_SERVER_NAME);

                if(serverName != null && messageContext instanceof Axis2MessageContext) {

                    AxisConfiguration configuration = ((Axis2MessageContext)messageContext).
                            getAxis2MessageContext().
                            getConfigurationContext().getAxisConfiguration();

                    String myServerName = getAxis2ParameterValue(configuration,
                            SynapseConstants.Axis2Param.SYNAPSE_SERVER_NAME);
View Full Code Here


    /**
     * Start the proxy service
     * @param synCfg the synapse configuration
     */
    public void start(SynapseConfiguration synCfg) {
        AxisConfiguration axisConfig = synCfg.getAxisConfiguration();
        if (axisConfig != null) {

            Parameter param = axisConfig.getParameter(SynapseConstants.SYNAPSE_ENV);
            if (param != null && param.getValue() instanceof SynapseEnvironment)  {
                SynapseEnvironment env = (SynapseEnvironment) param.getValue();
                if (targetInLineInSequence != null) {
                    targetInLineInSequence.init(env);
                }
                if (targetInLineOutSequence != null) {
                    targetInLineOutSequence.init(env);
                }
                if (targetInLineFaultSequence != null) {
                    targetInLineFaultSequence.init(env);
                }
            } else {
                auditWarn("Unable to find the SynapseEnvironment. " +
                    "Components of the proxy service may not be initialized");
            }

            AxisService as = axisConfig.getServiceForActivation(this.getName());
            as.setActive(true);
            axisConfig.notifyObservers(new AxisEvent(AxisEvent.SERVICE_START, as), as);
            this.setRunning(true);
            auditInfo("Started the proxy service : " + name);
        } else {
            auditWarn("Unable to start proxy service : " + name +
                ". Couldn't access Axis configuration");
View Full Code Here

    /**
     * Stop the proxy service
     * @param synCfg the synapse configuration
     */
    public void stop(SynapseConfiguration synCfg) {
        AxisConfiguration axisConfig = synCfg.getAxisConfiguration();
        if (axisConfig != null) {

            if (targetInLineInSequence != null) {
                targetInLineInSequence.destroy();
            }
            if (targetInLineOutSequence != null) {
                targetInLineOutSequence.destroy();
            }
            if (targetInLineFaultSequence != null) {
                targetInLineFaultSequence.destroy();
            }

            try {
                AxisService as = axisConfig.getService(this.getName());
                if (as != null) {
                    as.setActive(false);
                    axisConfig.notifyObservers(new AxisEvent(AxisEvent.SERVICE_STOP, as), as);
                }
                this.setRunning(false);
                auditInfo("Stopped the proxy service : " + name);
            } catch (AxisFault axisFault) {
                handleException("Error stopping the proxy service : " + name, axisFault);
View Full Code Here

                            Boolean.parseBoolean(preserveAddressingProperty)));
        }


        ConfigurationContext axisCfgCtx = axisOutMsgCtx.getConfigurationContext();
        AxisConfiguration axisCfg       = axisCfgCtx.getAxisConfiguration();

        AxisService anoymousService =
            AnonymousServiceFactory.getAnonymousService(synapseOutMessageContext.getConfiguration(),
            axisCfg, wsAddressingEnabled, wsRMEnabled, wsSecurityEnabled);
        // mark the anon services created to be used in the client side of synapse as hidden
View Full Code Here

     */
    public MessageContext build() throws Exception {
        SynapseConfiguration testConfig = new SynapseConfiguration();
        // TODO: check whether we need a SynapseEnvironment in all cases
        SynapseEnvironment synEnv
            = new Axis2SynapseEnvironment(new ConfigurationContext(new AxisConfiguration()),
                                          testConfig);
        MessageContext synCtx;
        if (requireAxis2MessageContext) {
            synCtx = new Axis2MessageContext(new org.apache.axis2.context.MessageContext(),
                                             testConfig, synEnv);
View Full Code Here

      log.debug("remove axis " + httpSR);

      try {
        Object[]          v          = (Object[])servletRegistrations.get(httpSR);
        Axis2Servlet      servlet    = (Axis2Servlet)v[1];       
        AxisConfiguration axisConfig = servlet.getAxisConfigurator().getAxisConfiguration();
       
        for(Iterator it = soapServices.keySet().iterator(); it.hasNext(); ) {           
          ServiceReference soapSR      = (ServiceReference)it.next();
          SOAPService      soapService = (SOAPService)soapServices.get(soapSR);
          soapService.undeploy(axisConfig);
View Full Code Here

          ServiceReference sr      = (ServiceReference)it.next();
          if(httpSR == null || httpSR.equals(sr)) {
            Object[]         v       = (Object[])servletRegistrations.get(sr);
            Axis2Servlet     servlet = (Axis2Servlet)v[1];

            AxisConfiguration axisConfig = servlet.getAxisConfigurator().getAxisConfiguration();
           
            soapService.undeploy(axisConfig);
          }
        } catch (Exception e) {
          log.warn("Failed to undeploy service " + soapService, e);
View Full Code Here

        try {
          ServiceReference sr      = (ServiceReference)it.next();
          Object[]         v       = (Object[])servletRegistrations.get(sr);
          Axis2Servlet     servlet = (Axis2Servlet)v[1];
         
          AxisConfiguration axisConfig = servlet.getAxisConfigurator().getAxisConfiguration();
                   
          soapService.deploy(axisConfig);
          count++;
        } catch (Exception e) {
          log.warn("Failed to deploy service " + soapService, e);
View Full Code Here

    out.println("<head>");
    out.println(" <title>Axis2Admin</title>");
    out.println("<head>");
    out.println("<body>");

    AxisConfiguration axisConfig = axisServlet.getAxisConfigurator().getAxisConfiguration();
    Map services = axisConfig.getServices();

    out.println("<h2>Registered services</h2>");
    out.println("<dl>");
    for(Iterator it = services.keySet().iterator(); it.hasNext(); ) {
      String      name = (String)it.next();
View Full Code Here

    out.println("<head>");
    out.println(" <title>Axis2Admin</title>");
    out.println("<head>");
    out.println("<body>");

    AxisConfiguration axisConfig = axisServlet.getAxisConfigurator().getAxisConfiguration();
    Map services = axisConfig.getServices();

    out.println("<h2>Registered services</h2>");
    out.println("<dl>");
    for(Iterator it = services.keySet().iterator(); it.hasNext(); ) {
      String      name = (String)it.next();
View Full Code Here

TOP

Related Classes of org.apache.axis2.engine.AxisConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.