synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r397884 [5/8] - in /incubator/synapse/trunk/scratch/synapse2: ./ bin/ modules/ modules/core/ modules/core/conf/ modules/core/src/ modules/core/src/org/ modules/core/src/org/apache/ modules/core/src/org/apache/synapse/ modules/core/src/org/a...
Date Fri, 28 Apr 2006 12:49:34 GMT
Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/conf/axis2.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/conf/axis2.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/conf/axis2.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/conf/axis2.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,150 @@
+<axisconfig name="AxisJava2.0_Provider_Endpint">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment" locked="false">true</parameter>
+    <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" locked="false">true</parameter>
+    <parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
+
+    <!-- Uncomment this to enable REST support -->
+    <!--    <parameter name="enableREST" locked="false">true</parameter>-->
+
+
+    <parameter name="userName" locked="false">admin</parameter>
+    <parameter name="password" locked="false">axis2</parameter>
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovride this for particular service by adding the same element with your requirement-->
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port" locked="false">6060</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">http://myApp.com/ws</parameter>-->
+    </transportReceiver>
+
+    <transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port" locked="false">6061</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">tcp://myApp.com/ws</parameter>-->
+    </transportReceiver>
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="jms"
+                     class="org.apache.axis2.transport.jms.JMSSender"/>
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="inflow">
+        <!--  System pre defined phases       -->
+         <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
+        <!--  System pre defined phases       -->
+        <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+    </phaseOrder>
+    <phaseOrder type="outflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+    <phaseOrder type="INfaultflow">
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+    </phaseOrder>
+    <phaseOrder type="Outfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+</axisconfig>
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/conf/synapse.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/conf/synapse.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/conf/synapse.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/conf/synapse.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,18 @@
+<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://xmethods.*">
+			<header type="to" value="http://64.124.140.30:9090/soap"/>
+			<xpath expr="//*[Symbol='MSFT']">
+				<fault/>
+			</xpath>
+		</regex>	
+	</stage>
+	<stage name="sender">
+		<send/>
+	</stage>	
+</synapse>
+

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/services/emptymediator/META-INF/services.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/services/emptymediator/META-INF/services.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/services/emptymediator/META-INF/services.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/services/emptymediator/META-INF/services.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,6 @@
+<service name="emptymediator">
+    <operation name="mediate" > 
+          <messageReceiver class="org.apache.synapse.axis2.EmptyMessageReceiver" />
+    </operation>
+</service>
+  
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/services/synapse/META-INF/services.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/services/synapse/META-INF/services.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/services/synapse/META-INF/services.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/axis2/services/synapse/META-INF/services.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,8 @@
+  <service name="synapse">
+
+    <operation name="mediate" > 
+          <messageReceiver class="org.apache.synapse.axis2.SynapseMessageReceiver" />
+    </operation>
+    
+  </service>
+  
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/environmentaware-service.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/environmentaware-service.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/environmentaware-service.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/environmentaware-service.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,11 @@
+<service name="environmentaware-mediator">
+    <description>
+        EnvironmentAware-Mediator
+    </description>
+    <parameter name="ServiceClass" locked="false">
+        org.apache.axis2.test.EnvironmentAwareMediator</parameter>
+    <operation name="mediate">
+        <messageReceiver
+                class="org.apache.synapse.axis2.ServiceMediatorMessageReceiver"/>
+    </operation>
+</service>
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/service-mediator.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/service-mediator.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/service-mediator.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/service-mediator.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,11 @@
+<service name="test-mediator">
+    <description>
+        Test-Mediator
+    </description>
+    <parameter name="ServiceClass" locked="false">
+        org.apache.axis2.test.TestMediator</parameter>
+    <operation name="mediate">
+        <messageReceiver
+                class="org.apache.synapse.axis2.ServiceMediatorMessageReceiver"/>
+    </operation>
+</service>
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/services.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/services.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/services.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/org/apache/axis2/META-INF/services.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,23 @@
+<service name="npe">
+    <description>
+        This sample stimulate the Native Provider Endpoint
+    </description>
+    <parameter name="ServiceClass" locked="false">
+        org.apache.axis2.test.Echo</parameter>
+    <operation name="echo">
+        <messageReceiver
+                class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:synapse/sendon</actionMapping>
+    </operation>
+    <operation name="fault" locked="false">
+        <actionMapping>urn:synapse/sendon-fault</actionMapping>
+    </operation>
+    <operation name="echo_addressing" locked="false">
+        <actionMapping>urn:synapse/sendon-addressing-engage</actionMapping>
+    </operation>
+    <operation name="ping">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <actionMapping>urn:synapse/ping</actionMapping>
+    </operation>
+    <operation name="simple_resources"/>
+</service>

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/rest/conf/axis2-rest.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/rest/conf/axis2-rest.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/rest/conf/axis2-rest.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/rest/conf/axis2-rest.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,150 @@
+<axisconfig name="AxisJava2.0">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment" locked="false">true</parameter>
+    <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" locked="false">true</parameter>
+    <parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
+
+    <!-- Uncomment this to enable REST support -->
+    <parameter name="enableREST" locked="false">true</parameter>
+
+
+    <parameter name="userName" locked="false">admin</parameter>
+    <parameter name="password" locked="false">axis2</parameter>
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovride this for particular service by adding the same element with your requirement-->
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port" locked="false">6060</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">http://myApp.com/ws</parameter>-->
+    </transportReceiver>
+
+    <transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port" locked="false">6061</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">tcp://myApp.com/ws</parameter>-->
+    </transportReceiver>
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="jms"
+                     class="org.apache.axis2.transport.jms.JMSSender"/>
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="inflow">
+        <!--  System pre defined phases       -->
+         <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
+        <!--  System pre defined phases       -->
+        <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+    </phaseOrder>
+    <phaseOrder type="outflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+    <phaseOrder type="INfaultflow">
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+    </phaseOrder>
+    <phaseOrder type="Outfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+</axisconfig>
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/tcp/axis2-tcp.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/tcp/axis2-tcp.xml?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/tcp/axis2-tcp.xml (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/tcp/axis2-tcp.xml Fri Apr 28 05:49:17 2006
@@ -0,0 +1,152 @@
+<axisconfig name="AxisJava2.0">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment" locked="false">true</parameter>
+    <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" locked="false">true</parameter>
+    <parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
+
+    <!-- Uncomment this to enable REST support -->
+    <!--    <parameter name="enableREST" locked="false">true</parameter>-->
+
+
+    <module ref="addressing"/>
+    
+    <parameter name="userName" locked="false">admin</parameter>
+    <parameter name="password" locked="false">axis2</parameter>
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovride this for particular service by adding the same element with your requirement-->
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port" locked="false">6060</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">http://myApp.com/ws</parameter>-->
+    </transportReceiver>
+
+    <transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port" locked="false">6061</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">tcp://myApp.com/ws</parameter>-->
+    </transportReceiver>
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="jms"
+                     class="org.apache.axis2.transport.jms.JMSSender"/>
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="inflow">
+        <!--  System pre defined phases       -->
+         <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
+        <!--  System pre defined phases       -->
+        <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+    </phaseOrder>
+    <phaseOrder type="outflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+    <phaseOrder type="INfaultflow">
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+    </phaseOrder>
+    <phaseOrder type="Outfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+</axisconfig>
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/transformation/simple_transformation.xsl
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/transformation/simple_transformation.xsl?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/transformation/simple_transformation.xsl (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test-resources/transformation/simple_transformation.xsl Fri Apr 28 05:49:17 2006
@@ -0,0 +1,9 @@
+<xsl:stylesheet version='1.0'
+                xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+    <xsl:template match="/">
+        <transformedText>
+            <xsl:value-of select="//text"/>
+            <xsl:text>Test Being Transformed</xsl:text>
+        </transformedText>
+    </xsl:template>
+</xsl:stylesheet>

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/ExceptionHandlingTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/ExceptionHandlingTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/ExceptionHandlingTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/ExceptionHandlingTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,71 @@
+package org.apache.axis2;
+
+import junit.framework.TestCase;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.axiom.om.OMElement;
+/*
+* 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.
+*
+*/
+
+public class ExceptionHandlingTest extends TestCase {
+    private MessageContext msgCtx;
+    private SynapseEnvironment env;
+    private OMElement config;
+    private SimpleHTTPServer targetServer;
+    private String synapsexml =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<header type=\"to\" value=\"http://localhost:5043/axis2/services/npe\"/>\n" +
+                    "<header type=\"action\" value=\"urn:synapse/sendon-fault\"/>\n" +
+                    "<stage name=\"testing_stage\">\n" +
+                    "    <engage-addressing-in/>\n" +
+                    "    <send/>\n " +
+                    "</stage>\n" +
+                    "</synapse>";
+
+    public void setUp() throws Exception {
+        msgCtx = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
+        msgCtx.setSoapAction(null);
+        config = Axis2EnvSetup.getSynapseConfigElement(synapsexml);
+        env = new Axis2SynapseEnvironment(config,
+                Thread.currentThread().getContextClassLoader());
+        ConfigurationContext context = ConfigurationContextFactory
+                .createConfigurationContextFromFileSystem(
+                        "target/synapse-repository-sendonAxis2", null);
+        targetServer = new SimpleHTTPServer(context,5043);
+        targetServer.start();
+    }
+
+    public void testFaultScenario() {
+        try {
+            env.injectMessage(new Axis2SynapseMessage(msgCtx, env));
+            fail("Native End Point Throws an Exception");
+        } catch (Exception e) {
+        }
+
+    }
+
+    protected void tearDown() throws Exception {
+        targetServer.stop();
+    }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/MultipleAddressingModuleEngagementTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/MultipleAddressingModuleEngagementTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/MultipleAddressingModuleEngagementTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/MultipleAddressingModuleEngagementTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,61 @@
+package org.apache.axis2;
+
+import junit.framework.TestCase;
+import org.apache.axis2.context.MessageContext;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.axiom.om.OMElement;
+/*
+* 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.
+*
+*/
+
+public class MultipleAddressingModuleEngagementTest extends TestCase {
+    private MessageContext msgCtx;
+    private SynapseEnvironment env;
+    private OMElement config;
+    private String synapsexml =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<stage name=\"loger1\">\n" +
+                    "    <engage-addressing-in/>" +
+                    "    <classmediator name=\"mediation\" class=\"org.apache.synapse.mediators.LoggerTestSample\"/>\n" +
+                    "</stage>\n" +
+                    "<stage name=\"loger2\">\n" +
+                    "    <engage-addressing-in/>" +
+                    "    <classmediator name=\"mediation\" class=\"org.apache.synapse.mediators.LoggerTestSample\"/>\n" +
+                    "</stage>\n" +
+                    "</synapse>";
+
+    public void setUp() throws Exception {
+        msgCtx = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
+        config = Axis2EnvSetup.getSynapseConfigElement(synapsexml);
+        env = new Axis2SynapseEnvironment(config,
+                Thread.currentThread().getContextClassLoader());
+    }
+
+    public void testMultipleAddressingModuleEngagement() throws Exception {
+        /**
+         * Test case return an excetion if Something goes wrong in AddressingINProcessor
+         */
+        SynapseMessage smc = new Axis2SynapseMessage(msgCtx,env);
+        env.injectMessage(smc);
+        assertNotNull(env.lookupMediator("mediation"));
+    }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/test/Echo.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/test/Echo.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/test/Echo.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/test/Echo.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,79 @@
+package org.apache.axis2.test;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMFactory;
+/*
+* 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.
+*
+*/
+
+public class Echo {
+    public OMElement echo(OMElement element) {
+        System.out.println(
+                "This is the actual service which has been redirected");
+        element.build();
+        element.detach();
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(
+                "urn:text-body", "ns");
+        OMElement responseText = fac.createOMElement("response_text", omNs);
+        responseText.addChild(
+                fac.createOMText(responseText, "Synapse Testing String_Response"));
+        return responseText;
+    }
+    public OMElement fault(OMElement element) throws AxisFault {
+        throw new AxisFault("Native End Point Throws an Exception");
+    }
+    public OMElement echo_addressing(OMElement element) {
+        System.out.println(
+                "This is the actual service which has been redirected with addressing");
+        element.build();
+        element.detach();
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(
+                "urn:text-body", "ns");
+        OMElement responseText = fac.createOMElement("response_text_addressing", omNs);
+        responseText.addChild(
+                fac.createOMText(responseText, "Synapse Testing String_Response_With_Addressing"));
+        return responseText;
+    }
+
+    public void ping(OMElement element) {
+        System.out.println(
+                "This is the actual service which has been pinged");
+    }
+
+
+    public OMElement simple_resources(OMElement element){
+        System.out.println("This is the actual resource provider");
+        element.build();
+        element.detach();
+
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+
+        OMElement ele1 = fac.createOMElement("ele1","","");
+        OMElement ele2 = fac.createOMElement("ele2","","");
+        OMElement ele3 = fac.createOMElement("ele3","","");
+        element.addChild(ele1);
+        element.addChild(ele2);
+        element.addChild(ele3);
+        return element;
+
+    }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/test/TestMediator.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/test/TestMediator.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/test/TestMediator.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/axis2/test/TestMediator.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,27 @@
+package org.apache.axis2.test;
+
+import org.apache.synapse.api.Mediator;
+import org.apache.synapse.SynapseMessage;
+/*
+* 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.
+*
+*/
+
+public class TestMediator implements Mediator {
+    public boolean mediate(SynapseMessage smc) {
+        System.out.println("Executing mediators");
+        return true ;  
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/TestSynapseEnvironment.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/TestSynapseEnvironment.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/TestSynapseEnvironment.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/TestSynapseEnvironment.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,12 @@
+package org.apache.synapse;
+
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+
+public class TestSynapseEnvironment {
+
+	public static SynapseEnvironment createAxis2SynapseEnvironment() {
+		Axis2SynapseEnvironment se = new Axis2SynapseEnvironment(null, null);
+		return se;
+	}
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/TestSynapseMessage.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/TestSynapseMessage.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/TestSynapseMessage.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/TestSynapseMessage.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,69 @@
+package org.apache.synapse;
+
+import org.apache.axis2.AxisFault;
+
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPHeaderBlock;
+
+public class TestSynapseMessage {
+    public static final String URN_SAMPLE_TO_ADDRESS = "urn:sample-toAddress";
+
+
+    public static Axis2SynapseMessage createSampleSOAP11MessageWithoutAddressing(
+            String testingRepository) {
+        // create a lightweight Axis Config with no addressing to demonstrate
+        // "dumb" SOAP
+        MessageContext msgCtx;
+
+        try {
+            ConfigurationContext configCtx = ConfigurationContextFactory
+                    .createConfigurationContextFromFileSystem(testingRepository,null);
+            msgCtx = new MessageContext();
+            msgCtx.setConfigurationContext(configCtx);
+            msgCtx.setServerSide(true);
+
+            SOAPEnvelope env = OMAbstractFactory.getSOAP11Factory()
+                    .getDefaultEnvelope();
+
+            OMElement body = OMAbstractFactory.getOMFactory().createOMElement(
+                    "test-body", "urn:test", "test");
+            OMAbstractFactory.getOMFactory().createOMText(body,
+                    "Do not be alarmed, this is just a test");
+
+            env.getBody().addChild(body);
+            msgCtx.setEnvelope(env);
+        } catch (AxisFault e) {
+            throw new SynapseException(e);
+        }
+        
+        return new Axis2SynapseMessage(msgCtx,null);
+    }
+
+    public static Axis2SynapseMessage createSampleSOAP11MessageWithAddressing(
+            String testingRepository) {
+        Axis2SynapseMessage sm =
+                createSampleSOAP11MessageWithoutAddressing(testingRepository);
+        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+        OMNamespace wsaNS =
+                fac.createOMNamespace(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.WSA_DEFAULT_PREFIX);
+        SOAPHeaderBlock addressingToHeaderBlock =
+                fac.createSOAPHeaderBlock(AddressingConstants.WSA_TO, wsaNS);
+        SOAPHeaderBlock addressingActionHeaderBlock =
+                fac.createSOAPHeaderBlock(AddressingConstants.WSA_ACTION, wsaNS);
+        addressingToHeaderBlock.setText(URN_SAMPLE_TO_ADDRESS);
+        sm.getEnvelope().getHeader().addChild(addressingToHeaderBlock);
+        sm.getEnvelope().getHeader().addChild(addressingActionHeaderBlock);
+
+        return sm;
+
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/configurators/SynapseConfiguratorTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/configurators/SynapseConfiguratorTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/configurators/SynapseConfiguratorTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/configurators/SynapseConfiguratorTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,44 @@
+/*
+* 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 org.apache.synapse.configurators;
+
+import junit.framework.TestCase;
+import org.apache.synapse.SynapseEnvironment;
+
+import org.apache.synapse.Constants;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.synapse.axis2.Axis2SynapseEnvironmentFinder;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.description.Parameter;
+
+
+public class SynapseConfiguratorTest extends TestCase {
+    public void testSynapseEnvironmentFinder() throws Exception {
+        MessageContext mc = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
+        SynapseEnvironment env = Axis2SynapseEnvironmentFinder
+				.getSynapseEnvironment(mc);
+        assertNotNull(env);
+
+        AxisConfiguration ac = mc.getConfigurationContext().getAxisConfiguration();
+
+        Parameter parm =  ac.getParameter(Constants.SYNAPSE_ENVIRONMENT);
+        assertNotNull(parm);
+
+    }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/LoggerTestSample.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/LoggerTestSample.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/LoggerTestSample.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/LoggerTestSample.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,47 @@
+/*
+ * 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 org.apache.synapse.mediators;
+
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.api.Mediator;
+import org.apache.axiom.soap.SOAPEnvelope;
+
+/**
+ *
+ *
+ * <p>A sample Mediator that logs the message
+ * 
+ */
+public class LoggerTestSample implements Mediator {
+
+    public boolean mediate(SynapseMessage mc) {
+        System.out.println("LoggerTestSample.mediate:");
+        if (mc.getTo() != null && mc.getTo().getAddress() != null)
+            System.out.println("LoggerTestSample.mediate to:" + mc.getTo().getAddress());
+        else
+            System.out.println("Empty To");
+        if (mc.getReplyTo() != null && mc.getReplyTo().getAddress() != null)
+            System.out.println("LoggerTestSample.mediate ReplyTo:"
+                    + mc.getReplyTo().getAddress());
+        else
+            System.out.println("Empty ReplyTo");
+        SOAPEnvelope env = mc.getEnvelope();
+        System.out.println(env.toString());
+        System.out.println();
+        return true;
+    }
+
+}
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/MediatorFalseReturnTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/MediatorFalseReturnTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/MediatorFalseReturnTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/MediatorFalseReturnTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,61 @@
+/*
+* 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 org.apache.synapse.mediators;
+
+
+import org.apache.axis2.context.MessageContext;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.axiom.om.OMElement;
+import junit.framework.TestCase;
+
+
+public class MediatorFalseReturnTest extends TestCase {
+    private MessageContext msgCtx;
+    private SynapseEnvironment env;
+    private OMElement config;
+    private String synapsexml =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<stage name=\"mediator_false\">\n" +
+                    "    <classmediator name=\"mediator_false\" class=\"org.apache.synapse.mediators.SampleFalseReturnMediator1\"/>\n" +
+                    "    <log/>" +
+                    "</stage>\n" +
+                    "<stage name=\"do_loggin\">\n" +
+                    "    <classmediator name=\"mediator_false\" class=\"org.apache.synapse.mediators.SampleMediator2\"/>\n" +
+                    "</stage>\n" +
+                    "</synapse>";
+
+    public void setUp() throws Exception {
+        msgCtx = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
+        config = Axis2EnvSetup.getSynapseConfigElement(synapsexml);
+        env = new Axis2SynapseEnvironment(config,
+                Thread.currentThread().getContextClassLoader());
+    }
+
+    public void testFalseReturnFromMediator() throws Exception {
+
+        SynapseMessage smc = new Axis2SynapseMessage(msgCtx,env);
+        env.injectMessage(smc);
+        assertNotNull(env.lookupMediator("mediator_false"));
+        assertNull(smc.getProperty("test_string"));
+    }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleFalseReturnMediator1.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleFalseReturnMediator1.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleFalseReturnMediator1.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleFalseReturnMediator1.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,28 @@
+package org.apache.synapse.mediators;
+
+import org.apache.synapse.api.Mediator;
+import org.apache.synapse.SynapseMessage;
+/*
+* 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.
+*
+*/
+
+public class SampleFalseReturnMediator1 implements Mediator {
+    public boolean mediate(SynapseMessage smc) {
+        System.out
+                .println("you are in the sample \"false\" returning mediator ");
+        return false;
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleMediator2.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleMediator2.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleMediator2.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleMediator2.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,27 @@
+package org.apache.synapse.mediators;
+
+import org.apache.synapse.api.Mediator;
+import org.apache.synapse.SynapseMessage;
+/*
+* 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.
+*
+*/
+
+public class SampleMediator2 implements Mediator {
+    public boolean mediate(SynapseMessage smc) {
+        smc.setProperty("test_string",new String("Done"));
+        return false;
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleRouter.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleRouter.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleRouter.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SampleRouter.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,30 @@
+package org.apache.synapse.mediators;
+
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.api.Mediator;
+/*
+* 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.
+*
+*/
+
+public class SampleRouter implements Mediator {
+    public boolean mediate(SynapseMessage smc) {
+        smc.setWSAAction("urn:synapse/sendon");
+        smc.setTo(new EndpointReference(
+                "http://localhost:8090/axis2/services/npe"));
+        return true;
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SendBack.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SendBack.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SendBack.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SendBack.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,34 @@
+package org.apache.synapse.mediators;
+
+import org.apache.synapse.api.Mediator;
+import org.apache.synapse.SynapseMessage;
+import org.apache.axis2.addressing.EndpointReference;
+/*
+* 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.
+*
+*/
+
+public class SendBack implements Mediator {
+    public boolean mediate(SynapseMessage smc) {
+        /**
+         * Since addressing is not engaged before running this test case 
+         * To give the right behavior for this test-case
+         * setTo is set for anonymous url.
+         */
+        smc.setTo(new EndpointReference("http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"));
+        smc.setResponse(true);
+        return true;
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SimpleGETResourceAquiringMediator.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SimpleGETResourceAquiringMediator.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SimpleGETResourceAquiringMediator.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/SimpleGETResourceAquiringMediator.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,42 @@
+package org.apache.synapse.mediators;
+
+import org.apache.synapse.api.Mediator;
+import org.apache.synapse.SynapseException;
+import org.apache.synapse.SynapseMessage;
+//import org.apache.axiom.om.OMElement;
+//import junit.framework.TestCase;
+/*
+ * 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.
+ */
+
+public class SimpleGETResourceAquiringMediator
+        implements Mediator{
+    
+
+    
+
+    public void setClassLoader(ClassLoader cl) {
+        throw new SynapseException(
+                "no class loader available for <classmediator/>");
+    }
+
+    public boolean mediate(SynapseMessage smc) {
+   //     OMElement resourcesElement = smc.getSynapseEnvironment().getResourceHelper()
+     //           .get("http://127.0.0.1:8090/axis2/services/npe/simple_resources");
+        // test for resources being not null
+   //     TestCase.assertNotNull(resourcesElement);
+        return true;
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/builtin/axis2/AddressingInProcessorTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/builtin/axis2/AddressingInProcessorTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/builtin/axis2/AddressingInProcessorTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/mediators/builtin/axis2/AddressingInProcessorTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,29 @@
+package org.apache.synapse.mediators.builtin.axis2;
+
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.TestSynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.TestSynapseMessage;
+
+
+import junit.framework.TestCase;
+
+public class AddressingInProcessorTest extends TestCase {
+
+    public void testAddressingInProcessor() throws Exception {
+
+        SynapseEnvironment se = TestSynapseEnvironment.createAxis2SynapseEnvironment();
+        SynapseMessage smNoAdd = TestSynapseMessage.createSampleSOAP11MessageWithoutAddressing("target/synapse-repository");
+
+        AddressingInMediator aip = new AddressingInMediator();
+
+        aip.mediate(smNoAdd);
+        assertTrue("to should be null if there is no addressing header", smNoAdd.getTo() == null);
+
+        SynapseMessage smAdd = TestSynapseMessage.createSampleSOAP11MessageWithAddressing("target/synapse-repository");
+        aip.mediate(smAdd);
+        assertTrue("to should be the incoming addressing header",
+                smAdd.getTo().getAddress().equals(TestSynapseMessage.URN_SAMPLE_TO_ADDRESS));
+
+    }
+}
\ No newline at end of file

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/conditions/ExactlyOneProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/conditions/ExactlyOneProcessorWithRuleTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/conditions/ExactlyOneProcessorWithRuleTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/conditions/ExactlyOneProcessorWithRuleTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,69 @@
+package org.apache.synapse.spi.conditions;
+
+import junit.framework.TestCase;
+import org.apache.axis2.context.MessageContext;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.Constants;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.axiom.om.OMElement;
+
+/**
+ * TestCase for SwitchProcessor
+ */
+public class ExactlyOneProcessorWithRuleTest extends TestCase {
+    private MessageContext mc;
+    private OMElement config;
+    private SynapseEnvironment env;
+    private String synapsexml1 =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<exactlyone>"+
+                    "    <regex message-address=\"to\" pattern=\"http://xmethods..\\*\"/>\n" +
+                    "    <xpath expr=\"//ns:text\" xmlns:ns=\"urn:text-body\">\n" +
+                              "<engage-addressing-in/>"+
+                    "    </xpath>"+
+                    "</exactlyone>"+
+                    "</synapse>";
+
+    private String synapsexml2 =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<exactlyone>"+
+                    "    <xpath expr=\"//ns:text_empty\" xmlns:ns=\"urn:text-body\"/>\n" +
+                    "    <xpath expr=\"//ns:text_empty2\" xmlns:ns=\"urn:text-body\">\n" +
+                              "<engage-addressing-in/>"+
+                    "    </xpath>"+
+                    "    <default> "+
+                    "        <engage-addressing-in/>"+
+                    "    </default> "+
+                    "</exactlyone>"+
+                    "</synapse>";
+
+
+
+    public void testXathSwithProcessor() throws Exception {
+            mc = Axis2EnvSetup
+                    .axis2Deployment("target/synapse-repository");
+            config = Axis2EnvSetup.getSynapseConfigElement(synapsexml1);
+            env = new Axis2SynapseEnvironment(config,
+                    Thread.currentThread().getContextClassLoader());
+            SynapseMessage smc = new Axis2SynapseMessage(mc,env);
+            env.injectMessage(smc);
+            assertTrue(((Boolean) smc.getProperty(
+                    Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
+        }
+
+        public void testDefaultProcessor() throws Exception {
+            mc = Axis2EnvSetup
+                    .axis2Deployment("target/synapse-repository");
+            config = Axis2EnvSetup.getSynapseConfigElement(synapsexml2);
+            env = new Axis2SynapseEnvironment(config,
+                    Thread.currentThread().getContextClassLoader());
+            SynapseMessage smc = new Axis2SynapseMessage(mc,env);
+            env.injectMessage(smc);
+            assertTrue(((Boolean) smc.getProperty(
+                    Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
+        }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/AddressingProcessorWithRuleTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,66 @@
+package org.apache.synapse.spi.injection;
+
+import junit.framework.TestCase;
+import org.apache.axis2.context.MessageContext;
+import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+
+import org.apache.synapse.mediators.builtin.axis2.AddressingInMediator;
+import org.apache.synapse.xml.AddressingInMediatorFactory;
+import org.apache.synapse.api.Mediator;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.axiom.om.OMElement;
+/*
+* 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.
+*
+*/
+
+public class AddressingProcessorWithRuleTest extends TestCase {
+    private MessageContext msgCtx;
+    private SynapseEnvironment env;
+    private OMElement config;
+    private String synapsexml =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<stage name=\"engage-addressing\">\n" +
+                    "    <engage-addressing-in/>\n" +
+                    "</stage>\n" +
+                    "</synapse>";
+
+    public void setUp() throws Exception {
+        msgCtx = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
+        config =Axis2EnvSetup.getSynapseConfigElement(synapsexml);
+        env = new Axis2SynapseEnvironment(config,
+                Thread.currentThread().getContextClassLoader());
+    }
+
+    public void testAddressingProcessor() throws Exception {
+
+        SynapseMessage smc = new Axis2SynapseMessage(msgCtx,env);
+        env.injectMessage(smc);
+        assertTrue(((Boolean) smc.getProperty(
+                Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
+    }
+
+    public void testAddressingConfigurator() throws Exception {
+        AddressingInMediatorFactory fac = new AddressingInMediatorFactory();
+
+        Mediator pro = fac.createMediator(env,config.getFirstElement().getFirstElement());
+        assertTrue(pro instanceof AddressingInMediator);
+        
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/BuiltInProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/BuiltInProcessorWithRuleTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/BuiltInProcessorWithRuleTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/BuiltInProcessorWithRuleTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,42 @@
+/*
+* 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 org.apache.synapse.spi.injection;
+
+import junit.framework.TestCase;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+
+
+public class BuiltInProcessorWithRuleTest extends TestCase {
+
+    private String synapsexml =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<stage name=\"logall\">\n" +
+                    "    <log/>\n" +
+                    "</stage>\n"+
+             "</synapse>";
+    private SynapseEnvironment env;
+
+    public void testSynapseEnvironment() throws Exception {
+        env = new Axis2SynapseEnvironment(
+                Axis2EnvSetup.getSynapseConfigElement(synapsexml),
+                Thread.currentThread().getContextClassLoader());
+        assertNotNull(env.getMasterMediator());
+     }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/ClassMediatorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/ClassMediatorWithRuleTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/ClassMediatorWithRuleTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/ClassMediatorWithRuleTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,61 @@
+package org.apache.synapse.spi.injection;
+
+import junit.framework.TestCase;
+import org.apache.axis2.context.MessageContext;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.mediators.types.ClassMediator;
+import org.apache.synapse.xml.ClassMediatorFactory;
+import org.apache.synapse.api.Mediator;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.axiom.om.OMElement;
+/*
+* 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.
+*
+*/
+
+public class ClassMediatorWithRuleTest extends TestCase {
+    private MessageContext msgCtx;
+    private SynapseEnvironment env;
+    private OMElement config;
+    private String synapsexml =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<stage name=\"loger\">\n" +
+                    "    <classmediator name=\"mediation\" class=\"org.apache.synapse.mediators.LoggerTestSample\"/>\n" +
+                    "</stage>\n" +
+                    "</synapse>";
+
+    public void setUp() throws Exception {
+        msgCtx = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
+        config = Axis2EnvSetup.getSynapseConfigElement(synapsexml);
+        env = new Axis2SynapseEnvironment(config,
+                Thread.currentThread().getContextClassLoader());
+    }
+
+    public void testClassMediatorProcessor() throws Exception {
+
+        SynapseMessage smc = new Axis2SynapseMessage(msgCtx,env);
+        env.injectMessage(smc);
+        assertNotNull(env.lookupMediator("mediation"));
+    }
+    public void testClassMediatorConfigurator() throws Exception {
+        ClassMediatorFactory conf = new ClassMediatorFactory();
+        Mediator pro = conf.createMediator(env, config.getFirstElement().getFirstElement());
+        assertTrue(pro instanceof ClassMediator);
+        //assertEquals("mediation",pro.getName());
+    }
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/DefineProcessorwithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/DefineProcessorwithRuleTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/DefineProcessorwithRuleTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/DefineProcessorwithRuleTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,69 @@
+/*
+ * 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 org.apache.synapse.spi.injection;
+
+import junit.framework.TestCase;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.api.ListMediator;
+import org.apache.synapse.axis2.Axis2SynapseEnvironment;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axiom.om.OMElement;
+
+import java.util.List;
+
+
+public class DefineProcessorwithRuleTest extends TestCase {
+    private SynapseEnvironment env;
+    private OMElement config;
+    private MessageContext mc;
+    private String synapsexml =
+            "<synapse xmlns=\"http://ws.apache.org/ns/synapse\">\n" +
+                    "<refdefine ref=\"test_define\"/>\n" +
+                    "<refdefine ref=\"test_define_addressing\"/>\n" +
+                    "<define name=\"test_define\">\n" +
+                    "    <log/>" +
+                    "    <regex message-address=\"to\" pattern=\"http://xmethods..\\*\"/>\n" +
+                    "</define>\n" +
+
+                    "<define name=\"test_define_addressing\">\n" +
+                    "    <engage-addressing-in/>" +
+                    "</define>\n" +
+            "</synapse>";
+    public void setUp() throws Exception{
+        mc = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
+        mc.setTo(new EndpointReference("http://xmethods.org"));
+        config = Axis2EnvSetup.getSynapseConfigElement(synapsexml);
+        env = new Axis2SynapseEnvironment(config,
+                Thread.currentThread().getContextClassLoader());
+    }
+
+    public void testRegexProcessor() throws Exception {
+        SynapseMessage smc = new Axis2SynapseMessage(mc,env);
+        env.injectMessage(smc);
+        //assertEquals("test_define", env.lookupMediator("test_define").getName());
+        //assertEquals("test_define_addressing", env.lookupMediator("test_define_addressing").getName());
+        List embeddedProcessors = ((ListMediator)env.lookupMediator("test_define")).getList();
+        assertEquals(2,embeddedProcessors.size());
+        ListMediator masterMediator = (ListMediator)env.getMasterMediator();
+        List masterMediatorList = masterMediator.getList();
+        assertEquals(4,masterMediatorList.size());
+    }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/FaultProcessorWithRuleTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,64 @@
+/*
+* 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 org.apache.synapse.spi.injection;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+
+import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.synapse.util.Axis2EnvSetup;
+
+
+public class FaultProcessorWithRuleTest extends TestCase {
+    /**
+     * this is an incomple test
+     * what we should expect an error code
+     * but what we receive is 200ok.
+     */
+    private SimpleHTTPServer synapseServer;
+    private EndpointReference targetEpr = new EndpointReference(
+            "http://127.0.0.1:5043/axis2/services/anonymous");
+
+    public void setUp() throws Exception {
+        ConfigurationContext context = ConfigurationContextFactory
+                .createConfigurationContextFromFileSystem(
+                        "target/synapse-repository-fault", null);
+        synapseServer =
+                new SimpleHTTPServer(context, 5043);
+        synapseServer.start();
+    }
+
+    protected void tearDown() throws Exception {
+        synapseServer.stop();
+    }
+
+    public void testFaultPrcessor() throws Exception {
+        ServiceClient serviceClient = new ServiceClient(
+                Axis2EnvSetup.createConfigurationContextFromFileSystem(
+                        "target/synapse-repository-fault"), null);
+        Options co = new Options();
+        co.setTo(targetEpr);
+        serviceClient.setOptions(co);
+        serviceClient.fireAndForget(Axis2EnvSetup.payload());
+    }
+
+}

Added: incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/HTTPToTCPMessageMediationTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/HTTPToTCPMessageMediationTest.java?rev=397884&view=auto
==============================================================================
--- incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/HTTPToTCPMessageMediationTest.java (added)
+++ incubator/synapse/trunk/scratch/synapse2/modules/core/test/org/apache/synapse/spi/injection/HTTPToTCPMessageMediationTest.java Fri Apr 28 05:49:17 2006
@@ -0,0 +1,72 @@
+package org.apache.synapse.spi.injection;
+
+import junit.framework.TestCase;
+import org.apache.axis2.transport.http.SimpleHTTPServer;
+import org.apache.axis2.transport.tcp.TCPServer;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.synapse.util.Axis2EnvSetup;
+import org.apache.axiom.om.OMElement;
+/*
+* 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.
+*
+*/
+
+public class HTTPToTCPMessageMediationTest extends TestCase {
+    private SimpleHTTPServer synapseServer;
+    private TCPServer axis2TcpServer;
+    private EndpointReference targetEpr = new EndpointReference(
+            "http://127.0.0.1:5043/axis2/services/anonymous");
+
+    public void setUp() throws Exception {
+        ConfigurationContext synapseServerContext = ConfigurationContextFactory
+                .createConfigurationContextFromFileSystem(
+                        "target/synapse-repository-httptcp", "target/synapse-repository-httptcp/conf/axis2.xml");
+
+        synapseServer =
+                new SimpleHTTPServer(synapseServerContext,5043);
+        /**
+         * axis2TcpServer is the one who holds the actual service
+         */
+        ConfigurationContext serverContext = ConfigurationContextFactory
+                .createConfigurationContextFromFileSystem(
+                        "target/synapse-repository-sendonAxis2Tcp", "target/synapse-repository-sendonAxis2Tcp/conf/axis2.xml");
+        axis2TcpServer =
+                new TCPServer(8090, serverContext);
+        synapseServer.start();
+        axis2TcpServer.start();
+    }
+
+    protected void tearDown() throws Exception {
+        synapseServer.stop();
+        axis2TcpServer.stop();
+    }
+
+    public void testSendProcessor() throws Exception {
+        ServiceClient serviceClient = new ServiceClient(
+                Axis2EnvSetup.createConfigurationContextFromFileSystem(
+                        "target/synapse-repository-httptcp"), null);
+        Options options = new Options();
+        options.setTo(targetEpr);
+        serviceClient.setOptions(options);
+        OMElement response = serviceClient.sendReceive(Axis2EnvSetup.payload());
+        assertEquals("Synapse Testing String_Response", response.getText());
+
+    }
+
+}



---------------------------------------------------------------------
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