You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2005/06/23 09:38:07 UTC

svn commit: r193101 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/transport/http/ core/src/org/apache/axis/transport/tcp/ tool/script/

Author: hemapani
Date: Thu Jun 23 00:38:05 2005
New Revision: 193101

URL: http://svn.apache.org/viewcvs?rev=193101&view=rev
Log:
add a main method to the TCPServer and add code to print the port and the repsoitroy while starts up

Added:
    webservices/axis/trunk/java/modules/tool/script/http-server.bat
      - copied unchanged from r193047, webservices/axis/trunk/java/modules/tool/script/server.bat
    webservices/axis/trunk/java/modules/tool/script/http-server.sh
      - copied, changed from r193047, webservices/axis/trunk/java/modules/tool/script/server.sh
    webservices/axis/trunk/java/modules/tool/script/tcp-server.bat
    webservices/axis/trunk/java/modules/tool/script/tcp-server.sh   (with props)
Removed:
    webservices/axis/trunk/java/modules/tool/script/server.bat
    webservices/axis/trunk/java/modules/tool/script/server.sh
Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java?rev=193101&r1=193100&r2=193101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/SimpleHTTPServer.java Thu Jun 23 00:38:05 2005
@@ -18,9 +18,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.InputStreamReader;
 import java.io.OutputStream;
-import java.io.Reader;
 import java.net.ServerSocket;
 import java.net.Socket;
 
@@ -309,6 +307,8 @@
         Thread thread = new Thread(reciver);
         thread.setDaemon(true);
         try {
+            System.out.println("[Axis2] Using the Repository " + new File(args[1]).getAbsolutePath());
+            System.out.println("[Axis2] Starting the SimpleHTTPServer on port "+ args[0]);
             thread.start();
             System.in.read();
         } finally {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java?rev=193101&r1=193100&r2=193101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/tcp/TCPServer.java Thu Jun 23 00:38:05 2005
@@ -15,6 +15,7 @@
  */
 package org.apache.axis.transport.tcp;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
@@ -175,6 +176,15 @@
             serversocket = ListenerManager.openSocket(port);
         }
 
+    }
+    public static void main(String[] args) throws AxisFault, NumberFormatException{
+        if (args.length != 2) {
+            System.out.println("TCPServer repositoryLocation port");
+        }
+        TCPServer tcpServer = new TCPServer(Integer.parseInt(args[1]),args[0]);
+        System.out.println("[Axis2] Using the Repository " + new File(args[1]).getAbsolutePath());
+        System.out.println("[Axis2] Starting the TCP Server on port "+ args[0]);
+        tcpServer.start();
     }
 
 }

Copied: webservices/axis/trunk/java/modules/tool/script/http-server.sh (from r193047, webservices/axis/trunk/java/modules/tool/script/server.sh)
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/tool/script/http-server.sh?p2=webservices/axis/trunk/java/modules/tool/script/http-server.sh&p1=webservices/axis/trunk/java/modules/tool/script/server.sh&r1=193047&r2=193101&rev=193101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/tool/script/server.sh (original)
+++ webservices/axis/trunk/java/modules/tool/script/http-server.sh Thu Jun 23 00:38:05 2005
@@ -15,4 +15,4 @@
 AXIS2_CLASSPATH=$AXIS2_CLASSPATH:./lib/stax-api-1.0.jar
 export AXIS2_CLASSPATH
 echo the classpath $AXIS2_CLASSPATH
-java -classpath $AXIS2_CLASSPATH org.apache.axis.transport.http.SimpleHTTPServer ../repository $1
+java -classpath $AXIS2_CLASSPATH org.apache.axis.transport.http.SimpleHTTPServer $1 $2

Added: webservices/axis/trunk/java/modules/tool/script/tcp-server.bat
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/tool/script/tcp-server.bat?rev=193101&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/tool/script/tcp-server.bat (added)
+++ webservices/axis/trunk/java/modules/tool/script/tcp-server.bat Thu Jun 23 00:38:05 2005
@@ -0,0 +1,10 @@
+@echo off
+rem ---------------------------------------------------------------------------
+rem Start script for running the Simple Axis Server
+rem
+rem ---------------------------------------------------------------------------
+
+rem get the classes for the simple axis server
+set AXIS2_CLASS_PATH="%AXIS_HOME%";"%AXIS_HOME%\lib\axis2-M1.jar";"%AXIS_HOME%\lib\axis-wsdl4j-1.2-RC1.jar";"%AXIS_HOME%\lib\commons-logging-1.0.3.jar";"%AXIS_HOME%\lib\log4j-1.2.8.jar";"%AXIS_HOME%\lib\stax-1.1.1-dev.jar";"%AXIS_HOME%\lib\stax-api-1.0.jar"
+
+java -cp %AXIS2_CLASS_PATH% org.apache.axis.transport.tcp.TCPServer %1 %2

Added: webservices/axis/trunk/java/modules/tool/script/tcp-server.sh
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/tool/script/tcp-server.sh?rev=193101&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/tool/script/tcp-server.sh (added)
+++ webservices/axis/trunk/java/modules/tool/script/tcp-server.sh Thu Jun 23 00:38:05 2005
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cd ..
+AXIS2_CLASSPATH=./lib/axis2-M2.jar
+AXIS2_CLASSPATH=$AXIS2_CLASSPATH:./lib/axis-wsdl4j-1.2.jar
+AXIS2_CLASSPATH=$AXIS2_CLASSPATH:./lib/commons-logging-1.0.3.jar
+AXIS2_CLASSPATH=$AXIS2_CLASSPATH:./lib/log4j-1.2.8.jar
+AXIS2_CLASSPATH=$AXIS2_CLASSPATH:./lib/stax-1.1.1-dev.jar
+AXIS2_CLASSPATH=$AXIS2_CLASSPATH:./lib/stax-api-1.0.jar
+export AXIS2_CLASSPATH
+echo the classpath $AXIS2_CLASSPATH
+java -classpath $AXIS2_CLASSPATH org.apache.axis.transport.tcp.TCPServer  $1 $2

Propchange: webservices/axis/trunk/java/modules/tool/script/tcp-server.sh
------------------------------------------------------------------------------
    svn:executable = *