You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by sa...@apache.org on 2005/12/29 07:40:43 UTC

svn commit: r359738 - in /incubator/synapse/trunk/java: ./ scripts/samples/ scripts/samples/deprecation_mediator/

Author: saminda
Date: Wed Dec 28 22:40:33 2005
New Revision: 359738

URL: http://svn.apache.org/viewcvs?rev=359738&view=rev
Log:
Added deprecation sample to binary distribution. build.xml to run the sample and README.txt to give instruction. 

Added:
    incubator/synapse/trunk/java/scripts/samples/
    incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/
    incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/README.txt
    incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/build.xml
    incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/synapse.xml
Modified:
    incubator/synapse/trunk/java/maven.xml

Modified: incubator/synapse/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/maven.xml?rev=359738&r1=359737&r2=359738&view=diff
==============================================================================
--- incubator/synapse/trunk/java/maven.xml (original)
+++ incubator/synapse/trunk/java/maven.xml Wed Dec 28 22:40:33 2005
@@ -54,10 +54,10 @@
         <echo message="----------------Creating Empty Mediator aar----------------"/>
         <!--<mkdir dir="target/services/emptymediator/META-INF"/>-->
         <!--<copy file="synapse-test-resources/axis2/services/emptymediator/META-INF/services.xml"-->
-              <!--tofile="target/services/emptymediator/META-INF/services.xml"/>-->
+        <!--tofile="target/services/emptymediator/META-INF/services.xml"/>-->
         <!--<jar jarfile="target/emptymediator.aar"-->
-             <!--basedir="target/services/emptymediator">-->
-            <!--<include name="**"/>-->
+        <!--basedir="target/services/emptymediator">-->
+        <!--<include name="**"/>-->
         <!--</jar>-->
         <j:if test="${context.getVariable('maven.test.skip') != 'true'}">
 
@@ -91,7 +91,7 @@
             <copy file="target/npe.aar"
                   tofile="target/synapse-repository-sendon/services/npe.aar"/>
             <!--<copy file="target/emptymediator.aar"-->
-                  <!--tofile="target/synapse-repository-sendon/services/emptymediator.aar"/>-->
+            <!--tofile="target/synapse-repository-sendon/services/emptymediator.aar"/>-->
             <mkdir dir="target/synapse-repository-sendon/modules"/>
             <copy file="synapse-test-resources/axis2/modules/addressing.mar"
                   tofile="target/synapse-repository-sendon/modules/addressing.mar"/>
@@ -125,7 +125,7 @@
         <copy file="target/synapse.aar"
               tofile="target/synapse-repository/services/synapse.aar"/>
         <!--<copy file="target/emptymediator.aar"-->
-              <!--tofile="target/synapse-repository/services/emptymediator.aar"/>-->
+        <!--tofile="target/synapse-repository/services/emptymediator.aar"/>-->
         <mkdir dir="target/synapse-repository/modules"/>
         <copy file="synapse-test-resources/axis2/modules/addressing.mar"
               tofile="target/synapse-repository/modules/addressing.mar"/>
@@ -139,7 +139,7 @@
         <copy file="target/synapse.aar"
               tofile="target/synapse-repository-fault/services/synapse.aar"/>
         <!--<copy file="target/emptymediator.aar"-->
-              <!--tofile="target/synapse-repository-fault/services/emptymediator.aar"/>-->
+        <!--tofile="target/synapse-repository-fault/services/emptymediator.aar"/>-->
         <mkdir dir="target/synapse-repository-fault/modules"/>
         <copy file="synapse-test-resources/axis2/modules/addressing.mar"
               tofile="target/synapse-repository-fault/modules/addressing.mar"/>
@@ -153,7 +153,7 @@
         <copy file="target/synapse.aar"
               tofile="target/synapse-repository-send/services/synapse.aar"/>
         <!--<copy file="target/emptymediator.aar"-->
-              <!--tofile="target/synapse-repository-send/services/emptymediator.aar"/>-->
+        <!--tofile="target/synapse-repository-send/services/emptymediator.aar"/>-->
         <mkdir dir="target/synapse-repository-send/modules"/>
         <copy file="synapse-test-resources/axis2/modules/addressing.mar"
               tofile="target/synapse-repository-send/modules/addressing.mar"/>
@@ -184,7 +184,7 @@
         </jar>
 
         <copy file="target/DeprecationMediator.aar"
-              tofile="target/samples/sampleMediators/DeprecationMediator.aar"/>
+              tofile="target/samples/samples/deprecation_mediator/DeprecationMediator.aar"/>
 
         <!-- Deleteing helper stuff-->
 
@@ -201,17 +201,36 @@
     <goal name="samples_userguide">
         <mkdir dir="target/samples"/>
         <mkdir dir="${samples.dir}/userguide"/>
+        <mkdir dir="${samples.dir}/samples/deprecation_mediator"/>
         <mkdir dir="${samples.dir}/userguide/src"/>
+        <mkdir dir="${samples.dir}/samples/deprecation_mediator/src"/>
         <ant:copy todir="${samples.dir}/userguide/src">
             <ant:fileset dir="src">
                 <ant:include name="samples/**"/>
             </ant:fileset>
         </ant:copy>
