ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r391901 - in /webservices/axis2/trunk/java/modules: integration/ integration/test/org/apache/axis2/security/rahas/ security/src/org/apache/axis2/security/trust/impl/
Date Thu, 06 Apr 2006 05:07:15 GMT
Author: ruchithf
Date: Wed Apr  5 22:07:12 2006
New Revision: 391901

URL: http://svn.apache.org/viewcvs?rev=391901&view=rev
Log:
- Added a RAHAS test case that uses wst:BinarySecret to send the secret of the SCT form the
STS
- Few code cleanups


Added:
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/RahasScenario2Test.java
Modified:
    webservices/axis2/trunk/java/modules/integration/maven.xml
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/Service.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/TestClient.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java

Modified: webservices/axis2/trunk/java/modules/integration/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/maven.xml?rev=391901&r1=391900&r2=391901&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/maven.xml Wed Apr  5 22:07:12 2006
@@ -120,7 +120,28 @@
                  basedir="target/temp-rahas"/>
 
             <!-- Rahas Test - 1 :END -->
-			
+
+            <!-- Rahas Test - 2  -->
+
+            <mkdir dir="target/test-resources/rahas_service_repo_2"/>
+            <mkdir dir="target/test-resources/rahas_service_repo_2/conf"/>
+            <mkdir dir="target/test-resources/rahas_service_repo_2/services"/>
+            <mkdir dir="target/test-resources/rahas_service_repo_2/modules"/>
+
+			<copy file="../addressing/target/addressing-${addressing_version}.mar"
+                  tofile="target/test-resources/rahas_service_repo_2/modules/addressing-${addressing_version}.mar"/>
+			<copy file="../security/target/rahas-${rahas_version}.mar"
+                  tofile="target/test-resources/rahas_service_repo_2/modules/rahas-${rahas_version}.mar"/>
+
+			<!-- copy the services.xml and create the aar -->
+			<copy overwrite="yes" file="test-resources/security/rahas/s2-services.xml"
+                  tofile="target/temp-rahas/META-INF/services.xml"/>
+
+		    <jar  overwrite="yes" jarfile="target/test-resources/rahas_service_repo_2/services/Service.aar"
+                 basedir="target/temp-rahas"/>
+
+            <!-- Rahas Test - 2 :END -->
+
 			<!-- clean up temp rahas stuff -->
 			<!--<delete dir="target/temp-rahas"/> -->
 

Added: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/RahasScenario2Test.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/RahasScenario2Test.java?rev=391901&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/RahasScenario2Test.java
(added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/RahasScenario2Test.java
Wed Apr  5 22:07:12 2006
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security.rahas;
+
+public class RahasScenario2Test extends RahasScenario1Test {
+
+    public RahasScenario2Test(String name) {
+        super(name);
+    }
+
+    public String getServiceRepo() {
+        return "rahas_service_repo_2";
+    }
+
+    
+}

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/Service.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/Service.java?rev=391901&r1=391900&r2=391901&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/Service.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/Service.java
Wed Apr  5 22:07:12 2006
@@ -1,7 +1,21 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.axis2.security.rahas;
 import org.apache.axiom.om.OMElement;
-
-
 
 public class Service {
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/TestClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/TestClient.java?rev=391901&r1=391900&r2=391901&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/TestClient.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/TestClient.java
Wed Apr  5 22:07:12 2006
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.axis2.security.rahas;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
@@ -25,22 +41,6 @@
 
 import junit.framework.TestCase;
 
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 /**
  *
  * @author Ruchith Fernando (ruchith.fernando@gmail.com)
@@ -48,7 +48,7 @@
 public abstract class TestClient extends TestCase {
     
     private static final String AXIS2_ECHO_STRING = "Axis2 Echo String";
-    protected int port = UtilServer.TESTING_PORT;
+    protected int port = 5556; //UtilServer.TESTING_PORT;
     private QName rahasModule = new QName("rahas");
     
     public TestClient(String name) {
@@ -91,7 +91,10 @@
             
             //Blocking invocation
             OMElement result = serviceClient.sendReceive(payload);
+            
             result = serviceClient.sendReceive(getEchoElement());
+            result = serviceClient.sendReceive(getEchoElement());
+            
             StringWriter writer = new StringWriter();
             result.serialize(XMLOutputFactory.newInstance()
                     .createXMLStreamWriter(writer));

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java?rev=391901&r1=391900&r2=391901&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java
Wed Apr  5 22:07:12 2006
@@ -253,10 +253,6 @@
         sctToken.setSecret(encrKeyBuilder.getEphemeralKey());
         this.getTokenStore(msgCtx).add(sctToken);
         
-        String bodyStr = env.getBody().toString();
-        System.out.println(bodyStr);
-        System.out.println(env);
-        
         return env;
     }
 



Mime
View raw message