Package org.jboss.mx.remote.connector.soap.axis.test

Source Code of org.jboss.mx.remote.connector.soap.axis.test.AxisServerTest

/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.mx.remote.connector.soap.axis.test;

import org.jboss.mx.remote.connector.soap.axis.AxisSOAPConnectorServer;

import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;

/**
* Simply creates and starts an Axis SOAP Connector server which will
* wait for remote requests via SOAP protocol.
*
* @author <a href="telrod@e2technologies.net">Tom Elrod</a>
*/
public class AxisServerTest
{

    public void testServerStartup()
    {
        try
        {

            MBeanServer server = MBeanServerFactory.createMBeanServer();

            // create test mbean
            LocalGenTest testMBean = new LocalGenTest();
            server.registerMBean(testMBean, new ObjectName("test:type=LocalGenTest"));


            AxisSOAPConnectorServer connector = new AxisSOAPConnectorServer();
            server.registerMBean(connector, new ObjectName("jmx.remoting:type=Connector,transport=soap"));
            connector.start();
            System.err.println("Starting Axis SOAP Connector");
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }

    public static void main(String[] args)
    {
        AxisServerTest server = new AxisServerTest();
        server.testServerStartup();
    }

}
TOP

Related Classes of org.jboss.mx.remote.connector.soap.axis.test.AxisServerTest

TOP
Copyright © 2018 www.massapi.com. 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.