+        <ant:copy todir="${samples.dir}/samples/deprecation_mediator/src">
+            <ant:fileset dir="src">
+                <ant:include name="samples/**"/>
+            </ant:fileset>
+        </ant:copy>
+        <ant:copy todir="${samples.dir}/samples/deprecation_mediator/deprecation_mediator/src">
+            <ant:fileset dir="src">
+                <ant:include name="samples/**"/>
+                <ant:include name="sampleMediators/**"/>
+            </ant:fileset>
+        </ant:copy>
         <jar destfile="${samples.dir}/userguide/sample_userguide.jar">
             <fileset dir="target/classes">
                 <include name="samples/**"/>
             </fileset>
         </jar>
+        <jar destfile="${samples.dir}/samples/deprecation_mediator/sample_deprecation_mediator.jar">
+            <fileset dir="target/classes">
+                <include name="samples/**"/>
+                <include name="sampleMediators/**"/>
+            </fileset>
+        </jar>
     </goal>
     <!-- ================================================================ -->
     <!--- Reports -->
@@ -291,6 +310,13 @@
                   tofile="${bin.dist.dir}/samples/userguide/build.xml"/>
         <ant:copy file="scripts/userguide/README.txt"
                   tofile="${bin.dist.dir}/samples/userguide/README.txt"/>
+
+        <ant:copy file="scripts/samples/deprecation_mediator/synapse.xml"
+                  tofile="${bin.dist.dir}/samples/samples/deprecation_mediator/synapse.xml"/>
+        <ant:copy file="scripts/samples/deprecation_mediator/README.txt"
+                  tofile="${bin.dist.dir}/samples/samples/deprecation_mediator/README.txt"/>
+        <ant:copy file="scripts/samples/deprecation_mediator/build.xml"
+                  tofile="${bin.dist.dir}/samples/samples/deprecation_mediator/build.xml"/>
 
         <ant:copy todir="${bin.dist.dir}/samples">
             <ant:fileset dir="target/samples/">

Added: incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/README.txt
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/README.txt?rev=359738&view=auto
==============================================================================
--- incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/README.txt (added)
+++ incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/README.txt Wed Dec 28 22:40:33 2005
@@ -0,0 +1,15 @@
+Running Deprecation Mediator Sample
+===================================
+
+1. Copy synapse.xml in this repository to synapse_repository in the binary distribution.
+2. Place the DeprecationMediator.aar in the synape_repository/services.
+3. Using the Ant command "ant synapse", start the stand-alone synapse server. This will be start at port 8080. 
+4. Use Ant command "ant" StockQuoteClient to run the sample. 
+ 
+You will get an answer if the system date is not between 06/09/2005:00:00 and 07/12/2006:00:00 [DD/MM/yyyy:HH:mm]
+
+The prior configuration is available at deprecation.xml, where it will located at DeprecationMediator.aar's META-INF folder. 
+
+Note : 
+The service is deprecated between these dates, i.e. it is not available or is not to be used.
+

Added: incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/build.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/build.xml?rev=359738&view=auto
==============================================================================
--- incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/build.xml (added)
+++ incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/build.xml Wed Dec 28 22:40:33 2005
@@ -0,0 +1,29 @@
+<project name="samples" default="StockQuoteClient">
+    <property name="arg1" value="IBM"/>
+    <property name="arg2" value="http://64.124.140.30:9090/soap"/>
+    <property name="arg3" value="http://localhost:8080"/>
+
+    <path id="axis.classpath">
+        <fileset dir="../../../lib">
+            <include name="*.jar"/>
+        </fileset>
+        <pathelement location="sample_deprecation_mediator.jar"/>
+    </path>
+
+    <target name="StockQuoteClient">
+        <java classname="samples.userguide.StockQuoteClient"
+              classpathref="axis.classpath" fork="true">
+            <arg value="${arg1}"/>
+            <arg value="${arg2}"/>
+            <arg value="${arg3}"/>
+        </java>
+    </target>
+
+    <target name="synapse">
+        <java classname="org.apache.axis2.transport.http.SimpleHTTPServer"
+              classpathref="axis.classpath" fork="true">
+            <arg value="../../synapse_repository"/>
+            <arg value="8080"/>
+        </java>
+    </target>
+</project>

Added: incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/synapse.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/synapse.xml?rev=359738&view=auto
==============================================================================
--- incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/synapse.xml (added)
+++ incubator/synapse/trunk/java/scripts/samples/deprecation_mediator/synapse.xml Wed Dec 28 22:40:33 2005
@@ -0,0 +1,14 @@
+<synapse xmlns="http://ws.apache.org/ns/synapse">
+    <stage name="logall">
+        <engage-addressing-in/>
+		<log/>
+    </stage>
+    <stage name="service-specific" >
+		<regex message-address="to" pattern="http://64.124.140.30:9090/soap">
+            <servicemediator name="optional" service="DeprecationMediator"/>
+		</regex>
+	</stage>
+	<stage name="sender">
+		<send/>
+	</stage>
+</synapse>



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