synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r358509 - in /incubator/synapse/trunk/java: ./ doc/org/apache/synapse/xml/ doc/org/apache/synapse/xml/class-use/ src/org/apache/synapse/ src/org/apache/synapse/axis2/ src/org/apache/synapse/processors/ src/org/apache/synapse/processors/buil...
Date Thu, 22 Dec 2005 06:02:48 GMT
Author: saminda
Date: Wed Dec 21 21:59:40 2005
New Revision: 358509

URL: http://svn.apache.org/viewcvs?rev=358509&view=rev
Log:
1.Test cases have been updated to cope with the current Axis2 status.

2. AxisFlexibleMEPClient and Axis2Sender logic modified.  Part of the code need to be modified later due dependencies 
to Axis2 and its bug fixes. Temporary hacks has to be introduced till Axis2 fix the bugs.
 
3.Added SecurtityProcessor and SecurityProcessorConfigurator as the first step towards giving QOS for Synapse. This 
work is still under experimental stage. Till the stable code, security resources are put to the 
synapse-test-resources.
 
4.Temporary hack introduce to SynapseMessageReceiver to handle 200 OK and 202 OK. The logic behind this need to be 
updated.
 
5.As there has been so many improvements to Axis2-0.94 latest SNAPSHOT, the current state of the Synapse is not 
stable and subject to change when some part of Axis2 changes. Sorry.
 
6.Build is successful with these commits. 

Added:
    incubator/synapse/trunk/java/src/org/apache/synapse/processors/builtin/axis2/SecurityProcessor.java
    incubator/synapse/trunk/java/src/org/apache/synapse/xml/SecurityProcessorConfigurator.java
    incubator/synapse/trunk/java/synapse-test-resources/axis2/modules/security.mar   (with props)
    incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/
    incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/META-INF/
    incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/META-INF/services.xml
    incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/interop.properties
    incubator/synapse/trunk/java/test/org/apache/axis2/security/
    incubator/synapse/trunk/java/test/org/apache/axis2/security/SecurityTester.java
    incubator/synapse/trunk/java/test/org/apache/axis2/security/security-axis2.xml
    incubator/synapse/trunk/java/test/org/apache/axis2/security/security-synapse.xml
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/ServiceMediatorProcessorWithRuleTest.java
      - copied, changed from r357682, incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/ServiceMediatorProcessorTest.java
      - copied, changed from r357682, incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java
Removed:
    incubator/synapse/trunk/java/src/org/apache/synapse/processors/Axis2MediatorProcessor.java
    incubator/synapse/trunk/java/src/org/apache/synapse/xml/Axis2MediatorProcessorConfigurator.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java
Modified:
    incubator/synapse/trunk/java/doc/org/apache/synapse/xml/ClassMediatorProcessorConfigurator.html
    incubator/synapse/trunk/java/doc/org/apache/synapse/xml/class-use/ClassMediatorProcessorConfigurator.html
    incubator/synapse/trunk/java/maven.xml
    incubator/synapse/trunk/java/project.properties
    incubator/synapse/trunk/java/project.xml
    incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java
    incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2FlexibleMEPClient.java
    incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2Sender.java
    incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2SynapseEnvironmentFinder.java
    incubator/synapse/trunk/java/src/org/apache/synapse/axis2/ServiceMediatorMessageReceiver.java
    incubator/synapse/trunk/java/src/org/apache/synapse/axis2/SynapseMessageReceiver.java
    incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java
    incubator/synapse/trunk/java/test/org/apache/axis2/test/Echo.java
    incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java
    incubator/synapse/trunk/java/test/rules/synapse-sendon.xml

Modified: incubator/synapse/trunk/java/doc/org/apache/synapse/xml/ClassMediatorProcessorConfigurator.html
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/doc/org/apache/synapse/xml/ClassMediatorProcessorConfigurator.html?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/doc/org/apache/synapse/xml/ClassMediatorProcessorConfigurator.html (original)
+++ incubator/synapse/trunk/java/doc/org/apache/synapse/xml/ClassMediatorProcessorConfigurator.html Wed Dec 21 21:59:40 2005
@@ -22,14 +22,14 @@
 
 <BODY BGCOLOR="white" onload="windowTitle();">
 
-
+
 <!-- ========= START OF TOP NAVBAR ======= -->
-<A NAME="navbar_top"><!-- --></A>
-<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 <TR>
 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_top_firstrow"><!-- --></A>
+<A NAME="navbar_top_firstrow"><!-- --></A>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
@@ -64,7 +64,7 @@
 </SCRIPT>
 <NOSCRIPT>
   <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
-</NOSCRIPT>
+</NOSCRIPT>
 
 </FONT></TD>
 </TR>
@@ -75,7 +75,7 @@
 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 </TR>
 </TABLE>
-<A NAME="skip-navbar_top"></A>
+<A NAME="skip-navbar_top"></A>
 <!-- ========= END OF TOP NAVBAR ========= -->
 
 <HR>
@@ -109,7 +109,7 @@
 
 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
 
-<A NAME="constructor_summary"><!-- --></A>
+<A NAME="constructor_summary"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TD COLSPAN=2><FONT SIZE="+2">
@@ -125,7 +125,7 @@
 &nbsp;
 <!-- ========== METHOD SUMMARY =========== -->
 
-<A NAME="method_summary"><!-- --></A>
+<A NAME="method_summary"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TD COLSPAN=2><FONT SIZE="+2">
@@ -134,7 +134,7 @@
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;<A HREF="../../../../org/apache/synapse/Processor.html" title="interface in org.apache.synapse">Processor</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/apache/synapse/xml/ClassMediatorProcessorConfigurator.html#createProcessor(org.apache.synapse.SynapseEnvironment, org.apache.axis2.om.OMElement)">createProcessor</A></B>(<A HREF="../../../../org/apache/synapse/SynapseEnvironment.html" title="interface in org.apache.synapse">SynapseEnvironment</A>&nbsp;se,
+<TD><CODE><B><A HREF="../../../../org/apache/synapse/xml/ClassMediatorProcessorConfigurator.html#createProcessor(org.apache.synapse.SynapseEnvironment, org.apache.axis2.om.OMElement)">createProcessor</A></B>(<A HREF="../../../../org/apache/synapse/SynapseEnvironment.html" title="interface in org.apache.synapse">SynapseEnvironment</A>&nbsp;se,
                 org.apache.axis2.om.OMElement&nbsp;el)</CODE>
 
 <BR>
