ws-wss4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r330974 - in /webservices/wss4j/trunk: ./ samples/org/apache/ws/sandbox/ samples/org/apache/ws/sandbox/security/ samples/org/apache/ws/sandbox/security/trust2/ samples/org/apache/ws/sandbox/security/trust2/samples/ src/org/apache/ws/sandbox...
Date Sat, 05 Nov 2005 05:32:14 GMT
Author: dims
Date: Fri Nov  4 21:31:59 2005
New Revision: 330974

URL: http://svn.apache.org/viewcvs?rev=330974&view=rev
Log:
add deployment descriptor for trust2 and enable test case as well.

details: http://article.gmane.org/gmane.comp.apache.webservices.fx.devel/1129



Added:
    webservices/wss4j/trunk/samples/org/apache/ws/sandbox/
    webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/
    webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/
    webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/
    webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
  (contents, props changed)
      - copied, changed from r330625, webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
    webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
  (contents, props changed)
      - copied, changed from r330625, webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
    webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/deploy.wsdd
    webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/undeploy.wsdd
    webservices/wss4j/trunk/test/sandbox/
    webservices/wss4j/trunk/test/sandbox/PackageTests.java
    webservices/wss4j/trunk/test/sandbox/TestTrust2.java
Removed:
    webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
    webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
Modified:
    webservices/wss4j/trunk/build.xml

Modified: webservices/wss4j/trunk/build.xml
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/build.xml?rev=330974&r1=330973&r2=330974&view=diff
==============================================================================
--- webservices/wss4j/trunk/build.xml (original)
+++ webservices/wss4j/trunk/build.xml Fri Nov  4 21:31:59 2005
@@ -408,7 +408,7 @@
         <runaxisfunctionaltests
             url="http://localhost:8088"
             httpServerTarget="start-functional-test-http-server"
-            testTarget="interopTests"
+            testTarget="allTests"
             httpStopTarget="stop-functional-test-http-server"/>
     </target>
 
@@ -429,6 +429,9 @@
         </java>
     </target>
 
+    <target name="allTests" depends="sandboxTests, interopTests">
+    </target>
+
     <target name="interopTests" depends="init">
         <echo message="Running system tests - BEGIN..."/>
 
@@ -519,6 +522,40 @@
         </junit>
     </target>
 
+    <target name="sandboxTests" depends="compile">
+        <java classname="org.apache.axis.client.AdminClient" fork="yes">
+            <classpath refid="classpath.library"/>
+            <arg line="${dir.samples}/org/apache/ws/sandbox/security/trust2/samples/deploy.wsdd"/>
+        </java>
+
+        <junit printsummary="yes"
+            haltonfailure="yes"
+            fork="yes"
+            dir="${basedir}">
+            <!-- See if this helps with Gump test failures -->
+            <sysproperty key="build.clonevm" value="true"/>
+
+            <jvmarg value="-Djava.endorsed.dirs=${basedir}/endorsed"/>
+            <jvmarg value="-Dhttp.proxyHost=${http.proxyHost}"/>
+            <jvmarg value="-Dhttp.proxyPort=${http.proxyPort}"/>
+            <jvmarg value="-Dhttp.nonProxyHosts=${http.nonProxyHosts}"/>
+            <jvmarg value="-Dhttp.proxyUser=${http.proxyUser}"/>
+            <jvmarg value="-Dhttp.proxyPassword=${http.proxyPassword}"/>
+            <classpath refid="classpath.test"/>
+            <formatter type="xml"/>
+            <batchtest todir="${build.dir}/test-reports">
+                <fileset dir="${build.classes}">
+                    <include name="**/sandbox/PackageTests.class"/>
+                </fileset>
+            </batchtest>
+        </junit>
+
+        <java classname="org.apache.axis.client.AdminClient" fork="yes">
+            <classpath refid="classpath.library"/>
+            <arg line="${dir.samples}/org/apache/ws/sandbox/security/trust2/samples/undeploy.wsdd"/>
+        </java>
+    </target>
+    
     <target name="tcpmon" depends="init" description=
                 "Start standalone tcp monitor application (provided by axis)">
         <java dir="${basedir}" fork="yes" failOnError="true" 

