Author: coheigea
Date: Tue Jan 21 14:17:14 2014
New Revision: 1560026

URL: http://svn.apache.org/r1560026
Log:
Adding streaming option to STS sample

Added:
    
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-client-stax.xml
    
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-server-stax.xml
    
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-sts-stax.xml
Modified:
    cxf/trunk/distribution/src/main/release/samples/sts/README.txt
    cxf/trunk/distribution/src/main/release/samples/sts/pom.xml
    
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/client/Client.java
    
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/server/Server.java
    
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/sts/Server.java
    
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt
    
cxf/trunk/distribution/src/main/release/samples/ws_security/ut_policy/README.txt

Modified: cxf/trunk/distribution/src/main/release/samples/sts/README.txt
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/README.txt?rev=1560026&r1=1560025&r2=1560026&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/README.txt (original)
+++ cxf/trunk/distribution/src/main/release/samples/sts/README.txt Tue Jan 21 
14:17:14 2014
@@ -12,6 +12,9 @@ provider. As the IssuedToken is defined 
 Asymmetric binding in the policy of the service provider, the client will use
 the associated secret key to sign various parts of the message.
 
+CXF 3.0.0 supports both a DOM-based (in-memory) and StAX-based (streaming)
+approach to WS-Security. This demo shows how to use both approaches.
+
 Please review the README in the samples directory before continuing.
 
 *** Requirements ***
@@ -34,9 +37,21 @@ located), the maven pom.xml file can be 
 Using either UNIX or Windows:
 
   mvn install (builds the demo)
+
+To use the DOM-based WS-Security functionality:
+
   mvn -Psts  (from one command line window)
-  mvn -Pserver  (from a second command line window)
-  mvn -Pclient  (from a third command line window)
+  mvn -Pserver  (from one command line window)
+  mvn -Pclient  (from a second command line window)
+
+To use the StAX-based WS-Security functionality:
+
+  mvn -Pstax-sts  (from one command line window)
+  mvn -Pstax-server  (from one command line window)
+  mvn -Pstax-client  (from a second command line window)
+
+You can also run the DOM client against the StAX server, and vice versa, or 
use the
+StAX STS with the DOM client, etc.
 
 To remove the code generated from the WSDL file and the .class
 files, run "mvn clean".

Modified: cxf/trunk/distribution/src/main/release/samples/sts/pom.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/pom.xml?rev=1560026&r1=1560025&r2=1560026&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/sts/pom.xml Tue Jan 21 
14:17:14 2014
@@ -115,15 +115,45 @@
                             <execution>
                                 <phase>test</phase>
                                 <goals>
