You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/10/20 09:52:49 UTC

svn commit: r466026 - in /webservices/axis2/branches/java/1_1/modules/samples/FaultHandling: META-INF/ build.xml client/build.xml client/src/example/BankClient.java docs/ReadMe.html

Author: chinthaka
Date: Fri Oct 20 00:52:48 2006
New Revision: 466026

URL: http://svn.apache.org/viewvc?view=rev&rev=466026
Log:
Making sure the sample works fine. Updated the scripts, doc and the java class.
This sample was not working as the method in the doc to run this sample was not working. Updated ant script for that.

Removed:
    webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/META-INF/
Modified:
    webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/build.xml
    webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/build.xml
    webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/src/example/BankClient.java
    webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/docs/ReadMe.html

Modified: webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/build.xml?view=diff&rev=466026&r1=466025&r2=466026
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/build.xml (original)
+++ webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/build.xml Fri Oct 20 00:52:48 2006
@@ -1,19 +1,31 @@
 <project basedir=".">
-	
-	<property environment="env"/>
-	
-	<target name="check.dependency" unless="env.AXIS2_HOME">
-		<echo message="AXIS2_HOME must be set"/>
-	</target>
-	
-	<!-- Generate the service classes from the WSDL. -->
-	<target name="generate.service" if="env.AXIS2_HOME" depends="check.dependency">
-		<ant dir="service"/>
-	</target>
-	
-	<!-- Build the service, then the client. -->
-	<target name="jar" if="env.AXIS2_HOME" depends="check.dependency">
-		<ant dir="service" target="jar.server"/>
-		<ant dir="client"/>
-	</target>
+
+    <property environment="env"/>
+
+    <target name="check.dependency" unless="env.AXIS2_HOME">
+        <echo message="AXIS2_HOME must be set"/>
+    </target>
+
+    <!-- Generate the service classes from the WSDL. -->
+    <target name="generate.service" if="env.AXIS2_HOME" depends="check.dependency">
+        <ant dir="service"/>
+    </target>
+
+    <!-- Build the service, then the client. -->
+    <target name="jar" if="env.AXIS2_HOME" depends="check.dependency">
+        <ant dir="service" target="jar.server"/>
+        <ant dir="client"/>
+    </target>
+
+    <target name="run">
+        <java classname="example.BankClient" fork="true">
+            <arg line="${url} ${account} ${amt}"/>
+            <classpath>
+                <pathelement location="BankService-test-client.jar"/>
+                <fileset dir="${env.AXIS2_HOME}\lib">
+                    <include name="*.jar"/>
+                </fileset>
+            </classpath>
+        </java>
+    </target>
 </project>

Modified: webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/build.xml?view=diff&rev=466026&r1=466025&r2=466026
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/build.xml (original)
+++ webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/build.xml Fri Oct 20 00:52:48 2006
@@ -1,43 +1,43 @@
 <project basedir="." default="jar.client">