@@ -149,7 +149,7 @@
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
-&nbsp;<A NAME="methods_inherited_from_class_org.apache.synapse.xml.AbstractProcessorConfigurator"><!-- --></A>
+&nbsp;<A NAME="methods_inherited_from_class_org.apache.synapse.xml.AbstractProcessorConfigurator"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
 <TD><B>Methods inherited from class org.apache.synapse.xml.<A HREF="../../../../org/apache/synapse/xml/AbstractProcessorConfigurator.html" title="class in org.apache.synapse.xml">AbstractProcessorConfigurator</A></B></TD>
@@ -158,7 +158,7 @@
 <TD><CODE><A HREF="../../../../org/apache/synapse/xml/AbstractProcessorConfigurator.html#setNameOnProcessor(org.apache.synapse.SynapseEnvironment, org.apache.axis2.om.OMElement, org.apache.synapse.Processor)">setNameOnProcessor</A></CODE></TD>
 </TR>
 </TABLE>
-&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
 <TD><B>Methods inherited from class java.lang.Object</B></TD>
@@ -175,7 +175,7 @@
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
 
-<A NAME="constructor_detail"><!-- --></A>
+<A NAME="constructor_detail"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TD COLSPAN=1><FONT SIZE="+2">
@@ -192,7 +192,7 @@
 
 <!-- ============ METHOD DETAIL ========== -->
 
-<A NAME="method_detail"><!-- --></A>
+<A NAME="method_detail"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TD COLSPAN=1><FONT SIZE="+2">
@@ -203,7 +203,7 @@
 <A NAME="createProcessor(org.apache.synapse.SynapseEnvironment, org.apache.axis2.om.OMElement)"><!-- --></A><H3>
 createProcessor</H3>
 <PRE>
-public <A HREF="../../../../org/apache/synapse/Processor.html" title="interface in org.apache.synapse">Processor</A> <B>createProcessor</B>(<A HREF="../../../../org/apache/synapse/SynapseEnvironment.html" title="interface in org.apache.synapse">SynapseEnvironment</A>&nbsp;se,
+public <A HREF="../../../../org/apache/synapse/Processor.html" title="interface in org.apache.synapse">Processor</A> <B>createProcessor</B>(<A HREF="../../../../org/apache/synapse/SynapseEnvironment.html" title="interface in org.apache.synapse">SynapseEnvironment</A>&nbsp;se,
                                  org.apache.axis2.om.OMElement&nbsp;el)</PRE>
 <DL>
 <DD><DL>
@@ -224,14 +224,14 @@
 <!-- ========= END OF CLASS DATA ========= -->
 <HR>
 
-
+
 <!-- ======= START OF BOTTOM NAVBAR ====== -->
-<A NAME="navbar_bottom"><!-- --></A>
-<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 <TR>
 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
@@ -266,7 +266,7 @@
 </SCRIPT>
 <NOSCRIPT>
   <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
-</NOSCRIPT>
+</NOSCRIPT>
 
 </FONT></TD>
 </TR>
@@ -277,7 +277,7 @@
 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 </TR>
 </TABLE>
-<A NAME="skip-navbar_bottom"></A>
+<A NAME="skip-navbar_bottom"></A>
 <!-- ======== END OF BOTTOM NAVBAR ======= -->
 
 <HR>

Modified: incubator/synapse/trunk/java/doc/org/apache/synapse/xml/class-use/ClassMediatorProcessorConfigurator.html
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/doc/org/apache/synapse/xml/class-use/ClassMediatorProcessorConfigurator.html?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/doc/org/apache/synapse/xml/class-use/ClassMediatorProcessorConfigurator.html (original)
+++ incubator/synapse/trunk/java/doc/org/apache/synapse/xml/class-use/ClassMediatorProcessorConfigurator.html Wed Dec 21 21:59:40 2005
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.4.2_09) on Fri Nov 25 18:26:17 GMT 2005 -->
 <TITLE>
-Uses of Class org.apache.synapse.xml.ClassMediatorProcessorConfigurator
+Uses of Class org.apache.synapse.xml.MediatorProcessorConfigurator
 </TITLE>
 
 
@@ -21,14 +21,14 @@
 
 <BODY BGCOLOR="white" onload="windowTitle();">
 
-
+
 <!-- ========= START OF TOP NAVBAR ======= -->
-<A NAME="navbar_top"><!-- --></A>
-<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 <TR>
 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_top_firstrow"><!-- --></A>
+<A NAME="navbar_top_firstrow"><!-- --></A>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
@@ -63,31 +63,31 @@
 </SCRIPT>
 <NOSCRIPT>
   <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
-</NOSCRIPT>
+</NOSCRIPT>
 
 </FONT></TD>
 </TR>
 </TABLE>
-<A NAME="skip-navbar_top"></A>
+<A NAME="skip-navbar_top"></A>
 <!-- ========= END OF TOP NAVBAR ========= -->
 
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.apache.synapse.xml.ClassMediatorProcessorConfigurator</B></H2>
+<B>Uses of Class<br>org.apache.synapse.xml.MediatorProcessorConfigurator</B></H2>
 </CENTER>
-No usage of org.apache.synapse.xml.ClassMediatorProcessorConfigurator
+No usage of org.apache.synapse.xml.MediatorProcessorConfigurator
 <P>
 <HR>
 
-
+
 <!-- ======= START OF BOTTOM NAVBAR ====== -->
-<A NAME="navbar_bottom"><!-- --></A>
-<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 <TR>
 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
@@ -122,12 +122,12 @@
 </SCRIPT>
 <NOSCRIPT>
   <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
-</NOSCRIPT>
+</NOSCRIPT>
 
 </FONT></TD>
 </TR>
 </TABLE>
-<A NAME="skip-navbar_bottom"></A>
+<A NAME="skip-navbar_bottom"></A>
 <!-- ======== END OF BOTTOM NAVBAR ======= -->
 
 <HR>