-                                    <goal>exec</goal>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    
<mainClass>demo.wssec.sts.Server</mainClass>
+                                    <arguments>
+                                        
<argument>${basedir}/src/main/resources/wssec-sts.xml</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.cxf.services.sts</groupId>
+                    <artifactId>cxf-services-sts-core</artifactId>
+                    <version>${project.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>stax-sts</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
                                 </goals>
                                 <configuration>
-                                    <executable>java</executable>
+                                    
<mainClass>demo.wssec.sts.Server</mainClass>
                                     <arguments>
-                                        
<argument>-Djava.endorsed.dirs=${basedir}/target/endorsed</argument>
-                                        <argument>-classpath</argument>
-                                        <classpath/>
-                                        
<argument>demo.wssec.sts.Server</argument>
+                                        
<argument>${basedir}/src/main/resources/wssec-sts-stax.xml</argument>
                                     </arguments>
                                 </configuration>
                             </execution>
@@ -151,15 +181,38 @@
                             <execution>
                                 <phase>test</phase>
                                 <goals>
-                                    <goal>exec</goal>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    
<mainClass>demo.wssec.server.Server</mainClass>
+                                    <arguments>
+                                        
<argument>${basedir}/src/main/resources/wssec-server.xml</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>stax-server</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
                                 </goals>
                                 <configuration>
-                                    <executable>java</executable>
+                                    
<mainClass>demo.wssec.server.Server</mainClass>
                                     <arguments>
-                                        
<argument>-Djava.endorsed.dirs=${basedir}/target/endorsed</argument>
-                                        <argument>-classpath</argument>
-                                        <classpath/>
-                                        
<argument>demo.wssec.server.Server</argument>
+                                        
<argument>${basedir}/src/main/resources/wssec-server-stax.xml</argument>
                                     </arguments>
                                 </configuration>
                             </execution>
@@ -186,6 +239,34 @@
                                     
<mainClass>demo.wssec.client.Client</mainClass>
                                     <arguments>
                                         
<argument>${basedir}/wsdl/hello_world.wsdl</argument>
+                                        
<argument>${basedir}/src/main/resources/wssec-client.xml</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>stax-client</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    
<mainClass>demo.wssec.client.Client</mainClass>
+                                    <arguments>
+                                        
<argument>${basedir}/wsdl/hello_world.wsdl</argument>
+                                        
<argument>${basedir}/src/main/resources/wssec-client-stax.xml</argument>
                                     </arguments>
                                 </configuration>
                             </execution>
@@ -225,5 +306,15 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-jdk14</artifactId>
+            <version>1.7.5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+            <version>1.7.5</version>
+        </dependency>
     </dependencies>
 </project>

Modified: 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/client/Client.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/client/Client.java?rev=1560026&r1=1560025&r2=1560026&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/client/Client.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/client/Client.java
 Tue Jan 21 14:17:14 2014
@@ -44,8 +44,8 @@ public final class Client {
 
     public static void main(String args[]) throws Exception {
         
-        if (args.length == 0) {
-            System.out.println("please specify wsdl");
+        if (args.length < 2) {
+            System.out.println("please specify wsdl and configuration file");
             System.exit(1);
         }
         
@@ -58,7 +58,13 @@ public final class Client {
         }
         
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = new ClassPathResource("wssec-client.xml").getURL();
+        URL busURL;
+        File busFile = new File(args[1]);
+        if (busFile.exists()) {
+            busURL = busFile.toURI().toURL();
+        } else {
+            busURL = new URL(args[1]);
+        }
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);

Modified: 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/server/Server.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/server/Server.java?rev=1560026&r1=1560025&r2=1560026&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/server/Server.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/server/Server.java
 Tue Jan 21 14:17:14 2014
@@ -19,9 +19,9 @@
 
 package demo.wssec.server;
 
+import java.io.File;
 import java.net.URL;
 
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
@@ -29,18 +29,31 @@ import org.springframework.core.io.Class
 
 public class Server {
 
-    protected Server() throws Exception {
+    protected Server(URL busURL) throws Exception {
         System.out.println("Starting Server");
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = new ClassPathResource("wssec-server.xml").getURL();
-        Bus bus = bf.createBus(busFile.toString());
+        Bus bus = bf.createBus(busURL.toString());
         BusFactory.setDefaultBus(bus);
     }
 
     public static void main(String args[]) throws Exception {
+
+        if (args.length == 0) {
+            System.out.println("please specify configuration file");
+            System.exit(1);
+        }
+
+        URL busURL;
+        File busFile = new File(args[0]);
+        if (busFile.exists()) {
+            busURL = busFile.toURI().toURL();
+        } else {
+            busURL = new URL(args[0]);
+        }
+
         System.out.println();
-        new Server();
+        new Server(busURL);
         System.out.println("Server ready...");
 
         Thread.sleep(5 * 60 * 1000);

Modified: 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/sts/Server.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/sts/Server.java?rev=1560026&r1=1560025&r2=1560026&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/sts/Server.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/java/demo/wssec/sts/Server.java
 Tue Jan 21 14:17:14 2014
@@ -19,6 +19,7 @@
 
 package demo.wssec.sts;
 
+import java.io.File;
 import java.net.URL;
 
 import org.apache.cxf.Bus;
@@ -28,18 +29,31 @@ import org.springframework.core.io.Class
 
 public class Server {
 
-    protected Server() throws Exception {
-        System.out.println("Starting STS");
+    protected Server(URL busURL) throws Exception {
+        System.out.println("Starting Server");
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = new ClassPathResource("wssec-sts.xml").getURL();
-        Bus bus = bf.createBus(busFile.toString());
+        Bus bus = bf.createBus(busURL.toString());
         BusFactory.setDefaultBus(bus);
     }
 
     public static void main(String args[]) throws Exception {
+
+        if (args.length == 0) {
+            System.out.println("please specify configuration file");
+            System.exit(1);
+        }
+
+        URL busURL;
+        File busFile = new File(args[0]);
+        if (busFile.exists()) {
+            busURL = busFile.toURI().toURL();
+        } else {
+            busURL = new URL(args[0]);
+        }
+
         System.out.println();
-        new Server();
+        new Server(busURL);
         System.out.println("Server ready...");
 
         Thread.sleep(5 * 60 * 1000);

Added: 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-client-stax.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-client-stax.xml?rev=1560026&view=auto
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-client-stax.xml
 (added)
+++ 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-client-stax.xml
 Tue Jan 21 14:17:14 2014
@@ -0,0 +1,61 @@
+<?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:cxf="http://cxf.apache.org/core"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:sec="http://cxf.apache.org/configuration/security"; 
xmlns:http="http://cxf.apache.org/transports/http/configuration"; 
xmlns:jaxws="http://cxf.apache.org/jaxws"; xsi:schemaLocation="            
http://cxf.apache.org/core            http://cxf.apache.org/schemas/core.xsd    
        http://cxf.apache.org/configuration/security            
http://cxf.apache.org/schemas/configuration/security.xsd            
http://cxf.apache.org/jaxws            http://cxf.apache.org/schemas/jaxws.xsd  
          http://cxf.apache.org/transports/http/configuration            
http://cxf.apache.org/schemas/configuration/http-conf.xsd            
http://www.springframework.org/schema/beans            
http://www.springframework.org/schema/beans/spring-beans.xsd";>
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapPort"; 
createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="ws-security.signature.properties" 
value="clientKeystore.properties"/>
+            <entry key="ws-security.signature.username" value="myclientkey"/>
+            <entry key="ws-security.callback-handler" 
value="demo.wssec.client.ClientCallbackHandler"/>
+            <entry key="ws-security.encryption.properties" 
value="clientKeystore.properties"/>
+            <entry key="ws-security.encryption.username" value="myservicekey"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+            <entry key="ws-security.sts.client">
+                <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                    <constructor-arg ref="cxf"/>
+                    <property name="wsdlLocation" 
value="http://localhost:8080/SecurityTokenService/UT?wsdl"/>
+                    <property name="serviceName" 
value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
+                    <property name="endpointName" 
value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}UT_Port"/>
+                    <property name="properties">
+                        <map>
+                            <entry key="ws-security.username" value="alice"/>
+                            <entry key="ws-security.callback-handler" 
value="demo.wssec.client.ClientCallbackHandler"/>
+                            <entry key="ws-security.encryption.properties" 
value="clientKeystore.properties"/>
+                            <entry key="ws-security.encryption.username" 
value="mystskey"/>
+                            <!-- Because of the PublicKey requirement in the 
InitiatorToken element
+                                in the WSP WSDL, the client needs to have the 
STS add its public
+                                key to the SAML assertion, as configured in 
the three lines below.  
+                           -->
+                            <entry key="ws-security.sts.token.username" 
value="myclientkey"/>
+                            <entry key="ws-security.sts.token.properties" 
value="clientKeystore.properties"/>
+                            <!-- If usecert = true, sends entire certificate 
in an X509Certificate element, else
+                                sends cert ID in a KeyValue element -->
+                            <entry key="ws-security.sts.token.usecert" 
value="true"/>
+                        </map>
+                    </property>
+                </bean>
+            </entry>
+        </jaxws:properties>
+    </jaxws:client>
+</beans>

Added: 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-server-stax.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-server-stax.xml?rev=1560026&view=auto
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-server-stax.xml
 (added)
+++ 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-server-stax.xml
 Tue Jan 21 14:17:14 2014
@@ -0,0 +1,35 @@
+<?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:cxf="http://cxf.apache.org/core"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:sec="http://cxf.apache.org/configuration/security"; 
xmlns:http="http://cxf.apache.org/transports/http/configuration"; 
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"; 
xmlns:jaxws="http://cxf.apache.org/jaxws"; xsi:schemaLocation="             
http://cxf.apache.org/core             http://cxf.apache.org/schemas/core.xsd   
           http://cxf.apache.org/configuration/security                       
http://cxf.apache.org/schemas/configuration/security.xsd             
http://cxf.apache.org/jaxws             http://cxf.apache.org/schemas/jaxws.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-jett
 y.xsd             http://www.springframework.org/schema/beans             
http://www.springframework.org/schema/beans/spring-beans.xsd";>
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    <jaxws:endpoint xmlns:s="http://apache.org/hello_world_soap_http"; 
id="server" implementor="demo.wssec.server.GreeterImpl" 
endpointName="s:SoapPort" serviceName="s:SOAPService" 
address="http://localhost:9001/SoapContext/SoapPort"; 
wsdlLocation="wsdl/hello_world.wsdl">
+        <jaxws:properties>
+            <entry key="ws-security.signature.username" value="myservicekey"/>
+            <entry key="ws-security.callback-handler" 
value="demo.wssec.server.ServerCallbackHandler"/>
+            <entry key="ws-security.signature.properties" 
value="serviceKeystore.properties"/>
+            <entry key="ws-security.encryption.properties" 
value="serviceKeystore.properties"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+</beans>

Added: 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-sts-stax.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-sts-stax.xml?rev=1560026&view=auto
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-sts-stax.xml
 (added)
+++ 
cxf/trunk/distribution/src/main/release/samples/sts/src/main/resources/wssec-sts-stax.xml
 Tue Jan 21 14:17:14 2014
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--
+  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:cxf="http://cxf.apache.org/core"; 
xmlns:jaxws="http://cxf.apache.org/jaxws"; 
xmlns:test="http://apache.org/hello_world_soap_http"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:util="http://www.springframework.org/schema/util"; xsi:schemaLocation="    
     http://cxf.apache.org/core         http://cxf.apache.org/schemas/core.xsd  
       http://www.springframework.org/schema/beans         
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd         
http://cxf.apache.org/jaxws                                              
http://cxf.apache.org/schemas/jaxws.xsd         
http://www.springframework.org/schema/util         
http://www.springframework.org/schema/util/spring-util-2.0.xsd";>
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    <bean id="utSTSProviderBean" 
class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
+        <property name="issueOperation" ref="utIssueDelegate"/>
+        <property name="validateOperation" ref="utValidateDelegate"/>
+    </bean>
+    <bean id="utIssueDelegate" 
class="org.apache.cxf.sts.operation.TokenIssueOperation">
+        <property name="tokenProviders" ref="utSamlTokenProvider"/>
+        <property name="services" ref="utService"/>
+        <property name="stsProperties" ref="utSTSProperties"/>
+    </bean>
+    <bean id="utValidateDelegate" 
class="org.apache.cxf.sts.operation.TokenValidateOperation">
+        <property name="tokenValidators" ref="utSamlTokenValidator"/>
+        <property name="stsProperties" ref="utSTSProperties"/>
+    </bean>
+    <bean id="utSamlTokenProvider" 
class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
+    </bean>
+    <bean id="utSamlTokenValidator" 
class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
+    </bean>
+    <bean id="utService" class="org.apache.cxf.sts.service.StaticService">
+        <property name="endpoints" ref="utEndpoints"/>
+    </bean>
+    <util:list id="utEndpoints">
+        <value>http://localhost:(\d)*/SoapContext/SoapPort</value>
+    </util:list>
+    <bean id="utSTSProperties" class="org.apache.cxf.sts.StaticSTSProperties">
+        <property name="signaturePropertiesFile" 
value="stsKeystore.properties"/>
+        <property name="signatureUsername" value="mystskey"/>
+        <property name="callbackHandlerClass" 
value="demo.wssec.sts.STSCallbackHandler"/>
+        <property name="issuer" value="DoubleItSTSIssuer"/>
+    </bean>
+    <jaxws:endpoint 
xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"; id="UTSTS" 
implementor="#utSTSProviderBean" 
address="http://localhost:8080/SecurityTokenService/UT"; 
wsdlLocation="wsdl/ws-trust-1.4-service.wsdl" 
serviceName="ns1:SecurityTokenService" endpointName="ns1:UT_Port">
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler" 
value="demo.wssec.sts.STSCallbackHandler"/>
+            <entry key="ws-security.signature.properties" 
value="stsKeystore.properties"/>
+            <entry key="ws-security.signature.username" value="mystskey"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+</beans>

Modified: 
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt?rev=1560026&r1=1560025&r2=1560026&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc_policy/README.txt
 Tue Jan 21 14:17:14 2014
@@ -43,6 +43,8 @@ To use the StAX-based WS-Security functi
   mvn -Pstax-server  (from one command line window)
   mvn -Pstax-client  (from a second command line window)
 
+You can also run the DOM client against the StAX server, and vice versa.
+
 On startup, the client makes one invocation.
 
 To remove the code generated from the WSDL file and the .class

Modified: 
cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt?rev=1560026&r1=1560025&r2=1560026&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt 
(original)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt 
Tue Jan 21 14:17:14 2014
@@ -52,6 +52,8 @@ To use the StAX-based WS-Security functi
   mvn -Pstax-server  (from one command line window)
   mvn -Pstax-client  (from a second command line window)
 
+You can also run the DOM client against the StAX server, and vice versa.
+
 On startup, the client makes a sequence of 4 two-way invocations.
 
 To remove the code generated from the WSDL file and the .class

Modified: 
cxf/trunk/distribution/src/main/release/samples/ws_security/ut_policy/README.txt
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/ut_policy/README.txt?rev=1560026&r1=1560025&r2=1560026&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/ws_security/ut_policy/README.txt
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/ws_security/ut_policy/README.txt
 Tue Jan 21 14:17:14 2014
@@ -43,6 +43,8 @@ To use the StAX-based WS-Security functi
   mvn -Pstax-server  (from one command line window)
   mvn -Pstax-client  (from a second command line window)
 
+You can also run the DOM client against the StAX server, and vice versa.
+
 On startup, the client makes one invocation.
 
 You can also try mvn -Pclient.unauthenticated to show that the policy


Reply via email to