-	
-	<property environment="env"/>
-	
-	<property name="project.base.dir" value="."/>
-	<property name="parent.dir" value=".."/>
-	
-	<property name="wsdl.uri" value="${parent.dir}/bank.wsdl"/>
-	
-	<property name="src" value="${project.base.dir}/src"/>
-	<property name="target" value="${project.base.dir}/target"/>
-	<property name="target.java" value="${target}/src"/>
-	<property name="target.classes" value="${target}/classes"/>
-	
-	<target name="check.dependency" unless="env.AXIS2_HOME">
-		<echo message="AXIS2_HOME must be set"/>
-	</target>
-	
-	<target name="gen.stub" if="env.AXIS2_HOME" depends="check.dependency">
-		<delete dir="${target}"/>
-		<mkdir dir="${target}"/>
-		<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
-			<arg line="-uri ${wsdl.uri}"/>
-			<arg line="-u"/>
-			<arg line="-o ${target}"/>
-			<classpath>
-				<fileset dir="${env.AXIS2_HOME}\lib">
-					<include name="*.jar"/>
-				</fileset>
-			</classpath>
-		</java>
-	</target>
-	
-	<!-- Create the service archive by executing target\build.xml (jar.server) -->
-	<target name="jar.client" if="env.AXIS2_HOME" depends="gen.stub">
-		<copy todir="${target.java}">
-			<fileset dir="${src}"/>
-		</copy>
-		<ant dir="${target}"/>
-		<copy file="${target}\build\lib\BankService-test-client.jar" todir=".."/>
-	</target>
-	
+
+    <property environment="env"/>
+
+    <property name="project.base.dir" value="."/>
+    <property name="parent.dir" value=".."/>
+
+    <property name="wsdl.uri" value="${parent.dir}/bank.wsdl"/>
+
+    <property name="src" value="${project.base.dir}/src"/>
+    <property name="target" value="${project.base.dir}/target"/>
+    <property name="target.java" value="${target}/src"/>
+    <property name="target.classes" value="${target}/classes"/>
+
+    <target name="check.dependency" unless="env.AXIS2_HOME">
+        <echo message="AXIS2_HOME must be set"/>
+    </target>
+
+    <target name="gen.stub" if="env.AXIS2_HOME" depends="check.dependency">
+        <delete dir="${target}"/>
+        <mkdir dir="${target}"/>
+        <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+            <arg line="-uri ${wsdl.uri}"/>
+            <arg line="-u"/>
+            <arg line="-o ${target}"/>
+            <classpath>
+                <fileset dir="${env.AXIS2_HOME}\lib">
+                    <include name="*.jar"/>
+                </fileset>
+            </classpath>
+        </java>
+    </target>
+
+    <!-- Create the service archive by executing target\build.xml (jar.server) -->
+    <target name="jar.client" if="env.AXIS2_HOME" depends="gen.stub">
+        <copy todir="${target.java}">
+            <fileset dir="${src}"/>
+        </copy>
+        <ant dir="${target}"/>
+        <copy file="${target}\build\lib\BankService-test-client.jar" todir=".."/>
+    </target>
+
 </project>

Modified: webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/src/example/BankClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/src/example/BankClient.java?view=diff&rev=466026&r1=466025&r2=466026
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/src/example/BankClient.java (original)
+++ webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/client/src/example/BankClient.java Fri Oct 20 00:52:48 2006
@@ -12,7 +12,7 @@
 	public static void main(String[] args) {
 
 		if (args.length != 3) {
-			System.err.println("Usage: BankClient <url> <account> <amount>");
+			System.err.println("Usage: BankClient -Durl=<url> -Daccount=<account> -Damt=<amount>");
 			return;
 		}
 		

Modified: webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/docs/ReadMe.html
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/docs/ReadMe.html?view=diff&rev=466026&r1=466025&r2=466026
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/docs/ReadMe.html (original)
+++ webservices/axis2/branches/java/1_1/modules/samples/FaultHandling/docs/ReadMe.html Fri Oct 20 00:52:48 2006
@@ -90,23 +90,23 @@
 		Running the Client.
 	</h2>
 	<p>
-		Deploy the service archive to the Axis2 web application.
+		Deploy the service archive (BankService.aar) to the Axis2 web application.
 	</p>
 	<p>
 		Invoke the <em>example.BankClient</em> class. You may use the command scripts to do so.
 		You need to supply 3 parameters to the command, url, account and amount.
 		<ul>
 			<li>
-					<strong>run http://localhost:8080/axis2/services/BankService 13 400</strong><br/>
-					Throws AccountNotExistFaultMessageException<br/>&nbsp;
+					<strong>ant run -Durl=http://localhost:8080/axis2/services/BankService -Daccount=13 -Damt=400</strong><br/>
+					Throws AccountNotExistFaultMessageException. You will see "Account#13 does not exist"<br/>&nbsp;
 			</li>
 			<li>
-					<strong>run http://localhost:8080/axis2/services/BankService 88 1200</strong><br/>
-					Throws InsufficientFundsFaultMessageException<br/>&nbsp;
+					<strong>ant run -Durl=http://localhost:8080/axis2/services/BankService -Daccount=88 -Damt=1200</strong><br/>
+					Throws InsufficientFundsFaultMessageException. You will see "Account#88 has balance of 1000. It cannot support withdrawal of 1220"<br/>&nbsp;
 			</li>
 			<li>
-					<strong>run http://localhost:8080/axis2/services/BankService 88 400</strong><br/>
-					Succeeds with a balance of 600<br/>&nbsp;
+					<strong>ant run -Durl=http://localhost:8080/axis2/services/BankService -Daccount=88 -Damt=400</strong><br/>
+					Succeeds with a balance of 600. You will see "Balance = 600"<br/>&nbsp;
 			</li>
 		</ul>
 	</p>



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