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 ch...@apache.org on 2005/02/14 08:25:16 UTC
svn commit: r153731 - in
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3:
build.xml build/ classes/ src/log4j.properties
src/samples/userguide/sample3/client/EchoInt.java
src/samples/userguide/sample3/client/EchoString.java src/server.xml
Author: chathura
Date: Sun Feb 13 23:25:14 2005
New Revision: 153731
URL: http://svn.apache.org/viewcvs?view=rev&rev=153731
Log:
Ant Build updated and Sample3 with Handler is completed
Removed:
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/build/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/classes/
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/log4j.properties
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/server.xml
Modified:
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/build.xml
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoInt.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoString.java
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/build.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/build.xml?view=diff&r1=153730&r2=153731
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/build.xml (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/build.xml Sun Feb 13 23:25:14 2005
@@ -1,52 +1,110 @@
-<?xml version="1.0"?>
-<!-- ======================================================================
- Feb 11, 2005 1:04:21 PM
-
- This build file is intended to compile and run the Axis2 sample
- provided here with the service being deployed at Tomcat or by
- running a simple Axis2 server.
-
-
- Chathura
- ====================================================================== -->
-<project name="Sample3" basedir="." default="jar">
- <property name="src.dir" value="src" />
- <property name="classes.dir" value="classes" />
- <property name="build.dir" value="build" />
- <property name="lib.dir" value="lib" />
-
-
- <property name="root" location="../../../.." />
-
- <path id="axis.test.classpath">
- <path refid="maven.dependency.classpath">
- </path>
- <pathelement location="${root}/target/classes" />
- </path>
-
- <target name="clean" description="Delete all generated files">
- <delete dir="${classes.dir}" />
- <delete dir="${build.dir}" />
- </target>
-
- <target name="validate">
-
- </target>
-
- <target name="createDir">
- <mkdir dir="${build.dir}" />
- <mkdir dir="${classes.dir}" />
- </target>
-
- <target name="compile" depends="validate,createDir">
- <javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="axis.test.classpath">
-
- </javac>
- </target>
-
- <target name="jar" depends="compile">
-
- </target>
-
-</project>
-
+<?xml version="1.0"?>
+<!-- ======================================================================
+ Feb 11, 2005 1:04:21 PM
+
+ This build file is intended to compile and run the Axis2 sample
+ provided here with the service being deployed at Tomcat or by
+ running a simple Axis2 server.
+
+
+ Chathura
+ ====================================================================== -->
+<project name="sample3" basedir="." default="jar">
+ <property name="src.dir" value="src" />
+ <property name="classes.dir" value="./classes" />
+ <property name="build.dir" value="./build" />
+ <property name="lib.dir" value="./lib" />
+ <property name="conf.dir" value="./conf"/>
+ <property name="jardrop.dir" value="services"/>
+ <property name="server.jardrop.relative.dir" value="webapps/axis2/WEB-INF/services"/>
+ <property environment="env"/>
+
+
+
+
+ <path id="classpath.library">
+ <fileset dir="${lib.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="classpath.classes">
+ <pathelement location="${classes.dir}"/>
+ </path>
+
+ <path id="classpath.runtimelibraries">
+ <pathelement path="classpath.classes"/>
+ </path>
+
+
+
+
+ <target name="clean" description="Delete all generated files">
+ <delete dir="${classes.dir}" />
+ <delete dir="${services.dir}" failonerror="false"/>
+ <delete dir="${build.dir}" />
+ </target>
+
+ <target name="validateTomcatHome">
+ <available file="${env.CATALINA_HOME}/webapps/axis2" type="dir" property="axis2.deployed"/>
+ </target>
+
+ <target name="validateSevices.dir">
+ <available file="${env.CATALINA_HOME}/webapps/axis2/services" type="dir" property="axis2.services"/>
+ </target>
+
+ <target name="validateDeploymentSettings" depends="validateTomcatHome" unless="validateSevices.dir">
+ <mkdir dir="${env.CATALINA_HOME}/webapps/axis2/services"/>
+ </target>
+
+
+ <target name="createDir">
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${classes.dir}" />
+ <mkdir dir="${build.dir}/${jardrop.dir}"/>
+ </target>
+
+ <target name="compile" depends="createDir">
+ <javac srcdir="${src.dir}" destdir="${classes.dir}" >
+ <classpath refid="classpath.library"/>
+ </javac>
+ </target>
+
+ <target name="jar" depends="clean,compile">
+ <jar destfile="${build.dir}/${jardrop.dir}/${ant.project.name}.jar">
+
+ <fileset dir="${classes.dir}">
+ <include name="**/EchoImpl.class"/>
+ <include name="**/LoggingHandler.class"/>
+ </fileset>
+ <fileset dir="${conf.dir}">
+ <include name="META-INF/service.xml"/>
+ </fileset>
+ </jar>
+ <jar destfile="${lib.dir}/${ant.project.name}-all.jar">
+ <fileset dir="${classes.dir}"/>
+ </jar>
+ </target>
+
+ <target name="deploy" depends="jar,validateDeploymentSettings">
+ <copy file="${build.dir}/${jardrop.dir}/${ant.project.name}.jar" todir="${env.CATALINA_HOME}/${server.jardrop.relative.dir}" overwrite="true"/>
+ </target>
+
+ <target name="echoString" depends="compile">
+ <java classname="samples.userguide.sample3.client.EchoString">
+ <classpath refid="classpath.library"/>
+ <arg value="8080"/>
+ <arg value="Hi Axis2 this is to test the EchoString(to change the string look in the build file)"/>
+ </java>
+ </target>
+
+ <target name="echoInt" depends="compile">
+ <java classname="samples.userguide.sample3.client.EchoInt">
+ <classpath refid="classpath.library"/>
+ <arg value="8080"/>
+ <arg value="329"/>
+ </java>
+ </target>
+
+</project>
+
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoInt.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoInt.java?view=diff&r1=153730&r2=153731
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoInt.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoInt.java Sun Feb 13 23:25:14 2005
@@ -28,10 +28,15 @@
public class EchoInt {
public static void main(String[] args) throws Exception {
+
+ if(2!= args.length ){
+ System.out.println("Usage <Port> <Echo Message>");
+
+ }
InteropTest_Stub clientStub = new InteropTest_Stub();
- URL url = new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/axis2/services/sample3");
+ URL url = new URL("http","127.0.0.1",new Integer(args[0]).intValue(),"/axis2/services/sample3");
clientStub.setEndPointReference(new EndpointReference(AddressingConstants.WSA_TO, url.toString()));
- Integer echoInt = clientStub.echoInt(new Integer(794));
+ Integer echoInt = clientStub.echoInt(new Integer(args[1]));
System.out.println(echoInt);
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoString.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoString.java?view=diff&r1=153730&r2=153731
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoString.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/samples/userguide/sample3/client/EchoString.java Sun Feb 13 23:25:14 2005
@@ -19,7 +19,6 @@
import org.apache.axis.addressing.AddressingConstants;
import org.apache.axis.addressing.EndpointReference;
-import org.apache.axis.engine.EngineUtils;
/**
* @author chathura@opensource.lk
@@ -28,10 +27,14 @@
public class EchoString {
public static void main(String[] args) throws Exception{
+ if(2!= args.length ){
+ System.out.println("Usage <Port> <Echo Message>");
+
+ }
InteropTest_Stub stub =new InteropTest_Stub();
- URL url = new URL("http","127.0.0.1",EngineUtils.TESTING_PORT,"/axis2/services/sample3");
+ URL url = new URL("http","127.0.0.1",new Integer(args[0]).intValue(),"/axis2/services/sample3");
stub.setEndPointReference(new EndpointReference(AddressingConstants.WSA_TO, url.toString()));
- System.out.println(stub.echoString("Hi Axis2 Sync with a Logging Handler"));
+ System.out.println(stub.echoString(args[1]));
}