Copied: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
(from r330625, webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java)
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java?p2=webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java&p1=webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java&r1=330625&r2=330974&rev=330974&view=diff
==============================================================================
    (empty)

Propchange: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
------------------------------------------------------------------------------
    cvs2svn:cvs-rev = 1.2

Propchange: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenService.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
(from r330625, webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java)
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java?p2=webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java&p1=webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java&r1=330625&r2=330974&rev=330974&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
(original)
+++ webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
Fri Nov  4 21:31:59 2005
@@ -29,6 +29,7 @@
 import org.apache.axis.message.SOAPBodyElement;
 import org.apache.axis.message.SOAPEnvelope;
 import org.apache.axis.utils.XMLUtils;
+import org.apache.axis.utils.Options;
 import org.apache.ws.security.message.token.UsernameToken;
 import org.apache.ws.security.WSSConfig;
 import org.w3c.dom.DOMException;
@@ -44,17 +45,20 @@
  */
 public class SampleSecurityTokenServiceClient {
 
+    /** Field address */
+    private static final java.lang.String address =
+            "http://localhost:8080/axis/services/SampleSecurityTokenService";
+
+    
     // First arg passed should be the URL of the service. If none is specified, client tries
localhost.
     public static void main(String[] args) throws DOMException, TrustException, Exception
{
+
+        Options opts = new Options(args);
+        opts.setDefaultURL(address);
+
         Service service = new Service();
         Call call = (Call) service.createCall();
-		
-        // The default service location
-        String url = "http://localhost:8080/JavaTrust/services/SampleSecurityTokenService";
-        // Or the user-specified location
-        if (args.length > 0)
-            url = args[0];
-        call.setTargetEndpointAddress(new java.net.URL(url));
+        call.setTargetEndpointAddress(opts.getURL());
 
         SOAPEnvelope env = new SOAPEnvelope();
         Document doc = env.getAsDocument();

Propchange: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
------------------------------------------------------------------------------
    cvs2svn:cvs-rev = 1.2

Propchange: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/SampleSecurityTokenServiceClient.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/deploy.wsdd
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/deploy.wsdd?rev=330974&view=auto
==============================================================================
--- webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/deploy.wsdd
(added)
+++ webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/deploy.wsdd
Fri Nov  4 21:31:59 2005
@@ -0,0 +1,24 @@
+<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+	<service name="SampleSecurityTokenService" style="document" use="literal">
+  		<parameter name="allowedMethods" value="*"/>
+  		<parameter name="className" value="org.apache.ws.sandbox.security.trust2.samples.SampleSecurityTokenService"/>
+		<typeMapping
+	        xmlns:ns="http://schemas.xmlsoap.org/ws/2004/04/trust"
+    	    qname="ns:RequestSecurityToken"
+        	type="java:org.apache.ws.sandbox.security.trust2.RequestSecurityToken"
+	        serializer="org.apache.ws.sandbox.security.trust2.serialization.RSTSerializerFactory"
+    	    deserializer="org.apache.ws.sandbox.security.trust2.serialization.RSTDeserializerFactory"
+	        encodingStyle=""/>
+		<typeMapping
+	        xmlns:ns="http://schemas.xmlsoap.org/ws/2004/04/trust"
+    	    qname="ns:RequestSecurityTokenResponse"
+        	type="java:org.apache.ws.sandbox.security.trust2.RequestSecurityTokenResponse"
+	        serializer="org.apache.ws.sandbox.security.trust2.serialization.RSTResponseSerializerFactory"
+    	    deserializer="org.apache.ws.sandbox.security.trust2.serialization.RSTResponseDeserializerFactory"
+	        encodingStyle=""/>	
+		<operation name="exchange" qname="ns1:RequestSecurityToken" xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/04/trust"
+			returnQName="ns1:RequestSecurityTokenResponse" returnType="ns1:RequestSecurityTokenResponse">
+			<parameter qname="ns1:RequestSecurityToken" type="ns1:RequestSecurityToken" xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/04/trust"/>
+		</operation>
+ 	</service>
+</deployment>

Added: webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/undeploy.wsdd
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/undeploy.wsdd?rev=330974&view=auto
==============================================================================
--- webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/undeploy.wsdd
(added)
+++ webservices/wss4j/trunk/samples/org/apache/ws/sandbox/security/trust2/samples/undeploy.wsdd
Fri Nov  4 21:31:59 2005
@@ -0,0 +1,12 @@
+<!-- Use this file to undeploy some handlers/chains and services    -->
+<!-- Two ways to do this:                                           -->
+<!--   java org.apache.axis.client.AdminClient undeploy.wsdd        -->
+<!--      after the axis server is running                          -->
+<!-- or                                                             -->
+<!--   java org.apache.axis.utils.Admin client|server undeploy.wsdd -->
+<!--      from the same directory that the Axis engine runs         -->
+
+<undeployment
+    xmlns="http://xml.apache.org/axis/wsdd/">
+  <service name="SampleSecurityTokenService"/>
+</undeployment>
\ No newline at end of file

Added: webservices/wss4j/trunk/test/sandbox/PackageTests.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/test/sandbox/PackageTests.java?rev=330974&view=auto
==============================================================================
--- webservices/wss4j/trunk/test/sandbox/PackageTests.java (added)
+++ webservices/wss4j/trunk/test/sandbox/PackageTests.java Fri Nov  4 21:31:59 2005
@@ -0,0 +1,65 @@
+/*
+ * Copyright  2003-2004 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.
+ *
+ */
+
+/*
+ * Copyright  2003-2004 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 sandbox;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Test package for WS-Security tests
+ */
+public class PackageTests extends TestCase {
+
+    public PackageTests(String name) {
+        super(name);
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite();
+        suite.addTestSuite(TestTrust2.class);
+        return suite;
+    }
+
+    /**
+     * Main method
+     * <p/>
+     * 
+     * @param args command line args
+     */
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+}

Added: webservices/wss4j/trunk/test/sandbox/TestTrust2.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/test/sandbox/TestTrust2.java?rev=330974&view=auto
==============================================================================
--- webservices/wss4j/trunk/test/sandbox/TestTrust2.java (added)
+++ webservices/wss4j/trunk/test/sandbox/TestTrust2.java Fri Nov  4 21:31:59 2005
@@ -0,0 +1,66 @@
+/*
+ * Copyright  2003-2004 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 sandbox;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.apache.ws.axis.oasis.Scenario1;
+import org.apache.ws.sandbox.security.trust2.samples.SampleSecurityTokenServiceClient;
+
+/**
+ * WS-Trust Test Case
+ * <p/>
+ * 
+ * @author Davanum Srinivas (dims@yahoo.com)
+ */
+public class TestTrust2 extends TestCase {
+    /**
+     * TestScenario1 constructor
+     * <p/>
+     * 
+     * @param name name of the test
+     */
+    public TestTrust2(String name) {
+        super(name);
+    }
+
+    /**
+     * JUnit suite
+     * <p/>
+     * 
+     * @return a junit test suite
+     */
+    public static Test suite() {
+        return new TestSuite(TestTrust2.class);
+    }
+
+    /**
+     * Main method
+     * <p/>
+     * 
+     * @param args command line args
+     */
+    public static void main(String[] args) throws Exception {
+        Scenario1.main(args);
+    }
+
+    public void testScenario1() throws Exception {
+        SampleSecurityTokenServiceClient.main(new String[]{"-lhttp://localhost:8080/axis/services/SampleSecurityTokenService"});
+    }
+}



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


Mime
View raw message