axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r387805 - in /webservices/axis2/trunk/java/modules: samples/ samples/resources/security/ samples/src/sample/security/META-INF/ security/src/org/apache/axis2/security/trust/ tool/
Date Wed, 22 Mar 2006 09:22:50 GMT
Author: ruchithf
Date: Wed Mar 22 01:22:48 2006
New Revision: 387805

URL: http://svn.apache.org/viewcvs?rev=387805&view=rev
Log:
- Fixing the security sample
- Added the STSMessageReceiver -  MessageReceiver for the security token service which will
use the TokenDispatcher


Added:
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java
Modified:
    webservices/axis2/trunk/java/modules/samples/maven.xml
    webservices/axis2/trunk/java/modules/samples/resources/security/client.axis2.xml
    webservices/axis2/trunk/java/modules/samples/resources/security/service.axis2.xml
    webservices/axis2/trunk/java/modules/samples/src/sample/security/META-INF/services.xml
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcher.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties
    webservices/axis2/trunk/java/modules/tool/maven.xml

Modified: webservices/axis2/trunk/java/modules/samples/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/maven.xml?rev=387805&r1=387804&r2=387805&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/samples/maven.xml Wed Mar 22 01:22:48 2006
@@ -264,18 +264,18 @@
     <mkdir dir="target/security"/>
     <mkdir dir="target/security/META-INF"/>
     
-        <!-- Create the service archive -->
-        <ant:move todir="target/security">
-         <ant:fileset dir="target/classes">
-                <ant:include name="sample/security/*.class"/>
-            </ant:fileset>
+    <!-- Create the service archive -->
+    <ant:move todir="target/security">
+    	<ant:fileset dir="target/classes">
+            <ant:include name="sample/security/*.class"/>
+        </ant:fileset>
     </ant:move>
     <ant:copy file="src/sample/security/META-INF/services.xml" tofile="target/security/META-INF/services.xml"/>
     <ant:copy file="resources/security/sec.jks" tofile="target/security/sec.jks"/>
     <ant:copy file="resources/security/sec.properties" tofile="target/security/sec.properties"/>
-        <jar destfile="target/security/SecureService.aar">
-            <fileset dir="target/security"></fileset>
-        </jar>
+    <jar destfile="target/security/SecureService.aar">
+        <fileset dir="target/security"></fileset>
+    </jar>
         
     <!-- Create a jar to hold the password callback class-->
     <mkdir dir="target/security/secUtil/sample/security/" />
@@ -283,23 +283,23 @@
     <ant:copy file="target/security/sample/security/Client.class" toFile="target/security/secUtil/sample/security/Client.class"
/>
     <ant:copy file="resources/security/sec.jks" tofile="target/security/secUtil/sec.jks"/>
     <ant:copy file="resources/security/sec.properties" tofile="target/security/secUtil/sec.properties"/>
-        <jar destfile="target/security/secUtil.jar">
-            <fileset dir="target/security/secUtil"></fileset>
-        </jar>
+    <jar destfile="target/security/secUtil.jar">
+        <fileset dir="target/security/secUtil"></fileset>
+    </jar>
 
     <mkdir dir="target/security/client_repo"/>
     <mkdir dir="target/security/client_repo/modules"/>
+    <mkdir dir="target/security/client_repo/services"/>
+    <mkdir dir="target/security/client_repo/conf"/>
+    <ant:copy file="../addressing/target/modules/addressing-${addressing_version}.mar"
tofile="target/samples/security/client_repo/modules/addressing-${addressing_version}.mar"/>
+    <ant:copy file="resources/security/client.axis2.xml" tofile="target/samples/security/client_repo/conf/axis2.xml"/>
 
-    <ant:copy file="../addressing/target/modules/addressing-${addressing_version}.mar"
tofile="target/toWar/modules/addressing-${addressing_version}.mar"/>
-
-    <!-- Copy the sources and others orver to the target/samples/security-->
+    <!-- Copy the sources and others ovrer to the target/samples/security-->
     <mkdir dir="target/samples/security/src/sample/security/"/>
         <ant:copy todir="target/samples/security/src/sample/security/">
          <ant:fileset dir="src/sample/security" />
     </ant:copy>
