You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by we...@apache.org on 2004/05/30 11:25:24 UTC

cvs commit: ws-fx/wss4j/test/interop TestSTScenario4.java TestSTScenario2.java TestSTScenario3.java PackageTests.java

werner      2004/05/30 02:25:24

  Modified:    wss4j/test/wssec TestWSSecurityST2.java
                        TestWSSecurityST3.java
               wss4j/test/interop PackageTests.java
  Added:       wss4j/test/interop TestSTScenario4.java TestSTScenario2.java
                        TestSTScenario3.java
  Log:
  Enhance WSS4J Axis drivers to support SAML token. Note: this
  is not a full support yet.
  
  Revision  Changes    Path
  1.2       +3 -3      ws-fx/wss4j/test/wssec/TestWSSecurityST2.java
  
  Index: TestWSSecurityST2.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/wss4j/test/wssec/TestWSSecurityST2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestWSSecurityST2.java	26 May 2004 19:16:35 -0000	1.1
  +++ TestWSSecurityST2.java	30 May 2004 09:25:23 -0000	1.2
  @@ -138,8 +138,7 @@
        */
       public void testSAMLSignedSenderVouches() throws Exception {
           SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
  -        SOAPEnvelope envelope = null;
  -        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml.properties");
  +        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml3.properties");
   
           SAMLAssertion assertion = saml.newAssertion();
   
  @@ -149,8 +148,9 @@
           WSSignEnvelope wsSign = new WSSignEnvelope();
           wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
   
  -        Document doc = unsignedEnvelope.getAsDocument();
           log.info("Before SAMLSignedSenderVouches....");
  +        
  +        Document doc = unsignedEnvelope.getAsDocument();
           
           Document signedDoc = wsSign.build(doc, null, assertion, issuerCrypto, issuerKeyName, issuerKeyPW);
           log.info("After SAMLSignedSenderVouches....");
  
  
  
  1.2       +1 -1      ws-fx/wss4j/test/wssec/TestWSSecurityST3.java
  
  Index: TestWSSecurityST3.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/wss4j/test/wssec/TestWSSecurityST3.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestWSSecurityST3.java	26 May 2004 19:16:35 -0000	1.1
  +++ TestWSSecurityST3.java	30 May 2004 09:25:23 -0000	1.2
  @@ -142,7 +142,7 @@
   
           Document doc = unsignedEnvelope.getAsDocument();
           
  -        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml3.properties");
  +        SAMLIssuer saml = SAMLIssuerFactory.getInstance("saml4.properties");
           // Provide info to SAML issuer that it can construct a Holder-of-key
           // SAML token.
           saml.setInstanceDoc(doc);
  
  
  
  1.5       +2 -0      ws-fx/wss4j/test/interop/PackageTests.java
  
  Index: PackageTests.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/wss4j/test/interop/PackageTests.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PackageTests.java	17 May 2004 04:15:01 -0000	1.4
  +++ PackageTests.java	30 May 2004 09:25:23 -0000	1.5
  @@ -58,6 +58,8 @@
      		suite.addTestSuite(TestScenario6.class); 
   		suite.addTestSuite(TestScenario7.class); 
           suite.addTestSuite(TestSTScenario1.class);
  +        suite.addTestSuite(TestSTScenario3.class);
  +        suite.addTestSuite(TestSTScenario4.class);
           return suite;
       }
   
  
  
  
  1.1                  ws-fx/wss4j/test/interop/TestSTScenario4.java
  
  Index: TestSTScenario4.java
  ===================================================================
  /*
   * 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 interop;
  
  import junit.framework.Test;
  import junit.framework.TestCase;
  import junit.framework.TestSuite;
  import org.apache.ws.axis.oasis.STScenario4;
  
  /**
   * WS-Security Test Case
   * <p/>
   * 
   * @author Davanum Srinivas (dims@yahoo.com)
   */
  public class TestSTScenario4 extends TestCase {
      /**
       * TestScenario1 constructor
       * <p/>
       * 
       * @param name name of the test
       */
      public TestSTScenario4(String name) {
          super(name);
      }
  
      /**
       * JUnit suite
       * <p/>
       * 
       * @return a junit test suite
       */
      public static Test suite() {
          return new TestSuite(TestSTScenario4.class);
      }
  
      /**
       * Main method
       * <p/>
       * 
       * @param args command line args
       */
      public static void main(String[] args) throws Exception {
          STScenario4.main(args);
      }
  
      public void testSTScenario4() throws Exception {
          STScenario4.main(new String[]{"-lhttp://localhost:8080/axis/services/STPing4"});
      }
  }
  
  
  
  1.1                  ws-fx/wss4j/test/interop/TestSTScenario2.java
  
  Index: TestSTScenario2.java
  ===================================================================
  /*
   * 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 interop;
  
  import junit.framework.Test;
  import junit.framework.TestCase;
  import junit.framework.TestSuite;
  import org.apache.ws.axis.oasis.STScenario1;
  
  /**
   * WS-Security Test Case
   * <p/>
   * 
   * @author Davanum Srinivas (dims@yahoo.com)
   */
  public class TestSTScenario2 extends TestCase {
      /**
       * TestScenario1 constructor
       * <p/>
       * 
       * @param name name of the test
       */
      public TestSTScenario2(String name) {
          super(name);
      }
  
      /**
       * JUnit suite
       * <p/>
       * 
       * @return a junit test suite
       */
      public static Test suite() {
          return new TestSuite(TestSTScenario2.class);
      }
  
      /**
       * Main method
       * <p/>
       * 
       * @param args command line args
       */
      public static void main(String[] args) throws Exception {
          STScenario1.main(args);
      }
  
      public void testSTScenario1() throws Exception {
          STScenario1.main(new String[]{"-lhttp://localhost:8080/axis/services/STPing1"});
      }
  }
  
  
  
  1.1                  ws-fx/wss4j/test/interop/TestSTScenario3.java
  
  Index: TestSTScenario3.java
  ===================================================================
  /*
   * 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 interop;
  
  import junit.framework.Test;
  import junit.framework.TestCase;
  import junit.framework.TestSuite;
  import org.apache.ws.axis.oasis.STScenario3;
  
  /**
   * WS-Security Test Case
   * <p/>
   * 
   * @author Davanum Srinivas (dims@yahoo.com)
   */
  public class TestSTScenario3 extends TestCase {
      /**
       * TestScenario1 constructor
       * <p/>
       * 
       * @param name name of the test
       */
      public TestSTScenario3(String name) {
          super(name);
      }
  
      /**
       * JUnit suite
       * <p/>
       * 
       * @return a junit test suite
       */
      public static Test suite() {
          return new TestSuite(TestSTScenario3.class);
      }
  
      /**
       * Main method
       * <p/>
       * 
       * @param args command line args
       */
      public static void main(String[] args) throws Exception {
          STScenario3.main(args);
      }
  
      public void testSTScenario3() throws Exception {
          STScenario3.main(new String[]{"-lhttp://localhost:8080/axis/services/STPing3"});
      }
  }