Package org.apache.axis.transport.http

Examples of org.apache.axis.transport.http.SimpleAxisServer


    private static final int AXIS_PORT = 9360;
    private SimpleAxisServer axisServer;
    private boolean configExists;

    protected void run() {
        axisServer = new SimpleAxisServer();
        ServerSocket socket = null;
        final int retries = 5;
        for (int i = 0; i < retries; i++) {
            try {
                socket = new ServerSocket(AXIS_PORT);
View Full Code Here


        init();
    }

    private void init() throws IOException
    {
        soapServer = new SimpleAxisServer();

        ServerSocket svrSocket = null;
        // Try five times
        for(int i = 0; i < 5; i++)
        {
View Full Code Here

public class SimpleServerImpl {

    public static void main(String[] args) {

        try {
            SimpleAxisServer sas = new SimpleAxisServer();
            sas.setServerSocket(new ServerSocket(PropertyLoader.getSimpleAxisServerPort()));
            Thread serverThread = new Thread(sas);
            serverThread.start();
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            "/axis/services/RMTestService";


    public void setUp() throws Exception {
        if (!serverStarted) {
            sas = new SimpleAxisServer();

            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);
            DocumentBuilder db = dbf.newDocumentBuilder();
View Full Code Here

        getSas().stop();
    }


    protected void initSimpleAxisServer() {
        setSas(new SimpleAxisServer());
        getSas().setMyConfig(new SimpleProvider());
    }
View Full Code Here

     * with code to start the SimpleAxisServer, deploy all the generated services, undeploy all the
     * generated services, stop the SimpleAxisServer, and clean up the test environment.
     */
    public void run(TestResult result) {
        // Get the SimpleAxisServer running--using the default port.
        SimpleAxisServer server = new SimpleAxisServer();

        try {
            Options opts = new Options(new String[]{});
            int port = opts.getPort();
            System.out.println("Starting test http server at port " + port);
            ServerSocket ss = new ServerSocket(port);
            server.setServerSocket(ss);
            Thread serverThread = new Thread(server);
            serverThread.setDaemon(true);
            serverThread.setContextClassLoader(loader);
            serverThread.start();

            // Find all the "deploy.xml" files and run them through the AdminClient.
            Iterator testIterator = Wsdl2javaTestSuite.fileNames.iterator();
            while (testIterator.hasNext()) {
                String deploy = null;

                Iterator files = ((List) testIterator.next()).iterator();
                while (files.hasNext()) {
                    String fileName = (String) files.next();
                    if (fileName.endsWith(File.separator + "deploy.xml")) {
                        deploy = fileName;
                    }
                }
               
                if(deploy != null){
                    // Perform actual deployment
                    String[] args = new String[] { Wsdl2javaTestSuite.WORK_DIR + deploy };
                    AdminClient.main(args);
                }
            }

            //AdminClient.main(new String[] {"list"});

            // Run the tests
            super.run(result);

            // Find all the "undeploy.xml" files and run them through the AdminClient.
            testIterator = Wsdl2javaTestSuite.fileNames.iterator();
            while (testIterator.hasNext()) {
                String undeploy = null;

                Iterator files = ((List) testIterator.next()).iterator();
                while (files.hasNext()) {
                    String fileName = (String) files.next();
                    if (fileName.endsWith(File.separator + "undeploy.xml")) {
                        undeploy = fileName;
                    }
                }
                if(undeploy != null) {
                    // Perform actual undeployment
                    String[] args = new String[] { Wsdl2javaTestSuite.WORK_DIR + undeploy };
                    AdminClient.main(args);
                }
            }

            //AdminClient.main(new String[] {"list"});

            // Clean up the test environment
            //this.cleanTest(); // commented out while debugging.

            // Stop the SimpleAxisServer
            System.out.println("Stopping test http server.");
            server.stop();
        } catch (Exception e) {
            throw new AssertionFailedError("The test suite failed with the following exception: " + e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis.transport.http.SimpleAxisServer

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.