-    <mkdir dir="target/security/client_repo/modules"/>
-    <ant:copy file="../addressing/target/modules/addressing-${addressing_version}.mar"
tofile="target/samples/security/client_repo/modules/addressing-${addressing_version}.mar"/>
-    <ant:copy file="resources/security/client.axis2.xml" tofile="target/samples/security/client_repo/axis2.xml"/>
+
     <ant:copy file="target/security/SecureService.aar" tofile="target/samples/security/SecureService.aar"/>
     <ant:copy file="target/security/secUtil.jar" tofile="target/samples/security/secUtil.jar"/>
     <ant:copy file="resources/security/README.txt" tofile="target/samples/security/README.txt"/>

Modified: webservices/axis2/trunk/java/modules/samples/resources/security/client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/resources/security/client.axis2.xml?rev=387805&r1=387804&r2=387805&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/resources/security/client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/samples/resources/security/client.axis2.xml Wed Mar
22 01:22:48 2006
@@ -1,9 +1,6 @@
 <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 addressing module -->
     <module ref="addressing"/>
 
     <!-- Engage the security module -->
@@ -20,7 +17,7 @@
         <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
         <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
         <encryptionUser>bob</encryptionUser>
-        <signatureParts>{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}To;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}ReplyTo;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}MessageID;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</signatureParts>
+        <signatureParts>{Element}{http://www.w3.org/2005/08/addressing}To;{Element}{http://www.w3.org/2005/08/addressing}ReplyTo;{Element}{http://www.w3.org/2005/08/addressing}MessageID;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</signatureParts>
 
         <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
       </action>
@@ -36,24 +33,80 @@
 
     <!-- Test with addressing and MTOM: Client's Configuration:END-->
 
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment" locked="false">true</parameter>
+    <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" 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="http">
+    <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>
-    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
-        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>
-    </transportSender>
 
+    <!-- ================================================= -->
+    <!-- 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>
 
-  <phaseOrder type="inflow">
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <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"/>
@@ -64,6 +117,11 @@
                 <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"/>
@@ -75,11 +133,11 @@
         </phase>
         <!--  System pre defined phases       -->
         <!--   After Postdispatch phase module author or or service author can add any
phase he want      -->
-        <phase name="userphase1"/>
+        <phase name="OperationInPhase"/>
     </phaseOrder>
     <phaseOrder type="outflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutPhase"/>
         <!--system predefined phase-->
         <!--these phase will run irrespective of the service-->
         <phase name="PolicyDetermination"/>
@@ -87,14 +145,12 @@
     </phaseOrder>
     <phaseOrder type="INfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationInFaultPhase"/>
     </phaseOrder>
     <phaseOrder type="Outfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutFaultPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
-    </phaseOrder>
-
-</axisconfig>
+    </phaseOrder></axisconfig>
 

Modified: webservices/axis2/trunk/java/modules/samples/resources/security/service.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/resources/security/service.axis2.xml?rev=387805&r1=387804&r2=387805&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/resources/security/service.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/samples/resources/security/service.axis2.xml Wed
Mar 22 01:22:48 2006
@@ -1,9 +1,4 @@
 <axisconfig name="AxisJava2.0">
-    <parameter name="hotdeployment" locked="false">true</parameter>
-    <parameter name="hotupdate" locked="false">true</parameter>
-    <parameter name="enableMTOM" locked="false">true</parameter>
-
-    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
     <!-- Engage the addressing module -->
     <module ref="addressing"/>
@@ -11,60 +6,81 @@
     <!-- Engage the security module -->
     <module ref="security"/>
 
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment" locked="false">true</parameter>
+    <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" 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">
+    <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>
 
-    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport
Receiver
-    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
-          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>
-          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>
-          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>
-          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>
-          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>
-      </transportReceiver> -->
-
-    <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
-        <parameter name="port" locked="false">6060</parameter>
+    <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.0</parameter>
+    <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>
 
-    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport
Receiver
-   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">
-       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>
-       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>
-       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>
-       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>
-   </transportSender>
-   -->
-
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
     <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"/>
@@ -75,6 +91,11 @@
                 <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"/>
@@ -86,11 +107,11 @@
         </phase>
         <!--  System pre defined phases       -->
         <!--   After Postdispatch phase module author or or service author can add any
phase he want      -->
-        <phase name="userphase1"/>
+        <phase name="OperationInPhase"/>
     </phaseOrder>
     <phaseOrder type="outflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutPhase"/>
         <!--system predefined phase-->
         <!--these phase will run irrespective of the service-->
         <phase name="PolicyDetermination"/>
@@ -98,14 +119,12 @@
     </phaseOrder>
     <phaseOrder type="INfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationInFaultPhase"/>
     </phaseOrder>
     <phaseOrder type="Outfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutFaultPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
-    </phaseOrder>
-
-</axisconfig>
+    </phaseOrder></axisconfig>
 

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/security/META-INF/services.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/security/META-INF/services.xml?rev=387805&r1=387804&r2=387805&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/security/META-INF/services.xml
(original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/security/META-INF/services.xml
Wed Mar 22 01:22:48 2006
@@ -21,7 +21,6 @@
         <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
         <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
         <encryptionUser>alice</encryptionUser>
-
         <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
       </action>
     </parameter>

Added: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java?rev=387805&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java
(added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java
Wed Mar 22 01:22:48 2006
@@ -0,0 +1,45 @@
+
+package org.apache.axis2.security.trust;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.ws.commons.soap.SOAPEnvelope;
+
+public class STSMessageReceiver extends AbstractInOutAsyncMessageReceiver {
+
+    public void invokeBusinessLogic(MessageContext inMessage,
+            MessageContext outMessage) throws AxisFault {
+
+        try {
+            Parameter param = inMessage
+                    .getParameter(TokenRequestDispatcherConfig.CONFIG_PARAM_KEY);
+            Parameter paramFile = inMessage
+                    .getParameter(TokenRequestDispatcherConfig.CONFIG_FILE_KEY);
+            TokenRequestDispatcher dispatcher = null;
+            if (param != null) {
+                dispatcher = new TokenRequestDispatcher(param
+                        .getParameterElement());
+            } else if (paramFile != null) {
+                dispatcher = new TokenRequestDispatcher((String) param
+                        .getValue());
+            } else {
+                dispatcher = new TokenRequestDispatcher(
+                        (OMElement) inMessage
+                                .getProperty(TokenRequestDispatcherConfig.CONFIG_PARAM_KEY));
+            }
+            
+            if(dispatcher != null) {
+                SOAPEnvelope responseEnv = dispatcher.handle(inMessage);
+                outMessage.setEnvelope(responseEnv);
+            } else {
+                throw new TrustException("missingDispatcherConfiguration");
+            }
+        } catch (TrustException e) {
+            throw new AxisFault(e.getFaultString(), e.getFaultCode(), e);
+        }
+    }
+
+}

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcher.java?rev=387805&r1=387804&r2=387805&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcher.java
Wed Mar 22 01:22:48 2006
@@ -47,9 +47,16 @@
      * @return
      * @throws TrustException
      */
-    public SOAPEnvelope handle(
-            RequestSecurityTokenType request, MessageContext ctx)
+    public SOAPEnvelope handle(MessageContext ctx)
             throws TrustException {
+
+        
+        RequestSecurityTokenType request = null;
+        try {
+            request = RequestSecurityTokenType.Factory.parse(ctx.getEnvelope().getXMLStreamReader());
+        } catch (Exception e) {
+            throw new TrustException(TrustException.INVALID_REQUEST, e);
+        }
         
         URI reqType = request.getRequestType();
         URI tokenType = request.getTokenType();

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java?rev=387805&r1=387804&r2=387805&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java
Wed Mar 22 01:22:48 2006
@@ -27,6 +27,9 @@
 
 public class TokenRequestDispatcherConfig {
 
+    public final static String CONFIG_PARAM_KEY = "token-dispatcher-configuration";
+    public final static String CONFIG_FILE_KEY = "token-dispatcher-configuration-file";
+    
     private final static QName CONFIG = new QName("token-dispatcher-configuration");
     public final static QName ISSUER = new QName("issuer");
     public final static QName TOKEN_TYPE = new QName("tokenType");

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties?rev=387805&r1=387804&r2=387805&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties
Wed Mar 22 01:22:48 2006
@@ -19,4 +19,5 @@
 defaultIssuerMissing = The default issuer must be specified
 tokenAlreadyExists = "The token \"{0}\" already exists in the store
 noTokenToUpdate = Canot find token : \"{0}\" to update 
-errorInBuildingTheEncryptedKey = Error in building a xenc:EncyptedKey , encrypted for \"{0}\"

\ No newline at end of file
+errorInBuildingTheEncryptedKey = Error in building a xenc:EncyptedKey , encrypted for \"{0}\"

+missingDispatcherConfiguration = "Cannot find the token-dispatcher-configuration"
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/tool/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/maven.xml?rev=387805&r1=387804&r2=387805&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/tool/maven.xml Wed Mar 22 01:22:48 2006
@@ -9,9 +9,7 @@
     xmlns:maven="jelly:maven"
     xmlns:deploy="deploy"
     xmlns:ant="jelly:ant">
-    <postGoal name="jar:jar">
-        <attainGoal name="create-tracer"/>
-    </postGoal>
+
     <goal name="jar-tool">
         <!-- make the jar tool-->
         <mkdir dir="target/jar-tool"/>
@@ -25,45 +23,6 @@
         <copy file="src/script/jar-tool-UI.bat" todir="target/jar-tool"></copy>
     </goal>
     
-    <!-- ================================================================ -->
-    <!--- Create the Tracer JAR -->
-    <!-- ================================================================ -->
-    <goal name="create-tracer">
-        <ant:echo>+----------------------------------------------</ant:echo>
-        <ant:echo>| Creating: Axis2 Tracer</ant:echo>
-        <ant:echo>+----------------------------------------------</ant:echo>
-
-        <ant:property name="tracer.dir" value="target/tracer"/>
-        <ant:property name="tracer.temp.dir" value="target/tracer/temp"/>
-        <ant:mkdir dir="${tracer.dir}"/>
-        <ant:mkdir dir="${tracer.temp.dir}"/>
-
-        <ant:copy todir="${tracer.temp.dir}">
-            <fileset dir="target/classes">
-                <include name="**/tracer/**"/>
-                <exclude name="*"/>
-            </fileset>
-            <fileset dir="conf/tracer">
-                <include name="META-INF/**"/>
-            </fileset>
-        </ant:copy>
-        <jar destfile="${tracer.dir}/axis2-tracer-${pom.currentVersion}.jar">
-            <fileset dir="target/classes">
-                <include name="**/tracer/**"/>
-                <exclude name="*"/>
-            </fileset>
-        </jar>
-        <ant:zip destfile="target/axis2-tracer-${pom.currentVersion}.jar"
-                 basedir="${tracer.temp.dir}"
-                 includes="**"/>
-        <artifact:install
-                 artifact="${basedir}/target/axis2-tracer-${pom.currentVersion}.jar"
-                 artifactIdOverride="axis2-tracer"
-                 type="jar"
-                 project="${pom}"
-        />
-    </goal>
-
     <preGoal name="itest:compile">
         <u:file var="file" name="${maven.itest.src}"/>
         <j:if test="${!file.exists()}">



Mime
View raw message