cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1502505 - in /cxf/trunk/systests/ws-security/src/test: java/org/apache/cxf/systest/ws/tokens/ resources/org/apache/cxf/systest/ws/tokens/
Date Fri, 12 Jul 2013 10:37:02 GMT
Author: coheigea
Date: Fri Jul 12 10:37:01 2013
New Revision: 1502505

URL: http://svn.apache.org/r1502505
Log:
Added streaming supporting tokens test

Added:
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxServer.java
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxSupportingTokenTest.java
      - copied, changed from r1502504, cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
    cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/stax-server.xml
Modified:
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java

Added: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxServer.java?rev=1502505&view=auto
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxServer.java
(added)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxServer.java
Fri Jul 12 10:37:01 2013
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.cxf.systest.ws.tokens;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class StaxServer extends AbstractBusTestServerBase {
+
+    public StaxServer() {
+
+    }
+
+    protected void run()  {
+        URL busFile = StaxServer.class.getResource("stax-server.xml");
+        Bus busLocal = new SpringBusFactory().createBus(busFile);
+        BusFactory.setDefaultBus(busLocal);
+        setBus(busLocal);
+
+        try {
+            new StaxServer();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

Copied: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxSupportingTokenTest.java
(from r1502504, cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxSupportingTokenTest.java?p2=cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxSupportingTokenTest.java&p1=cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java&r1=1502504&r2=1502505&rev=1502505&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/StaxSupportingTokenTest.java
Fri Jul 12 10:37:01 2013
@@ -36,9 +36,11 @@ import org.junit.BeforeClass;
 /**
  * This is a test for various properties associated with SupportingTokens, i.e.
  * Signed, Encrypted etc.
+ * 
+ * It tests both DOM + StAX clients against the StAX server
  */
-public class SupportingTokenTest extends AbstractBusClientServerTestBase {
-    static final String PORT = allocatePort(Server.class);
+public class StaxSupportingTokenTest extends AbstractBusClientServerTestBase {
+    static final String PORT = allocatePort(StaxServer.class);
     
     private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
     private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
@@ -49,7 +51,7 @@ public class SupportingTokenTest extends
             "Server failed to launch",
             // run the server in the same process
             // set this to false to fork
-            launchServer(Server.class, true)
+            launchServer(StaxServer.class, true)
         );
     }
     
@@ -63,19 +65,25 @@ public class SupportingTokenTest extends
     public void testSignedSupporting() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = SupportingTokenTest.class.getResource("client.xml");
+        URL busFile = StaxSupportingTokenTest.class.getResource("client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);
         SpringBusFactory.setThreadDefaultBus(bus);
 
-        URL wsdl = SupportingTokenTest.class.getResource("DoubleItTokens.wsdl");
+        URL wsdl = StaxSupportingTokenTest.class.getResource("DoubleItTokens.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
        
         // Successful invocation
         QName portQName = new QName(NAMESPACE, "DoubleItSignedSupportingPort");
         DoubleItPortType port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
+        
+        // DOM
+        port.doubleIt(25);
+        
+        // Streaming
+        SecurityTestUtil.enableStreaming(port);
         port.doubleIt(25);
         
         // This should fail, as the client is not signing the UsernameToken
@@ -83,27 +91,50 @@ public class SupportingTokenTest extends
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not signing the UsernameToken");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            String error = "The received token does not match the signed supporting token
requirement";
+            String error = "UsernameToken not satisfied";
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not signing the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "UsernameToken not satisfied";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
+        
         // This should fail, as the client is (encrypting) but not signing the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItSignedSupportingPort3");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not signing the UsernameToken");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            String error = "The received token does not match the signed supporting token
requirement";
+            String error = "UsernameToken not satisfied";
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not signing the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "UsernameToken not satisfied";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -112,19 +143,25 @@ public class SupportingTokenTest extends
     public void testEncryptedSupporting() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = SupportingTokenTest.class.getResource("client.xml");
+        URL busFile = StaxSupportingTokenTest.class.getResource("client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);
         SpringBusFactory.setThreadDefaultBus(bus);
 
-        URL wsdl = SupportingTokenTest.class.getResource("DoubleItTokens.wsdl");
+        URL wsdl = StaxSupportingTokenTest.class.getResource("DoubleItTokens.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
        
         // Successful invocation
         QName portQName = new QName(NAMESPACE, "DoubleItEncryptedSupportingPort");
         DoubleItPortType port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
+        
+        // DOM
+        port.doubleIt(25);
+        
+        // Streaming
+        SecurityTestUtil.enableStreaming(port);
         port.doubleIt(25);
         
         // This should fail, as the client is not encrypting the UsernameToken
@@ -132,27 +169,49 @@ public class SupportingTokenTest extends
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not encrypting the UsernameToken");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            String error = "The received token does not match the encrypted supporting token
requirement";
+            String error = "UsernameToken not satisfied";
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not encrypting the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "UsernameToken not satisfied";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         // This should fail, as the client is (signing) but not encrypting the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItEncryptedSupportingPort3");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not encrypting the UsernameToken");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            String error = "The received token does not match the encrypted supporting token
requirement";
+            String error = "UsernameToken not satisfied";
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not encrypting the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "UsernameToken not satisfied";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -161,19 +220,25 @@ public class SupportingTokenTest extends
     public void testSignedEncryptedSupporting() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = SupportingTokenTest.class.getResource("client.xml");
+        URL busFile = StaxSupportingTokenTest.class.getResource("client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);
         SpringBusFactory.setThreadDefaultBus(bus);
 
-        URL wsdl = SupportingTokenTest.class.getResource("DoubleItTokens.wsdl");
+        URL wsdl = StaxSupportingTokenTest.class.getResource("DoubleItTokens.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
        
         // Successful invocation
         QName portQName = new QName(NAMESPACE, "DoubleItSignedEncryptedSupportingPort");
         DoubleItPortType port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
+        
+        // DOM
+        port.doubleIt(25);
+        
+        // Streaming
+        SecurityTestUtil.enableStreaming(port);
         port.doubleIt(25);
         
         // This should fail, as the client is not encrypting the UsernameToken
@@ -181,30 +246,49 @@ public class SupportingTokenTest extends
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not encrypting the UsernameToken");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            String error = 
-                "The received token does not match the signed encrypted supporting token
requirement";
+            String error = "UsernameToken not satisfied";
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not encrypting the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "UsernameToken not satisfied";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         // This should fail, as the client is (encrypting) but not signing the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItSignedEncryptedSupportingPort3");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not encrypting the UsernameToken");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            String error = 
-                "The received token does not match the signed encrypted supporting token
requirement";
-            
+            String error = "UsernameToken not satisfied";
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not encrypting the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "UsernameToken not satisfied";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java?rev=1502505&r1=1502504&r2=1502505&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
Fri Jul 12 10:37:01 2013
@@ -36,6 +36,8 @@ import org.junit.BeforeClass;
 /**
  * This is a test for various properties associated with SupportingTokens, i.e.
  * Signed, Encrypted etc.
+ * 
+ * It tests both DOM + StAX clients against the DOM server
  */
 public class SupportingTokenTest extends AbstractBusClientServerTestBase {
     static final String PORT = allocatePort(Server.class);
@@ -76,6 +78,12 @@ public class SupportingTokenTest extends
         QName portQName = new QName(NAMESPACE, "DoubleItSignedSupportingPort");
         DoubleItPortType port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
+        
+        // DOM
+        port.doubleIt(25);
+        
+        // Streaming
+        SecurityTestUtil.enableStreaming(port);
         port.doubleIt(25);
         
         // This should fail, as the client is not signing the UsernameToken
@@ -83,6 +91,7 @@ public class SupportingTokenTest extends
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not signing the UsernameToken");
@@ -91,11 +100,23 @@ public class SupportingTokenTest extends
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not signing the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "The received token does not match the signed supporting token
requirement";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
+        
         // This should fail, as the client is (encrypting) but not signing the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItSignedSupportingPort3");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not signing the UsernameToken");
@@ -104,6 +125,16 @@ public class SupportingTokenTest extends
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not signing the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "The received token does not match the signed supporting token
requirement";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -125,6 +156,12 @@ public class SupportingTokenTest extends
         QName portQName = new QName(NAMESPACE, "DoubleItEncryptedSupportingPort");
         DoubleItPortType port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
+        
+        // DOM
+        port.doubleIt(25);
+        
+        // Streaming
+        SecurityTestUtil.enableStreaming(port);
         port.doubleIt(25);
         
         // This should fail, as the client is not encrypting the UsernameToken
@@ -132,6 +169,7 @@ public class SupportingTokenTest extends
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not encrypting the UsernameToken");
@@ -140,11 +178,22 @@ public class SupportingTokenTest extends
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not encrypting the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "The received token does not match the encrypted supporting
token requirement";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         // This should fail, as the client is (signing) but not encrypting the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItEncryptedSupportingPort3");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not encrypting the UsernameToken");
@@ -153,6 +202,16 @@ public class SupportingTokenTest extends
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not encrypting the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = "The received token does not match the encrypted supporting
token requirement";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
@@ -174,6 +233,12 @@ public class SupportingTokenTest extends
         QName portQName = new QName(NAMESPACE, "DoubleItSignedEncryptedSupportingPort");
         DoubleItPortType port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
+        
+        // DOM
+        port.doubleIt(25);
+        
+        // Streaming
+        SecurityTestUtil.enableStreaming(port);
         port.doubleIt(25);
         
         // This should fail, as the client is not encrypting the UsernameToken
@@ -181,6 +246,7 @@ public class SupportingTokenTest extends
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not encrypting the UsernameToken");
@@ -190,21 +256,43 @@ public class SupportingTokenTest extends
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not encrypting the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            // String error = 
+            //    "The received token does not match the signed encrypted supporting token
requirement";
+            // assertTrue(ex.getMessage().contains(error));
+        }
+        
         // This should fail, as the client is (encrypting) but not signing the UsernameToken
         portQName = new QName(NAMESPACE, "DoubleItSignedEncryptedSupportingPort3");
         port = service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(port, PORT);
         
+        // DOM
         try {
             port.doubleIt(25);
             fail("Failure expected on not encrypting the UsernameToken");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
             String error = 
                 "The received token does not match the signed encrypted supporting token
requirement";
-            
             assertTrue(ex.getMessage().contains(error));
         }
         
+        // Streaming
+        try {
+            SecurityTestUtil.enableStreaming(port);
+            port.doubleIt(25);
+            fail("Failure expected on not encrypting the UsernameToken");
+        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+            //String error = 
+            //    "The received token does not match the signed encrypted supporting token
requirement";
+            //assertTrue(ex.getMessage().contains(error));
+        }
+        
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }

Added: cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/stax-server.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/stax-server.xml?rev=1502505&view=auto
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/stax-server.xml
(added)
+++ cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/stax-server.xml
Fri Jul 12 10:37:01 2013
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:jaxws="http://cxf.apache.org/jaxws"
+    xmlns:http="http://cxf.apache.org/transports/http/configuration"
+    xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+    xmlns:sec="http://cxf.apache.org/configuration/security"
+    xmlns:cxf="http://cxf.apache.org/core"
+    xmlns:p="http://cxf.apache.org/policy"
+    xsi:schemaLocation="
+        http://www.springframework.org/schema/beans                     http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://cxf.apache.org/jaxws                                     http://cxf.apache.org/schemas/jaxws.xsd
+        http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+        http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+        http://cxf.apache.org/transports/http/configuration             http://cxf.apache.org/schemas/configuration/http-conf.xsd
+        http://cxf.apache.org/transports/http-jetty/configuration       http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+        http://cxf.apache.org/configuration/security                    http://cxf.apache.org/schemas/configuration/security.xsd
+        http://www.w3.org/ns/ws-policy                                  http://www.w3.org/2007/02/ws-policy.xsd
+    ">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+    
+    <cxf:bus>
+        <cxf:features>
+            <p:policies/>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    
+	<jaxws:endpoint id="SignedSupportingTokens"
+		address="http://localhost:${testutil.ports.StaxServer}/DoubleItSignedSupporting"
+		serviceName="s:DoubleItService" endpointName="s:DoubleItSignedSupportingPort"
+		xmlns:s="http://www.example.org/contract/DoubleIt" 
+		implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+		wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+		<jaxws:properties>
+			<entry key="ws-security.callback-handler"
+				value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+			<entry key="ws-security.signature.properties" value="bob.properties" />
+			<entry key="ws-security.encryption.username" value="useReqSigCert" />
+			<entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+			<entry key="ws-security.enable.streaming" value="true"/>
+		</jaxws:properties>
+		<jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+	</jaxws:endpoint>
+	
+	<jaxws:endpoint id="SignedSupportingTokens2"
+        address="http://localhost:${testutil.ports.StaxServer}/DoubleItSignedSupporting2"
+        serviceName="s:DoubleItService" endpointName="s:DoubleItSignedSupportingPort2"
+        xmlns:s="http://www.example.org/contract/DoubleIt" 
+        implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+        wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler"
+                value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+            <entry key="ws-security.signature.properties" value="bob.properties" />
+            <entry key="ws-security.encryption.username" value="useReqSigCert" />
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+    </jaxws:endpoint>
+    
+    <jaxws:endpoint id="SignedSupportingTokens3"
+        address="http://localhost:${testutil.ports.StaxServer}/DoubleItSignedSupporting3"
+        serviceName="s:DoubleItService" endpointName="s:DoubleItSignedSupportingPort3"
+        xmlns:s="http://www.example.org/contract/DoubleIt" 
+        implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+        wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler"
+                value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+            <entry key="ws-security.signature.properties" value="bob.properties" />
+            <entry key="ws-security.encryption.username" value="useReqSigCert" />
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+    </jaxws:endpoint>
+    
+    <jaxws:endpoint id="EncryptedSupportingTokens"
+        address="http://localhost:${testutil.ports.StaxServer}/DoubleItEncryptedSupporting"
+        serviceName="s:DoubleItService" endpointName="s:DoubleItEncryptedSupportingPort"
+        xmlns:s="http://www.example.org/contract/DoubleIt" 
+        implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+        wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler"
+                value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+            <entry key="ws-security.signature.properties" value="bob.properties" />
+            <entry key="ws-security.encryption.username" value="useReqSigCert" />
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/encrypted-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+    </jaxws:endpoint>
+    
+    <jaxws:endpoint id="EncryptedSupportingTokens2"
+        address="http://localhost:${testutil.ports.StaxServer}/DoubleItEncryptedSupporting2"
+        serviceName="s:DoubleItService" endpointName="s:DoubleItEncryptedSupportingPort2"
+        xmlns:s="http://www.example.org/contract/DoubleIt" 
+        implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+        wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler"
+                value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+            <entry key="ws-security.signature.properties" value="bob.properties" />
+            <entry key="ws-security.encryption.username" value="useReqSigCert" />
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/encrypted-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+    </jaxws:endpoint>
+    
+    <jaxws:endpoint id="EncryptedSupportingTokens3"
+        address="http://localhost:${testutil.ports.StaxServer}/DoubleItEncryptedSupporting3"
+        serviceName="s:DoubleItService" endpointName="s:DoubleItEncryptedSupportingPort3"
+        xmlns:s="http://www.example.org/contract/DoubleIt" 
+        implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+        wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler"
+                value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+            <entry key="ws-security.signature.properties" value="bob.properties" />
+            <entry key="ws-security.encryption.username" value="useReqSigCert" />
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/encrypted-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+    </jaxws:endpoint>
+    
+    <jaxws:endpoint id="SignedEncryptedSupportingTokens"
+        address="http://localhost:${testutil.ports.StaxServer}/DoubleItSignedEncryptedSupporting"
+        serviceName="s:DoubleItService" endpointName="s:DoubleItSignedEncryptedSupportingPort"
+        xmlns:s="http://www.example.org/contract/DoubleIt" 
+        implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+        wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler"
+                value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+            <entry key="ws-security.signature.properties" value="bob.properties" />
+            <entry key="ws-security.encryption.username" value="useReqSigCert" />
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-encrypted-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+    </jaxws:endpoint>
+    
+     <jaxws:endpoint id="SignedEncryptedSupportingTokens2"
+        address="http://localhost:${testutil.ports.StaxServer}/DoubleItSignedEncryptedSupporting2"
+        serviceName="s:DoubleItService" endpointName="s:DoubleItSignedEncryptedSupportingPort2"
+        xmlns:s="http://www.example.org/contract/DoubleIt" 
+        implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+        wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler"
+                value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+            <entry key="ws-security.signature.properties" value="bob.properties" />
+            <entry key="ws-security.encryption.username" value="useReqSigCert" />
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-encrypted-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+    </jaxws:endpoint>
+    
+     <jaxws:endpoint id="SignedEncryptedSupportingTokens3"
+        address="http://localhost:${testutil.ports.StaxServer}/DoubleItSignedEncryptedSupporting3"
+        serviceName="s:DoubleItService" endpointName="s:DoubleItSignedEncryptedSupportingPort3"
+        xmlns:s="http://www.example.org/contract/DoubleIt" 
+        implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+        wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler"
+                value="org.apache.cxf.systest.ws.common.UTPasswordCallback" />
+            <entry key="ws-security.signature.properties" value="bob.properties" />
+            <entry key="ws-security.encryption.username" value="useReqSigCert" />
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" 
+                    URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-encrypted-supp-token-policy.xml"
/>
+            </p:policies>
+        </jaxws:features>
+
+    </jaxws:endpoint>
+    
+</beans>



Mime
View raw message