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 sa...@apache.org on 2006/11/11 03:33:55 UTC

svn commit: r473630 - in /webservices/axis2/branches/java/1_1/modules/samples/pojoguide: README.txt build.xml src/sample/pojo/rpcclient/WeatherRPCClient.java

Author: sanka
Date: Fri Nov 10 18:33:54 2006
New Revision: 473630

URL: http://svn.apache.org/viewvc?view=rev&rev=473630
Log:
Fixed the axis2home path in the build.xml.

Fixed the WeatherServie s.t. client can specify
the EPR as a command line argument.

Completed the README.txt


Modified:
    webservices/axis2/branches/java/1_1/modules/samples/pojoguide/README.txt
    webservices/axis2/branches/java/1_1/modules/samples/pojoguide/build.xml
    webservices/axis2/branches/java/1_1/modules/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java

Modified: webservices/axis2/branches/java/1_1/modules/samples/pojoguide/README.txt
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/pojoguide/README.txt?view=diff&rev=473630&r1=473629&r2=473630
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/pojoguide/README.txt (original)
+++ webservices/axis2/branches/java/1_1/modules/samples/pojoguide/README.txt Fri Nov 10 18:33:54 2006
@@ -2,8 +2,8 @@
 =============================================
 
 Introduction
-============
 
+This sample shows how to how to expose a Java class as a web service.  The WeatherService Java class provides methods to get and set a Weather type Java objects.  The client uses RPCServiceClient to invoke those two methods just like Java object method invocations.
 
 Pre-Requisites
 ==============
@@ -11,13 +11,15 @@
 Apache Ant 1.6.2 or later
 
 Building the Service
-====================
 
-Type "ant" from Axis2_HOME/samples/pojoguide directory.
+type:
+$ant
 
 
 Running the Client
 ==================
+type:
+$ant rpc.client -Duri=http://<your host>:<your port>/axis2/services/WeatherService
 
 
 Help

Modified: webservices/axis2/branches/java/1_1/modules/samples/pojoguide/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/pojoguide/build.xml?view=diff&rev=473630&r1=473629&r2=473630
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/pojoguide/build.xml (original)
+++ webservices/axis2/branches/java/1_1/modules/samples/pojoguide/build.xml Fri Nov 10 18:33:54 2006
@@ -1,10 +1,12 @@
 
 <project basedir="." default="generate.service">
 
+	<property name="service.name" value="WeatherService" />
 	<property name="dest.dir" value="build" />
-	<property name="dest.dir.classes" value="${dest.dir}/WeatherService" />
-	<property name="dest.dir.lib" value="${dest.dir}/lib" />
-	<property name="axis2.home" value="c:\apps\axis2" />
+	<property name="dest.dir.classes" value="${dest.dir}/${service.name}" />
+	<property name="dest.dir.lib" value="${dest.dir}/lib" />	
+	<property name="axis2.home" value="../../" />
+	<property name="repository.path" value="${axis2.home}/repository" />
 
 	<path id="build.class.path">
 		<fileset dir="${axis2.home}/lib">
@@ -40,6 +42,11 @@
 		<javac srcdir="src" destdir="${dest.dir.classes}" includes="sample/pojo/service/**,sample/pojo/data/**">
 			<classpath refid="build.class.path" />
 		</javac>
+		
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir}/${service.name}.aar" />
+
+		<copy file="${dest.dir}/${service.name}.aar" tofile="${repository.path}/services/${service.name}.aar" overwrite="true" />
+		
 	</target>
 
 	<target name="rpc.client" depends="clean,prepare">

Modified: webservices/axis2/branches/java/1_1/modules/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java?view=diff&rev=473630&r1=473629&r2=473630
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java (original)
+++ webservices/axis2/branches/java/1_1/modules/samples/pojoguide/src/sample/pojo/rpcclient/WeatherRPCClient.java Fri Nov 10 18:33:54 2006
@@ -18,8 +18,14 @@
 
         Options options = serviceClient.getOptions();
 
-        EndpointReference targetEPR = new EndpointReference(
-                "http://localhost:8080/axis2/services/WeatherService");
+        EndpointReference targetEPR;
+        
+        if (args1 != null && args1.length != 0) {
+            targetEPR = new EndpointReference(args1[0]);
+        } else  {
+             targetEPR = new EndpointReference("http://localhost:8080/axis2/services/WeatherService");
+        }
+        
         options.setTo(targetEPR);
 
         // Setting the weather



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org