synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r354033 - in /incubator/synapse/trunk/java: maven.xml src/samples/ src/samples/userguide/ src/samples/userguide/log/ src/samples/userguide/log/LoggingClient.java test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java
Date Mon, 05 Dec 2005 09:37:59 GMT
Author: saminda
Date: Mon Dec  5 01:37:44 2005
New Revision: 354033

URL: http://svn.apache.org/viewcvs?rev=354033&view=rev
Log:
correcting typo, and adding a sample which will use with "userguide". 
More samples are yet to commit 

Added:
    incubator/synapse/trunk/java/src/samples/
    incubator/synapse/trunk/java/src/samples/userguide/
    incubator/synapse/trunk/java/src/samples/userguide/log/
    incubator/synapse/trunk/java/src/samples/userguide/log/LoggingClient.java
Modified:
    incubator/synapse/trunk/java/maven.xml
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java

Modified: incubator/synapse/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/maven.xml?rev=354033&r1=354032&r2=354033&view=diff
==============================================================================
--- incubator/synapse/trunk/java/maven.xml (original)
+++ incubator/synapse/trunk/java/maven.xml Mon Dec  5 01:37:44 2005
@@ -24,7 +24,7 @@
         <ant:mkdir dir="${dist.dir}"/>
         <ant:mkdir dir="target/lib"/>
         <uptodate property="jars.uptodate" targetfile="target/synapse.war">
-            <srcfiles dir="modules">
+            <srcfiles dir="src">
                 <include name="**/*.java"/>
                 <include name="**/*.xml"/>
                 <exclude name="**/target/**"/>
@@ -109,6 +109,8 @@
                   tofile="target/synapse-repository-sendonAxis2/modules/addressing.mar"/>
             <copy file="synapse-test-resources/axis2/axis2.xml"
                   tofile="target/synapse-repository-sendonAxis2/axis2.xml"/>
+
+            <ant:delete file="target/npe.aar"/>
         </j:if>
 
 
@@ -125,6 +127,8 @@
               tofile="target/synapse-repository/modules/addressing.mar"/>
         <copy file="synapse-test-resources/axis2/axis2.xml"
               tofile="target/synapse-repository/axis2.xml"/>
+        <copy file="repo/synapse.xml"
+              tofile="target/synapse-repository/synapse.xml"/>
 
         <echo message="-----------Creating Testing Repository - Fault Handling ----------"/>
         <mkdir dir="target/synapse-repository-fault"/>
@@ -158,6 +162,15 @@
         <copy file="test/rules/synapse-send.xml"
               tofile="target/synapse-repository-send/synapse.xml"/>
 
+        <!-- Deleteing helper stuff-->
+
+        <ant:delete dir="target/modules"/>
+        <ant:delete dir="target/services"/>
+        <ant:delete file="target/emptymediator.aar"/>
+        <ant:delete file="target/synapse.aar"/>
+        <ant:delete file="target/synapse.mar"/>
+
+
 
     </postGoal>
     <!-- ================================================================ -->
@@ -191,7 +204,7 @@
     <!--- dist-bin -->
     <!-- ================================================================ -->
 
-    <goal name="dist-bin" prereqs="jar,war">
+    <goal name="dist-bin" prereqs="war">
         <property name="bin.dist.dir"
                   value="target/dist-bin/${pom.artifactId}-${pom.currentVersion}-bin"/>
         <ant:mkdir dir="${bin.dist.dir}"/>
@@ -285,7 +298,7 @@
                 <ant:include
                         name="${pom.artifactId}-${pom.currentVersion}.jar"/>
             </ant:lib>
-            <ant:webinf dir="target/synapse-repository-send/"/>
+            <ant:webinf dir="target/synapse-repository/"/>
         </ant:war>
     </goal>
 

Added: incubator/synapse/trunk/java/src/samples/userguide/log/LoggingClient.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/samples/userguide/log/LoggingClient.java?rev=354033&view=auto
==============================================================================
--- incubator/synapse/trunk/java/src/samples/userguide/log/LoggingClient.java (added)
+++ incubator/synapse/trunk/java/src/samples/userguide/log/LoggingClient.java Mon Dec  5 01:37:44
2005
@@ -0,0 +1,59 @@
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+package samples.userguide.log;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.MessageSender;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.om.OMAbstractFactory;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMFactory;
+import org.apache.axis2.om.OMNamespace;
+
+import javax.xml.namespace.QName;
+
+public class LoggingClient {
+    private static EndpointReference targetEpr = new EndpointReference(
+            "http://127.0.0.1:8080/synapse/services/mock_service");
+    private static QName operation = new QName("mock_operation");
+
+    public static void main(String[] args) {
+        try {
+            MessageSender msgSender = new MessageSender();
+            Options co = new Options();
+            co.setTo(targetEpr);
+            msgSender.setClientOptions(co);
+            msgSender.send(operation.getLocalPart(), payload());
+        } catch (AxisFault axisFault) {
+            axisFault
+                    .printStackTrace();
+        }
+    }
+
+    public static OMElement payload() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(
+                "urn:synapse-body", "ns");
+        OMElement method = fac.createOMElement("service", omNs);
+        OMElement value = fac.createOMElement("text", omNs);
+        value.addChild(
+                fac.createText(value, "Synapse Sample String"));
+        method.addChild(value);
+        return method;
+    }
+}

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java?rev=354033&r1=354032&r2=354033&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java
(original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java
Mon Dec  5 01:37:44 2005
@@ -35,7 +35,7 @@
     private OMElement config;
     private String synapsexml =
             "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
-                    "<stage name=\"logall\">\n" +
+                    "<stage name=\"addressing\">\n" +
                     "    <addressing/>\n" +
                     "</stage>\n" +
                     "</synapse>";



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


Mime
View raw message