Modified: incubator/synapse/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/maven.xml?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/maven.xml (original)
+++ incubator/synapse/trunk/java/maven.xml Wed Dec 21 21:59:40 2005
@@ -83,6 +83,21 @@
                 <include name="**"/>
             </jar>
 
+            <echo message="----------------Creating synapse_security aar Server-Side----------------"/>
+            <mkdir dir="target/services/synapse_security/META-INF"/>
+            <mkdir dir="target/services/synapse_security/lib"/>
+
+            <jar jarfile="target/services/synapse_security/lib/interop_properties.jar"
+                 basedir="synapse-test-resources/axis2/services/synapse_security">
+                <include name="interop.properties"/>
+            </jar>
+            <copy file="synapse-test-resources/axis2/services/synapse_security/META-INF/services.xml"
+                  tofile="target/services/synapse_security/META-INF/services.xml"/>
+            <jar jarfile="target/synapse_security.aar"
+                 basedir="target/services/synapse_security">
+                <include name="**"/>
+            </jar>
+
 
             <echo message="-----------Creating Testing Repository - SendOn ----------"/>
             <mkdir dir="target/synapse-repository-sendon"/>
@@ -126,9 +141,13 @@
               tofile="target/synapse-repository/services/synapse.aar"/>
         <copy file="target/emptymediator.aar"
               tofile="target/synapse-repository/services/emptymediator.aar"/>
+        <copy file="target/synapse_security.aar"
+              tofile="target/synapse-repository/services/synapse_security.aar"/>
         <mkdir dir="target/synapse-repository/modules"/>
         <copy file="synapse-test-resources/axis2/modules/addressing.mar"
               tofile="target/synapse-repository/modules/addressing.mar"/>
+        <copy file="synapse-test-resources/axis2/modules/security.mar"
+              tofile="target/synapse-repository/modules/security.mar"/>
         <copy file="synapse-test-resources/axis2/axis2.xml"
               tofile="target/synapse-repository/axis2.xml"/>
         <copy file="repo/synapse.xml"
@@ -162,6 +181,29 @@
         <copy file="test/rules/synapse-send.xml"
               tofile="target/synapse-repository-send/synapse.xml"/>
 
+
+        <echo message="-----------Creating Testing Repository -Server-Side ----------"/>
+            <mkdir dir="target/synapse-repository-security-server"/>
+            <ant:copy todir="target/synapse-repository-security-server">
+                <ant:fileset dir="target/synapse-repository">
+                    <ant:include name="**"/>
+                    <ant:exclude name="**/synapse.xml"/>
+                </ant:fileset>
+            </ant:copy>
+            <copy file="test/org/apache/axis2/security/security-synapse.xml"
+              tofile="target/synapse-repository-security-server/synapse.xml"/>
+
+            <echo message="-----------Creating Testing Repository -Client-Side ----------"/>
+            <mkdir dir="target/synapse-repository-security-client"/>
+            <ant:copy todir="target/synapse-repository-security-client">
+                <ant:fileset dir="target/synapse-repository">
+                    <ant:include name="**"/>
+                    <ant:exclude name="**/*.xml"/>
+                </ant:fileset>
+            </ant:copy>
+            <copy file="test/org/apache/axis2/security/security-axis2.xml"
+              tofile="target/synapse-repository-security-client/axis2.xml"/>
+
         <echo message="----------------Creating DeprecationMediator aar----------------"/>
         <mkdir dir="target/sample-deprecation/META-INF"/>
         <mkdir dir="target/sample-deprecation/sampleMediators/deprecation"/>
@@ -194,8 +236,7 @@
         <ant:delete file="target/synapse.aar"/>
         <ant:delete dir="target/sample-deprecation"/>
         <ant:delete file="target/DeprecationMediator.aar"/>
-
-
+        <ant:delete file="target/synapse_security.aar"/>
 
 
     </postGoal>
@@ -263,8 +304,8 @@
                   tofile="${bin.dist.dir}/bin/synapse.sh"/>
         <ant:copy file="bin/synapse.bat"
                   tofile="${bin.dist.dir}/bin/synapse.bat"/>
-        <ant:copy file="README.TXT"
-                  tofile="${bin.dist.dir}/README.TXT"/>
+        <ant:copy file="README.txt"
+                  tofile="${bin.dist.dir}/README.txt"/>
 
         <ant:copy todir="${bin.dist.dir}/synapse_repository">
             <ant:fileset dir="target/synapse-repository/">

Modified: incubator/synapse/trunk/java/project.properties
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/project.properties?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/project.properties (original)
+++ incubator/synapse/trunk/java/project.properties Wed Dec 21 21:59:40 2005
@@ -62,4 +62,6 @@
 XmlSchema.version=SNAPSHOT
 xmlsec.version=1.2.1
 xmlunit.version=1.0
+annogen.version=0.1.0
+
 

Modified: incubator/synapse/trunk/java/project.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/project.xml?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/project.xml (original)
+++ incubator/synapse/trunk/java/project.xml Wed Dec 21 21:59:40 2005
@@ -241,6 +241,19 @@
                 <module>true</module>
             </properties>
         </dependency>
+        <dependency>
+            <groupId>annogen</groupId>
+            <artifactId>annogen</artifactId>
+            <version>${annogen.version}</version>
+            <properties>
+                <module>true</module>
+            </properties>
+        </dependency>
+        <dependency>
+            <groupId>ws-commons</groupId>
+            <artifactId>XmlSchema</artifactId>
+            <version>${XmlSchema.version}</version>
+        </dependency>
     </dependencies>
 
     <!-- ================================= -->

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/Constants.java Wed Dec 21 21:59:40 2005
@@ -43,8 +43,10 @@
     String SYNAPSECONFIGURATION = "SynapseConfiguration";
 
 	String SYNAPSE_ENVIRONMENT = "synapse.environment";
-    // for the mediator return value
-    String MEDIATOR_STATUS="mediator.status";
 
 	String ADD_ADDRESSING = "synapse.send.useaddressing";
+
+    // for security supporting
+
+    String SECURITY_QOS = "synapse_security";
 }

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2FlexibleMEPClient.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2FlexibleMEPClient.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2FlexibleMEPClient.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2FlexibleMEPClient.java Wed Dec 21 21:59:40 2005
@@ -44,33 +44,32 @@
 
 /**
  * This is a simple client that handles both in only and in out
- *
  */
 public class Axis2FlexibleMEPClient {
 
     // wholesale cut and paste from axis2.clientapi.*
     public static MessageContext send(MessageContext smc) {
         try {
-        	
-			// create a lightweight Axis Config with no addressing 
-			AxisConfiguration ac = new AxisConfiguration();
-			ConfigurationContext cc = new ConfigurationContext(ac);
-			AxisServiceGroup asg = new AxisServiceGroup(ac);
-			AxisService as = new AxisService("AnonymousService");
-			asg.addService(as);
-			ServiceGroupContext sgc = new ServiceGroupContext(cc, asg);
-			ServiceContext sc = sgc.getServiceContext("AnonymousService");
-			AxisOperation axisOperationTemplate = new OutInAxisOperation(
-					new QName("TemplateOperation"));
-			as.addOperation(axisOperationTemplate);
-			cc.getAxisConfiguration().addService(as);
-			TransportOutDescription tod = new TransportOutDescription(
-					new QName(org.apache.axis2.Constants.TRANSPORT_HTTP));
-			tod.setSender(new CommonsHTTPTransportSender());
-			
-			ac.addTransportOut(tod);
 
-			MessageContext msgCtx = new MessageContext(sc
+            // create a lightweight Axis Config with no addressing
+            AxisConfiguration ac = new AxisConfiguration();
+            ConfigurationContext cc = new ConfigurationContext(ac);
+            AxisServiceGroup asg = new AxisServiceGroup(ac);
+            AxisService as = new AxisService("AnonymousService");
+            asg.addService(as);
+            ServiceGroupContext sgc = new ServiceGroupContext(cc, asg);
+            ServiceContext sc = sgc.getServiceContext("AnonymousService");
+            AxisOperation axisOperationTemplate = new OutInAxisOperation(
+                    new QName("TemplateOperation"));
+            as.addOperation(axisOperationTemplate);
+            cc.getAxisConfiguration().addService(as);
+            TransportOutDescription tod = new TransportOutDescription(
+                    new QName(org.apache.axis2.Constants.TRANSPORT_HTTP));
+            tod.setSender(new CommonsHTTPTransportSender());
+
+            ac.addTransportOut(tod);
+
+            MessageContext msgCtx = new MessageContext(sc
                     .getConfigurationContext());
 
             if (smc.getSoapAction() != null)
@@ -126,21 +125,49 @@
             AxisEngine engine = new AxisEngine(cc);
 
             // engage addressing if desired
-            Boolean engageAddressing = (Boolean)smc.getProperty(Constants.ADD_ADDRESSING);
-            if (engageAddressing.booleanValue()) ac.engageModule(new QName(org.apache.axis2.Constants.MODULE_ADDRESSING));
-            
+            Boolean engageAddressing =
+                    (Boolean) smc.getProperty(Constants.ADD_ADDRESSING);
+            if (engageAddressing != null) {
+                if (engageAddressing.booleanValue()) ac.engageModule(new QName(
+                        org.apache.axis2.Constants.MODULE_ADDRESSING));
+            }
+
             engine.send(msgCtx);
+            /**
+             * for the response to be handle from SynapseEnvironment, we need
+             * AxisConfiguration from the first dispatchiing
+             * so we should have first MessageContext properties
+             */
+
+//            MessageContext response = new MessageContext(msgCtx
+//                    .getConfigurationContext(), msgCtx.getSessionContext(),
+//                    msgCtx
+//                            .getTransportIn(), msgCtx.getTransportOut());
+//
+//
+//            response.setProperty(MessageContext.TRANSPORT_IN, msgCtx
+//                    .getProperty(MessageContext.TRANSPORT_IN));
+//            msgCtx.getAxisOperation().registerOperationContext(response,
+//                    msgCtx.getOperationContext());
+
+            MessageContext response = new MessageContext(smc
+                    .getConfigurationContext(), smc.getSessionContext(),
+                    smc.getTransportIn(), smc.getTransportOut());
+
 
-            MessageContext response = new MessageContext(msgCtx
-                    .getConfigurationContext(), msgCtx.getSessionContext(), msgCtx
-                    .getTransportIn(), msgCtx.getTransportOut());
             response.setProperty(MessageContext.TRANSPORT_IN, msgCtx
                     .getProperty(MessageContext.TRANSPORT_IN));
             msgCtx.getAxisOperation().registerOperationContext(response,
                     msgCtx.getOperationContext());
+
             response.setServerSide(false);
-            response.setServiceContext(msgCtx.getServiceContext());
-            response.setServiceGroupContext(msgCtx.getServiceGroupContext());
+            response.setServiceContext(smc.getServiceContext());
+            response.setServiceGroupContext(smc.getServiceGroupContext());
+            response.setProperty(MessageContext.TRANSPORT_OUT,
+                    smc.getProperty(MessageContext.TRANSPORT_OUT));
+            response.setProperty(org.apache.axis2.Constants.OUT_TRANSPORT_INFO,
+                    smc.getProperty(
+                            org.apache.axis2.Constants.OUT_TRANSPORT_INFO));
 
             // If request is REST we assume the response is REST, so set the
             // variable
@@ -149,11 +176,16 @@
             SOAPEnvelope resenvelope = TransportUtils.createSOAPMessage(
                     response, msgCtx.getEnvelope().getNamespace().getName());
 
+            System.out.println(resenvelope.toString());
+
             response.setEnvelope(resenvelope);
             engine = new AxisEngine(msgCtx.getConfigurationContext());
             engine.receive(response);
             response.setProperty(Constants.ISRESPONSE_PROPERTY, new Boolean(
                     true));
+            response.getOperationContext()
+                    .setProperty(org.apache.axis2.Constants.RESPONSE_WRITTEN,
+                            org.apache.axis2.Constants.VALUE_TRUE);
             return response;
         } catch (Exception e) {
             e.printStackTrace();

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2Sender.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2Sender.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2Sender.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2Sender.java Wed Dec 21 21:59:40 2005
@@ -17,22 +17,27 @@
 package org.apache.synapse.axis2;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAP12Constants;
+import org.apache.axis2.soap.SOAPFactory;
 
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.TransportInDescription;
 
 import org.apache.axis2.engine.AxisEngine;
 import org.apache.axis2.om.OMAbstractFactory;
+import org.apache.axis2.om.OMNamespace;
 
 import org.apache.synapse.Constants;
 import org.apache.synapse.SynapseException;
 import org.apache.synapse.SynapseMessage;
 import org.apache.synapse.SynapseEnvironment;
 
+import java.util.Iterator;
+
 
 /**
  * This class helps the Axis2SynapseEnvironment implement the send method
- *
  */
 public class Axis2Sender {
 
@@ -48,22 +53,52 @@
 
             // run all rules on response
 
+            /**
+             * temprary hack to get 200 ok, sorry
+             */
+            smc.setProperty(Constants.ISRESPONSE_PROPERTY, new Boolean(
+                    true));
+
             outMsgContext.setServerSide(true);
 
             // deal with the fact that AddressingOutHandler has a bug if
             // there is no header at all.        
             // fixed in axis 0.9652 
-            if (outMsgContext.getEnvelope().getHeader() == null) {
-                outMsgContext.getEnvelope().getBody().insertSiblingBefore(
-                        OMAbstractFactory.getSOAP11Factory()
-                                .getDefaultEnvelope().getHeader());
+            SOAPEnvelope envelope = outMsgContext.getEnvelope();
+            // temporarty hack
+            SOAPEnvelope newEnvelope;
+            if (envelope.getHeader() == null) {
+                SOAPFactory soapFactory;
+                if (envelope.getNamespace().getName()
+                        .equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
+                     soapFactory = OMAbstractFactory.getSOAP12Factory();
+                    newEnvelope = soapFactory.getDefaultEnvelope();
+                } else {
+                    soapFactory = OMAbstractFactory.getSOAP11Factory();
+                    newEnvelope = soapFactory.getDefaultEnvelope();
+
+                }
+                /**
+                 * Need a big fix here. Axis2 folks should fix this
+                 */
+                //envelope.addChild(soapFactory.createSOAPHeader(envelope));
+                //todo: bug in Axiom when another tree is declared and copy some elements from one tree to other
+                //todo: the second tree doesn't serialize attribute aware namespaces properly
+                //todo: as a temporartory hack this was taken into account
+                Iterator iterator = envelope.getAllDeclaredNamespaces();
+                while (iterator.hasNext()) {
+                    OMNamespace namespace = (OMNamespace)iterator.next();
+                    newEnvelope.declareNamespace(namespace);
+                }
+                newEnvelope.getBody().addChild(envelope.getBody().getFirstElement());
+                outMsgContext.setEnvelope(newEnvelope);
             }
-            
+
             Object os = messageContext
                     .getProperty(MessageContext.TRANSPORT_OUT);
             outMsgContext.setProperty(MessageContext.TRANSPORT_OUT, os);
             TransportInDescription ti = messageContext.getTransportIn();
-                    
+
             outMsgContext.setTransportIn(ti);
             se.injectMessage(new Axis2SynapseMessage(outMsgContext));
 
@@ -76,17 +111,22 @@
     public static void sendBack(SynapseMessage smc) {
         MessageContext messageContext = ((Axis2SynapseMessage) smc)
                 .getMessageContext();
-        AxisEngine ae = new AxisEngine(messageContext.getConfigurationContext());
-
-        if (messageContext.getEnvelope().getHeader() == null)
-            messageContext.getEnvelope().getBody().insertSiblingBefore(
+        AxisEngine ae =
+                new AxisEngine(messageContext.getConfigurationContext());
+        try {
+            if (messageContext.getEnvelope().getHeader() == null) {
+             messageContext.getEnvelope().getBody().insertSiblingBefore(
                     OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope()
                             .getHeader());
 
-        messageContext.setProperty(Constants.ISRESPONSE_PROPERTY, new Boolean(
-                true));
+            }
+            System.out.println(messageContext.getEnvelope());
+
+            messageContext
+                    .setProperty(Constants.ISRESPONSE_PROPERTY, new Boolean(
+                            true));
+
 
-        try {
             ae.send(messageContext);
         } catch (AxisFault e) {
             throw new SynapseException(e);

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2SynapseEnvironmentFinder.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2SynapseEnvironmentFinder.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2SynapseEnvironmentFinder.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/axis2/Axis2SynapseEnvironmentFinder.java Wed Dec 21 21:59:40 2005
@@ -57,7 +57,7 @@
             }
             String synapseConfig = (String) param.getValue();
             InputStream is = mc.getAxisService().getClassLoader()
-                    .getResourceAsStream(synapseConfig);
+                    .getResourceAsStream(synapseConfig.trim());
 
             StAXOMBuilder builder;
             try {

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/axis2/ServiceMediatorMessageReceiver.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/axis2/ServiceMediatorMessageReceiver.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/axis2/ServiceMediatorMessageReceiver.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/axis2/ServiceMediatorMessageReceiver.java Wed Dec 21 21:59:40 2005
@@ -12,16 +12,19 @@
 public class ServiceMediatorMessageReceiver extends AbstractMessageReceiver {
     public void receive(MessageContext messageContext) throws AxisFault {
         Object obj = makeNewServiceObject(messageContext);
-        
-        Mediator mediator = (Mediator)obj;
-        
+
+        Mediator mediator = (Mediator) obj;
+
         if (EnvironmentAware.class.isAssignableFrom(mediator.getClass())) {
-        	SynapseEnvironment se = (SynapseEnvironment)messageContext.getProperty(Constants.MEDIATOR_SYNAPSE_ENV_PROPERTY);
-			((EnvironmentAware) mediator).setSynapseEnvironment(se);
-			((EnvironmentAware) mediator).setClassLoader(messageContext.getAxisService().getClassLoader());
-		}
+            SynapseEnvironment se = (SynapseEnvironment) messageContext
+                    .getProperty(Constants.MEDIATOR_SYNAPSE_ENV_PROPERTY);
+            ((EnvironmentAware) mediator).setSynapseEnvironment(se);
+            ((EnvironmentAware) mediator).setClassLoader(
+                    messageContext.getAxisService().getClassLoader());
+        }
         SynapseMessage smc = new Axis2SynapseMessage(messageContext);
         boolean returnValue = mediator.mediate(smc);
-        messageContext.setProperty(Constants.MEDIATOR_STATUS, new Boolean(returnValue));
+        messageContext.setProperty(Constants.MEDIATOR_RESPONSE_PROPERTY,
+                new Boolean(returnValue));
     }
 }

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/axis2/SynapseMessageReceiver.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/axis2/SynapseMessageReceiver.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/axis2/SynapseMessageReceiver.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/axis2/SynapseMessageReceiver.java Wed Dec 21 21:59:40 2005
@@ -16,6 +16,7 @@
 package org.apache.synapse.axis2;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.context.MessageContext;
 
 import org.apache.axis2.engine.MessageReceiver;
@@ -26,22 +27,30 @@
 import org.apache.synapse.SynapseMessage;
 
 /**
- *
- * 
- * <p>
- * 
+ * <p/>
+ * <p/>
  * This is used to "catch" messages in Axis2 and pass them to Synapse for processing.
- *
  */
 public class SynapseMessageReceiver implements MessageReceiver {
 
-	private Log log = LogFactory.getLog(getClass());
+    private Log log = LogFactory.getLog(getClass());
 
-	public void receive(MessageContext mc) throws AxisFault {
-		log.debug("receiving message");
-		SynapseEnvironment env = Axis2SynapseEnvironmentFinder
-				.getSynapseEnvironment(mc);
-		SynapseMessage smc = new Axis2SynapseMessage(mc);
-		env.injectMessage(smc);
-	}
+    public void receive(MessageContext mc) throws AxisFault {
+        log.debug("receiving message");
+        SynapseEnvironment env = Axis2SynapseEnvironmentFinder
+                .getSynapseEnvironment(mc);
+        SynapseMessage smc = new Axis2SynapseMessage(mc);
+        env.injectMessage(smc);
+        /**
+         * temprary hack to get 200 ok return to the sender
+         */
+        Boolean responseWritten = (Boolean) smc
+                .getProperty(org.apache.synapse.Constants.ISRESPONSE_PROPERTY);
+        if (responseWritten != null) {
+            if (responseWritten.booleanValue()) {
+                mc.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN,
+                        Constants.VALUE_TRUE);
+            }
+        }
+    }
 }

Added: incubator/synapse/trunk/java/src/org/apache/synapse/processors/builtin/axis2/SecurityProcessor.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/processors/builtin/axis2/SecurityProcessor.java?rev=358509&view=auto
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/processors/builtin/axis2/SecurityProcessor.java (added)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/processors/builtin/axis2/SecurityProcessor.java Wed Dec 21 21:59:40 2005
@@ -0,0 +1,75 @@
+package org.apache.synapse.processors.builtin.axis2;
+
+import org.apache.synapse.processors.AbstractProcessor;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.SynapseMessage;
+import org.apache.synapse.Constants;
+import org.apache.synapse.SynapseException;
+import org.apache.synapse.axis2.Axis2SynapseMessage;
+import org.apache.axis2.context.*;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.AxisEngine;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.util.Utils;
+import org.apache.axis2.AxisFault;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+/*
+* 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 SecurityProcessor extends AbstractProcessor {
+    private Log log = LogFactory.getLog(getClass());
+
+    public boolean process(SynapseEnvironment se, SynapseMessage sm) {
+        log.debug("process");
+		try {
+			MessageContext mc = ((Axis2SynapseMessage) sm)
+					.getMessageContext();
+			ConfigurationContext cc = mc.getConfigurationContext();
+			AxisConfiguration ac = cc.getAxisConfiguration();
+			AxisEngine ae = new AxisEngine(cc);
+			AxisService as = ac.getService(Constants.SECURITY_QOS);
+			if (as == null)
+				throw new SynapseException("cannot locate service "
+                        + Constants.SECURITY_QOS);
+			ac.engageModule(new QName("security"));
+			AxisOperation ao = as
+					.getOperation(Constants.MEDIATE_OPERATION_NAME);
+			OperationContext oc = OperationContextFactory
+					.createOperationContext(ao.getAxisSpecifMEPConstant(), ao);
+			ao.registerOperationContext(mc, oc);
+
+			ServiceContext sc = Utils.fillContextInformation(ao, as, cc);
+			oc.setParent(sc);
+
+			mc.setOperationContext(oc);
+			mc.setServiceContext(sc);
+
+			mc.setAxisOperation(ao);
+			mc.setAxisService(as);
+
+			ae.receive(mc);
+
+		} catch (AxisFault e) {
+			throw new SynapseException(e);
+		}
+		return true;
+    }
+}

Modified: incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java (original)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/xml/ProcessorConfiguratorFinder.java Wed Dec 21 21:59:40 2005
@@ -59,7 +59,7 @@
 			FaultProcessorConfigurator.class,
 			AddressingProcessorConfigurator.class,
 			InProcessorConfigurator.class, OutProcessorConfigurator.class,
-			NeverProcessorConfigurator.class, RefProcessorConfigurator.class, Axis2MediatorProcessorConfigurator.class };
+			NeverProcessorConfigurator.class, RefProcessorConfigurator.class};
 
 	private static void initialise() {
 

Added: incubator/synapse/trunk/java/src/org/apache/synapse/xml/SecurityProcessorConfigurator.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/src/org/apache/synapse/xml/SecurityProcessorConfigurator.java?rev=358509&view=auto
==============================================================================
--- incubator/synapse/trunk/java/src/org/apache/synapse/xml/SecurityProcessorConfigurator.java (added)
+++ incubator/synapse/trunk/java/src/org/apache/synapse/xml/SecurityProcessorConfigurator.java Wed Dec 21 21:59:40 2005
@@ -0,0 +1,38 @@
+package org.apache.synapse.xml;
+
+import org.apache.synapse.Processor;
+import org.apache.synapse.SynapseEnvironment;
+import org.apache.synapse.processors.builtin.axis2.SecurityProcessor;
+import org.apache.axis2.om.OMElement;
+
+import javax.xml.namespace.QName;
+/*
+* 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 SecurityProcessorConfigurator extends AbstractProcessorConfigurator{
+    private static final QName SEC_Q = new QName(Constants.SYNAPSE_NAMESPACE,
+			"engage-security");
+    public Processor createProcessor(SynapseEnvironment se, OMElement el) {
+        SecurityProcessor sp = new SecurityProcessor();
+        super.setNameOnProcessor(se,el,sp);
+        return sp;
+    }
+
+    public QName getTagQName() {
+        return SEC_Q;
+    }
+}

Added: incubator/synapse/trunk/java/synapse-test-resources/axis2/modules/security.mar
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/synapse-test-resources/axis2/modules/security.mar?rev=358509&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/synapse/trunk/java/synapse-test-resources/axis2/modules/security.mar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/META-INF/services.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/META-INF/services.xml?rev=358509&view=auto
==============================================================================
--- incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/META-INF/services.xml (added)
+++ incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/META-INF/services.xml Wed Dec 21 21:59:40 2005
@@ -0,0 +1,31 @@
+<service name="synapse_security">
+	<!--<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>-->
+	<!--Mounting the method mediate-->
+	<operation name="mediate">
+		<messageReceiver class="org.apache.synapse.axis2.EmptyMessageReceiver"/>
+	</operation>
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Encrypt Signature Timestamp</items>
+          <!-- for the time being let use the default PWCallback class which is available on Axis2 distribution-->
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Encrypt Signature Timestamp</items>
+        <user>bob</user>
+         <!-- for the time being let use the default PWCallback class which is available on Axis2 distribution-->
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <encryptionKeyIdentifier>DirectReference</encryptionKeyIdentifier>
+        <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+        <encryptionUser>alice</encryptionUser>
+        <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+        <signaturePropFile>interop.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+</service>
\ No newline at end of file

Added: incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/interop.properties
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/interop.properties?rev=358509&view=auto
==============================================================================
--- incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/interop.properties (added)
+++ incubator/synapse/trunk/java/synapse-test-resources/axis2/services/synapse_security/interop.properties Wed Dec 21 21:59:40 2005
@@ -0,0 +1,4 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=password
+org.apache.ws.security.crypto.merlin.file=sec.jks
\ No newline at end of file

Added: incubator/synapse/trunk/java/test/org/apache/axis2/security/SecurityTester.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/axis2/security/SecurityTester.java?rev=358509&view=auto
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/axis2/security/SecurityTester.java (added)
+++ incubator/synapse/trunk/java/test/org/apache/axis2/security/SecurityTester.java Wed Dec 21 21:59:40 2005
@@ -0,0 +1,63 @@
+package org.apache.axis2.security;
+
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.Constants;
+import org.apache.axis2.AxisFault;
+import org.apache.synapse.util.Axis2EvnSetup;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import java.io.StringWriter;
+/*
+* 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 SecurityTester {
+    private static EndpointReference targetEPR = new EndpointReference(
+            "http://localhost:5044/axis2/services/MyService");
+
+    public static void main(String[] args) {
+        Call call = null;
+        try {
+            call = new Call("target/synapse-repository-security-client");
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(targetEPR);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+
+            OMElement result = call.invokeBlocking("security_test",
+                    Axis2EvnSetup.payload());
+
+            StringWriter writer = new StringWriter();
+            result.serialize(XMLOutputFactory.newInstance()
+                    .createXMLStreamWriter(writer));
+            writer.flush();
+
+            System.out.println(writer.toString());
+
+        } catch (AxisFault axisFault) {
+            axisFault
+                    .printStackTrace();
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        }
+
+
+    }
+}

Added: incubator/synapse/trunk/java/test/org/apache/axis2/security/security-axis2.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/axis2/security/security-axis2.xml?rev=358509&view=auto
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/axis2/security/security-axis2.xml (added)
+++ incubator/synapse/trunk/java/test/org/apache/axis2/security/security-axis2.xml Wed Dec 21 21:59:40 2005
@@ -0,0 +1,96 @@
+<axisconfig name="AxisJava2.0">
+    <parameter name="hotdeployment" locked="false">true</parameter>
+    <parameter name="hotupdate" locked="false">true</parameter>
+
+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+
+    <!-- Engage the security module -->
+    <module ref="security"/>
+
+    <!-- Scenario 6: Client's Configuration:START-->
+
+    <parameter name="OutflowSecurity">
+        <action>
+            <items>Encrypt Signature Timestamp</items>
+            <user>alice</user>
+            <!--<passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>-->
+            <passwordCallbackClass>sample.security.PWCallback</passwordCallbackClass>
+            <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+            <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+            <encryptionUser>bob</encryptionUser>
+            <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+            <signaturePropFile>interop.properties</signaturePropFile>
+        </action>
+    </parameter>
+
+    <parameter name="InflowSecurity">
+        <action>
+            <items>Encrypt Signature Timestamp</items>
+            <!--<passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>-->
+            <passwordCallbackClass>sample.security.PWCallback</passwordCallbackClass>
+            <signaturePropFile>interop.properties</signaturePropFile>
+        </action>
+    </parameter>
+
+    <!-- Scenario 6: Client's Configuration:END-->
+
+
+    <transportReceiver name="http">
+    </transportReceiver>
+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>
+    </transportSender>
+
+    <phaseOrder type="inflow">
+        <!--  System pre defined phases       -->
+        <phase name="TransportIn"/>
+        <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="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="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="userphase1"/>
+    </phaseOrder>
+    <phaseOrder type="outflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+    <phaseOrder type="INfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+    </phaseOrder>
+    <phaseOrder type="Outfaultflow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="userphase1"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+    </phaseOrder>
+
+</axisconfig>

Added: incubator/synapse/trunk/java/test/org/apache/axis2/security/security-synapse.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/axis2/security/security-synapse.xml?rev=358509&view=auto
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/axis2/security/security-synapse.xml (added)
+++ incubator/synapse/trunk/java/test/org/apache/axis2/security/security-synapse.xml Wed Dec 21 21:59:40 2005
@@ -0,0 +1,6 @@
+<synapse xmlns="http://ws.apache.org/ns/synapse">
+    <stage name="security_test">
+        <engage-addressing-in/>
+        <engage-security/>
+    </stage>
+</synapse>
\ No newline at end of file

Modified: incubator/synapse/trunk/java/test/org/apache/axis2/test/Echo.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/axis2/test/Echo.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/axis2/test/Echo.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/axis2/test/Echo.java Wed Dec 21 21:59:40 2005
@@ -1,6 +1,9 @@
 package org.apache.axis2.test;
 
 import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMFactory;
+import org.apache.axis2.om.OMAbstractFactory;
+import org.apache.axis2.om.OMNamespace;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -24,6 +27,12 @@
                 "This is the actual service which has been redirected");
         element.build();
         element.detach();
-        return element;
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace(
+                "urn:text-body", "ns");
+        OMElement responseText = fac.createOMElement("response_text", omNs);
+        responseText.addChild(
+                fac.createText(responseText, "Synapse Testing String_Response"));
+        return responseText;
     }
 }

Modified: incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/SendOnProcessorWithRuleTest.java Wed Dec 21 21:59:40 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.MessageSender;
 import org.apache.axis2.client.Options;
+import org.apache.axis2.client.Call;
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 import org.apache.synapse.util.Axis2EvnSetup;
 
@@ -52,11 +53,11 @@
     }
 
     public void testSendProcessor() throws Exception {
-        MessageSender msgSender = new MessageSender();
+        Call call = new Call();
         Options options = new Options();
         options.setTo(targetEpr);
-        msgSender.setClientOptions(options);
-        msgSender.send(operation.getLocalPart(), Axis2EvnSetup.payload());
+        call.setClientOptions(options);
+        call.invokeBlocking(operation.getLocalPart(), Axis2EvnSetup.payload());
 
     }
 

Copied: incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/ServiceMediatorProcessorWithRuleTest.java (from r357682, incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java)
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/ServiceMediatorProcessorWithRuleTest.java?p2=incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/ServiceMediatorProcessorWithRuleTest.java&p1=incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java&r1=357682&r2=358509&rev=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/Axis2MediatorProcessorWithRuleTest.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/injection/ServiceMediatorProcessorWithRuleTest.java Wed Dec 21 21:59:40 2005
@@ -6,8 +6,8 @@
 import org.apache.synapse.SynapseEnvironment;
 import org.apache.synapse.SynapseMessage;
 import org.apache.synapse.Processor;
-import org.apache.synapse.processors.Axis2MediatorProcessor;
-import org.apache.synapse.xml.Axis2MediatorProcessorConfigurator;
+import org.apache.synapse.processors.mediatortypes.axis2.ServiceMediatorProcessor;
+import org.apache.synapse.xml.ServiceMediatorProcessorConfigurator;
 import org.apache.synapse.axis2.Axis2SynapseEnvironment;
 import org.apache.synapse.axis2.Axis2SynapseMessage;
 import org.apache.synapse.util.Axis2EvnSetup;
@@ -28,7 +28,7 @@
 *
 */
 
-public class Axis2MediatorProcessorWithRuleTest extends TestCase {
+public class ServiceMediatorProcessorWithRuleTest extends TestCase {
     private MessageContext msgCtx;
     private SynapseEnvironment env;
     private OMElement config;
@@ -54,10 +54,10 @@
     }
 
     public void testAxis2MediagtorConfigurator() throws Exception {
-        Axis2MediatorProcessorConfigurator conf = new Axis2MediatorProcessorConfigurator();
+        ServiceMediatorProcessorConfigurator conf = new ServiceMediatorProcessorConfigurator();
 
         Processor pro = conf.createProcessor(env,config.getFirstElement().getFirstElement());
-        assertTrue(pro instanceof Axis2MediatorProcessor);
+        assertTrue(pro instanceof ServiceMediatorProcessor);
         assertNotNull(pro.getName());
     }
 }

Copied: incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/ServiceMediatorProcessorTest.java (from r357682, incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java)
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/ServiceMediatorProcessorTest.java?p2=incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/ServiceMediatorProcessorTest.java&p1=incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java&r1=357682&r2=358509&rev=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/Axis2MediatorProcessorTest.java (original)
+++ incubator/synapse/trunk/java/test/org/apache/synapse/spi/processors/ServiceMediatorProcessorTest.java Wed Dec 21 21:59:40 2005
@@ -2,7 +2,7 @@
 
 import junit.framework.TestCase;
 import org.apache.synapse.SynapseMessage;
-import org.apache.synapse.processors.Axis2MediatorProcessor;
+import org.apache.synapse.processors.mediatortypes.axis2.ServiceMediatorProcessor;
 import org.apache.synapse.util.Axis2EvnSetup;
 import org.apache.synapse.axis2.Axis2SynapseMessage;
 /*
@@ -22,12 +22,12 @@
 *
 */
 
-public class Axis2MediatorProcessorTest extends TestCase {
-    public void testAxis2MediatorProcessor() throws Exception {
+public class ServiceMediatorProcessorTest extends TestCase {
+    public void testServiceMediatorProcessor() throws Exception {
         SynapseMessage sm = new Axis2SynapseMessage(
                 Axis2EvnSetup.axis2Deployment("target/synapse-repository-sendonAxis2"));
-        Axis2MediatorProcessor pro = new Axis2MediatorProcessor();
-        pro.setServiceMediatorName("test-mediator");
+        ServiceMediatorProcessor pro = new ServiceMediatorProcessor();
+        pro.setServiceName("test-mediator");
         boolean result = pro.process(null,sm);
         assertTrue(result);
     }

Modified: incubator/synapse/trunk/java/test/rules/synapse-sendon.xml
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/test/rules/synapse-sendon.xml?rev=358509&r1=358508&r2=358509&view=diff
==============================================================================
--- incubator/synapse/trunk/java/test/rules/synapse-sendon.xml (original)
+++ incubator/synapse/trunk/java/test/rules/synapse-sendon.xml Wed Dec 21 21:59:40 2005
@@ -4,5 +4,8 @@
             <classmediator name="simpleRouting" class="sampleMediators.SampleRouter"/>
             <send/>
         </xpath>
+        <xpath expr="//ns:response_text" xmlns:ns="urn:text-body">
+            <send/>
+        </xpath>
     </stage>
 </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