You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/06/15 20:10:45 UTC

svn commit: r784893 [1/3] - in /cxf/trunk/distribution/src/main/release/samples/ws_security: sign_enc/ sign_enc/etc/ sign_enc/keystore/ sign_enc/src/ sign_enc/src/demo/ sign_enc/src/demo/wssec/ sign_enc/src/demo/wssec/client/ sign_enc/src/demo/wssec/co...

Author: dkulp
Date: Mon Jun 15 18:10:43 2009
New Revision: 784893

URL: http://svn.apache.org/viewvc?rev=784893&view=rev
Log:
First part of CXF-2285.  Stuff from Mayank Mishra added, but needs some
changes for the maven poms to work.

Added:
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/README.txt   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/build.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Encrypt.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Sign.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_Decrypt.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_SignVerf.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-keystore.jks
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-truststore.jks
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-keystore.jks
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-truststore.jks
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/logging.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/pom.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/Client.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/UTPasswordCallback.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/wssec.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/common/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/common/ConciseFormatter.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/GreeterImpl.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/Server.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/UTPasswordCallback.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/wssec.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/
    cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/hello_world_wssec.wsdl   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/build.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/logging.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/pom.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/client/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/client/Client.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/client/UTPasswordCallback.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/client/wssec.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/common/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/common/ConciseFormatter.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/server/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/server/GreeterImpl.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/server/Server.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/server/UTPasswordCallback.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/src/demo/wssec/server/wssec.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/wsdl/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut/wsdl/hello_world_wssec.wsdl   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/README.txt   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/build.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/etc/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/etc/Client_Encrypt.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/etc/Client_Sign.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/etc/Server_Decrypt.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/etc/Server_SignVerf.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/keystore/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/keystore/client-keystore.jks
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/keystore/client-truststore.jks
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/keystore/server-keystore.jks
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/keystore/server-truststore.jks
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/logging.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/pom.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/client/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/client/Client.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/client/UTPasswordCallback.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/client/wssec.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/common/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/common/ConciseFormatter.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/server/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/server/GreeterImpl.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/server/Server.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/server/UTPasswordCallback.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/src/demo/wssec/server/wssec.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/wsdl/
    cxf/trunk/distribution/src/main/release/samples/ws_security/ut_sign/wsdl/hello_world_wssec.wsdl   (with props)

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/README.txt?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/README.txt (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/README.txt Mon Jun 15 18:10:43 2009
@@ -0,0 +1,146 @@
+WS-Security Demo  (Signature and Encryption)
+=================
+
+This demo shows how WS-Security support in Apache CXF may be enabled.
+
+WS-Security can be configured to the Client and Server endpoints by adding WSS4JInterceptors.
+Both Server and Client can be configured for outgoing and incoming interceptors. Various Actions like,
+Timestamp, UsernameToken, Signature, Encryption, etc., can be applied to the interceptors by passing
+appropriate configuration properties.
+
+The logging feature is used to log the inbound and outbound
+SOAP messages and display these to the console.
+
+In all other respects this demo is based on the basic hello_world sample.
+
+Please review the README in the samples directory before continuing.
+
+
+Prerequisite
+------------
+
+If your environment already includes cxf-manifest.jar on the CLASSPATH,
+and the JDK and ant bin directories on the PATH, it is not necessary to
+run the environment script described in the samples directory README.
+If your environment is not properly configured, or if you are planning
+on using wsdl2java, javac, and java to build and run the demos, you must
+set the environment by running the script.
+
+
+*** Requirements ***
+
+The samples in this directory use STRONG encryption.  The default encryption algorithms
+included in a JRE is not adequate for these samples.   The Java Cryptography Extension
+(JCE) Unlimited Strength Jurisdiction Policy Files available on Sun's JDK download
+page[3] *must* be installed for the examples to work.   If you get errors about invalid
+key lengths, the Unlimited Strength files are not installed.
+
+[3] http://java.sun.com/javase/downloads/index.jsp
+
+
+Building and running the demo using Ant
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the Ant build.xml file can be used to build and run the demo.
+The server and client targets automatically build the demo.
+
+Using either UNIX or Windows:
+
+  ant server  (from one command line window)
+  ant client  (from a second command line window)
+
+On startup, the client makes a sequence of 4 two-way invocations.
+
+To remove the code generated from the WSDL file and the .class
+files, run "ant clean".
+
+
+Building and running the demo using Maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the maven pom.xml file can be used to build and run the demo.
+
+
+Using either UNIX or Windows:
+
+  mvn install (builds the demo)
+  mvn -Pserver  (from one command line window)
+  Mvn -Pclient  (from a second command line window)
+
+On startup, the client makes a sequence of 4 two-way invocations.
+
+To remove the code generated from the WSDL file and the .class
+files, run "mvn clean".
+
+
+
+Building the demo using wsdl2java and javac
+-------------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located) first create the target directory build/classes and then
+generate code from the WSDL file.
+
+
+For UNIX:
+  mkdir -p build/classes
+
+  wsdl2java -d build/classes -compile ./wsdl/hello_world_wssec.wsdl
+
+For Windows:
+  mkdir build\classes
+    Must use back slashes.
+
+  wsdl2java -d build\classes -compile .\wsdl\hello_world_wssec.wsdl
+    May use either forward or back slashes.
+
+Now compile the provided client and server applications with the commands:
+
+For UNIX:
+
+  export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf-manifest.jar:./build/classes
+  javac -d build/classes src/demo/wssec/common/*.java
+  javac -d build/classes src/demo/wssec/client/*.java
+  javac -d build/classes src/demo/wssec/server/*.java
+
+For Windows:
+  set classpath=%classpath%;%CXF_HOME%\lib\cxf-manifest.jar;.\build\classes
+  javac -d build\classes src\demo\wssec\common\*.java
+  javac -d build\classes src\demo\wssec\client\*.java
+  javac -d build\classes src\demo\wssec\server\*.java
+
+
+Running the demo using java
+---------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located) run the commands, entered on a single command line:
+
+For UNIX (must use forward slashes):
+    java -Djava.util.logging.config.file=./logging.properties
+         demo.wssec.server.Server &
+
+    java -Djava.util.logging.config.file=./logging.properties
+         demo.wssec.client.Client ./wsdl/hello_world_wssec.wsdl
+
+The server process starts in the background.
+
+For Windows (may use either forward or back slashes):
+  start
+    java -Djava.util.logging.config.file=.\logging.properties
+         demo.wssec.server.Server
+
+    java -Djava.util.logging.config.file=.\logging.properties
+         demo.wssec.client.Client .\wsdl\hello_world_wssec.wsdl
+
+The server process starts in a new command window.
+
+After running the client, terminate the server process.
+
+To remove the code generated from the WSDL file and the .class
+files, either delete the build directory and its contents or run:
+
+  ant clean
+

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/README.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/build.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/build.xml?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/build.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/build.xml Mon Jun 15 18:10:43 2009
@@ -0,0 +1,77 @@
+<?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.
+-->
+<project name="WS-Security demo" default="build" basedir=".">
+
+    <import file="../../common_build.xml"/>
+
+    <target name="client" description="run demo client" depends="build">
+		<antcall  target="copy-client-keystoreconfig-files"/>
+        <cxfrun classname="demo.wssec.client.Client"
+                logging-properties-file="logging.properties"/>
+    </target>
+
+    <target name="server" description="run demo server" depends="build">
+		<antcall  target="copy-server-keystoreconfig-files"/>
+        <cxfrun classname="demo.wssec.server.Server"
+                logging-properties-file="${basedir}/logging.properties"/>
+	
+    </target>
+
+    <target name="generate.code">
+        <echo level="info" message="Generating code using wsdl2java..."/>
+        <wsdl2java file="hello_world_wssec.wsdl"/>
+    </target>
+
+    <target name="copy-keystoreconfig-files">
+    		<copy todir="${config.dir}" >
+    			<fileset dir="${basedir}/webapp/WEB-INF">
+    				<include name="*.xml" />
+    				<exclude name="web.xml" />
+    			</fileset>
+    		</copy>
+    </target>
+
+    <target name="copy-client-keystoreconfig-files">
+        <mkdir dir="${build.classes.dir}/demo/wssec/client/etc"/>
+		<mkdir dir="${build.classes.dir}/demo/wssec/client/keystore"/>
+
+        <copy todir="${build.classes.dir}/demo/wssec/client/etc">
+            <fileset dir="${basedir}/etc" includes="Client*.properties" />
+        </copy>
+
+        <copy todir="${build.classes.dir}/demo/wssec/client/keystore">
+            <fileset dir="${basedir}/keystore" includes="client*.jks" />
+        </copy>
+    </target>
+
+    <target name="copy-server-keystoreconfig-files">
+        <mkdir dir="${build.classes.dir}/demo/wssec/server/etc"/>
+		<mkdir dir="${build.classes.dir}/demo/wssec/server/keystore"/>
+
+        <copy todir="${build.classes.dir}/demo/wssec/server/etc">
+            <fileset dir="${basedir}/etc" includes="Server*.properties" />
+        </copy>
+
+        <copy todir="${build.classes.dir}/demo/wssec/server/keystore">
+            <fileset dir="${basedir}/keystore" includes="server*.jks" />
+        </copy>
+    </target>
+
+</project>

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Encrypt.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Encrypt.properties?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Encrypt.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Encrypt.properties Mon Jun 15 18:10:43 2009
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=storepassword
+org.apache.ws.security.crypto.merlin.keystore.alias=serverx509v1
+org.apache.ws.security.crypto.merlin.file=keystore/client-truststore.jks
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Encrypt.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Encrypt.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Encrypt.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Sign.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Sign.properties?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Sign.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Sign.properties Mon Jun 15 18:10:43 2009
@@ -0,0 +1,6 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=storepassword
+org.apache.ws.security.crypto.merlin.keystore.alias=clientx509v1
+org.apache.ws.security.crypto.merlin.file=keystore/client-keystore.jks
+

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Sign.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Sign.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Client_Sign.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_Decrypt.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_Decrypt.properties?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_Decrypt.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_Decrypt.properties Mon Jun 15 18:10:43 2009
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=storepassword
+org.apache.ws.security.crypto.merlin.keystore.alias=serverx509v1
+org.apache.ws.security.crypto.merlin.file=keystore/server-keystore.jks
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_Decrypt.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_Decrypt.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_Decrypt.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_SignVerf.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_SignVerf.properties?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_SignVerf.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_SignVerf.properties Mon Jun 15 18:10:43 2009
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=storepassword
+org.apache.ws.security.crypto.merlin.keystore.alias=clientx509v1
+org.apache.ws.security.crypto.merlin.file=keystore/server-truststore.jks

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_SignVerf.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_SignVerf.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/etc/Server_SignVerf.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-keystore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-keystore.jks?rev=784893&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-keystore.jks (added) and cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-keystore.jks Mon Jun 15 18:10:43 2009 differ

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-truststore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-truststore.jks?rev=784893&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-truststore.jks (added) and cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/client-truststore.jks Mon Jun 15 18:10:43 2009 differ

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-keystore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-keystore.jks?rev=784893&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-keystore.jks (added) and cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-keystore.jks Mon Jun 15 18:10:43 2009 differ

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-truststore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-truststore.jks?rev=784893&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-truststore.jks (added) and cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/keystore/server-truststore.jks Mon Jun 15 18:10:43 2009 differ

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/logging.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/logging.properties?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/logging.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/logging.properties Mon Jun 15 18:10:43 2009
@@ -0,0 +1,80 @@
+#    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.
+
+############################################################
+#  	Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.  
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+#  	Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler 
+# classes.  These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the WARNING and above levels.
+handlers= java.util.logging.ConsoleHandler
+
+# To also add the FileHandler, use the following line instead.
+#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+java.util.logging.ConsoleHandler.formatter = demos.wssec.common.ConciseFormatter
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers.  For any given facility this global level
+# can be overriden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= WARNING
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = %h/java%u.log
+java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 1
+java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
+
+# Limit the message that are printed on the console to WARNING and above.
+java.util.logging.ConsoleHandler.level = INFO
+#java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+java.util.logging.ConsoleHandler.formatter = demos.wssec.common.ConciseFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#com.xyz.foo.level = SEVERE
+
+# Set log levels so that we can observe the WSS4JIntercetpor
+
+org.apache.cxf.interceptor.LoggingInInterceptor.level=INFO
+org.apache.cxf.interceptor.LoggingOutInterceptor.level=INFO
+org.apache.cxf.ws.rm.security.wss4j.WSS4JInInterceptor.level=INFO
+org.apache.cxf.ws.rm.security.wss4j.WSS4JOutInterceptor.level=INFO
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/logging.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/logging.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/logging.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/pom.xml?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/pom.xml Mon Jun 15 18:10:43 2009
@@ -0,0 +1,194 @@
+<?xml version="1.0"?>
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.cxf.samples</groupId>
+    <artifactId>wssec</artifactId>
+    <version>1.0</version>
+    <name>WS-Security Demo</name>
+    <properties>
+        <cxf.version>[2,)</cxf.version>
+    </properties>
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>LATEST</version>
+                <executions>
+                    <execution>
+                        <id>generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/wsdl/hello_world_wssec.wsdl</wsdl>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copyxmlfiles</id>
+                        <phase>generate-sources</phase>
+	    	        <goals>
+	    	            <goal>run</goal>
+	    	        </goals>
+	    	        <configuration>
+	    	            <tasks>
+	    	               <copy file="${basedir}/src/demo/wssec/client/wssec.xml" todir="${basedir}/target/classes/demo/wssec/client"/>
+	    	               <copy file="${basedir}/src/demo/wssec/server/wssec.xml" todir="${basedir}/target/classes/demo/wssec/server"/>
+	    	            </tasks>
+	    	        </configuration>
+	    	    </execution>
+	    	</executions>
+            </plugin>
+        </plugins>
+    </build>   
+    <profiles>
+        <profile>
+            <id>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>
+                                    <mainClass>demo.wssec.server.Server</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>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>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>snapshots</id>
+            <repositories>
+                <repository>
+                    <id>apache-snapshots</id>
+                    <name>Apache SNAPSHOT Repository</name>
+                    <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+                    <snapshots>
+                        <enabled>true</enabled>
+                    </snapshots>
+                </repository>
+                    <!-- for jaxb-impl -->
+                <repository>
+                    <id>java.net</id>
+                    <url>http://download.java.net/maven/1/</url>
+                    <layout>legacy</layout>
+                </repository>
+            </repositories>
+            <pluginRepositories>
+                <pluginRepository>
+                    <id>apache-plugin-snapshots</id>
+                    <name>Apache Maven Plugin Snapshots</name>
+                    <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+                    <releases>
+                        <enabled>false</enabled>
+                    </releases>
+                    <snapshots>
+                        <enabled>true</enabled>
+                    </snapshots>
+                </pluginRepository>
+            </pluginRepositories>
+        </profile>
+    </profiles>
+    <repositories>
+        <!-- for jaxb-impl -->
+        <repository>
+            <id>java.net</id>
+            <url>http://download.java.net/maven/1/</url>
+            <layout>legacy</layout>
+        </repository>
+    </repositories>
+    
+    <dependencies> 
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <!-- Jetty is needed if you're using the CXFServlet -->
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-rm</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-security</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-addr</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-policy</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-common-utilities</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>        
+    </dependencies>
+</project>

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/Client.java?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/Client.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/Client.java Mon Jun 15 18:10:43 2009
@@ -0,0 +1,119 @@
+/**
+ * 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 demo.wssec.client;
+
+import java.lang.reflect.UndeclaredThrowableException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.hello_world_soap_http.Greeter;
+import org.apache.cxf.hello_world_soap_http.GreeterService;
+
+import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+
+
+public final class Client {
+
+    private static final String USER_NAME = System.getProperty("user.name");
+    private static final String WSU_NS
+        = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
+
+    private Client() {
+    }
+
+    public static void main(String args[]) throws Exception {
+        try {
+
+            SpringBusFactory bf = new SpringBusFactory();
+            URL busFile = Client.class.getResource("wssec.xml");
+            Bus bus = bf.createBus(busFile.toString());
+            bf.setDefaultBus(bus);
+
+            Map<String, Object> outProps = new HashMap<String, Object>();
+            outProps.put("action", "UsernameToken Timestamp Signature Encrypt");
+
+            outProps.put("passwordType", "PasswordDigest");
+            outProps.put("user", "clientx509v1");
+
+            //If you are using the patch WSS-194, then uncomment below two lines and 
+            //comment the above "user" prop line.
+            //outProps.put("user", "abcd");
+            //outProps.put("signatureUser", "clientx509v1");
+
+            outProps.put("passwordCallbackClass", "demo.wssec.client.UTPasswordCallback");
+
+            outProps.put("encryptionUser", "serverx509v1");
+            outProps.put("encryptionPropFile", "etc/Client_Encrypt.properties");
+            outProps.put("encryptionKeyIdentifier", "IssuerSerial");
+            outProps.put("encryptionParts",
+                         "{Element}{" + WSU_NS + "}Timestamp;"
+                         + "{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body");
+
+            outProps.put("signaturePropFile", "etc/Client_Sign.properties");
+            outProps.put("signatureKeyIdentifier", "DirectReference");
+            outProps.put("signatureParts",
+                         "{Element}{" + WSU_NS + "}Timestamp;"
+                         + "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body");
+
+            bus.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
+
+            Map<String, Object> inProps = new HashMap<String, Object>();
+
+            inProps.put("action", "UsernameToken Timestamp Signature Encrypt");
+            inProps.put("passwordType", "PasswordText");
+            inProps.put("passwordCallbackClass", "demo.wssec.client.UTPasswordCallback");
+
+            inProps.put("decryptionPropFile", "etc/Client_Sign.properties");
+            inProps.put("encryptionKeyIdentifier", "IssuerSerial");
+
+            inProps.put("signaturePropFile", "etc/Client_Encrypt.properties");
+            inProps.put("signatureKeyIdentifier", "DirectReference");
+
+            bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));
+
+            GreeterService service = new GreeterService();
+            Greeter port = service.getGreeterPort();
+
+            String[] names = new String[] {"Anne", "Bill", "Chris", "Sachin Tendulkar"};
+            // make a sequence of 4 invocations
+            for (int i = 0; i < 4; i++) {
+                System.out.println("Invoking greetMe...");
+                String response = port.greetMe(names[i]);
+                System.out.println("response: " + response + "\n");
+            }
+
+            // allow aynchronous resends to occur
+            Thread.sleep(30 * 1000);
+
+            bus.shutdown(true);
+
+        } catch (UndeclaredThrowableException ex) {
+            ex.getUndeclaredThrowable().printStackTrace();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        } finally {
+            System.exit(0);
+        }
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/Client.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/Client.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/UTPasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/UTPasswordCallback.java?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/UTPasswordCallback.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/UTPasswordCallback.java Mon Jun 15 18:10:43 2009
@@ -0,0 +1,73 @@
+/**
+ * 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 demo.wssec.client;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ */
+
+public class UTPasswordCallback implements CallbackHandler {
+    
+    private Map<String, String> passwords = 
+        new HashMap<String, String>();
+    
+    public UTPasswordCallback() {
+        passwords.put("Alice", "ecilA");
+        passwords.put("abcd", "dcba");
+        passwords.put("clientx509v1", "storepassword");
+        passwords.put("serverx509v1", "storepassword");
+    }
+
+    /**
+     * Here, we attempt to get the password from the private 
+     * alias/passwords map.
+     */
+    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+            String pass = passwords.get(pc.getIdentifier());
+            if (pass != null) {
+                pc.setPassword(pass);
+                return;
+            }
+        }
+
+        //
+        // Password not found
+        //
+        throw new IOException();
+    }
+
+    /**
+     * Add an alias/password pair to the callback mechanism.
+     */
+    public void setAliasPassword(String alias, String password) {
+        passwords.put(alias, password);
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/UTPasswordCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/UTPasswordCallback.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/wssec.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/wssec.xml?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/wssec.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/wssec.xml Mon Jun 15 18:10:43 2009
@@ -0,0 +1,45 @@
+<?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:cxf="http://cxf.apache.org/core"
+       xmlns:wsa="http://cxf.apache.org/ws/addressing"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+       xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+       xsi:schemaLocation="
+       http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+       http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+       http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+       http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ 
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+            <wsa:addressing/>
+        </cxf:features>
+    </cxf:bus>
+    
+    <http:conduit name="{http://cxf.apache.org/hello_world_soap_http}GreeterPort.http-conduit">
+      <http:client DecoupledEndpoint="http://localhost:9990/decoupled_endpoint"/>
+    </http:conduit>
+
+</beans>

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/wssec.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/wssec.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/client/wssec.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/common/ConciseFormatter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/common/ConciseFormatter.java?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/common/ConciseFormatter.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/common/ConciseFormatter.java Mon Jun 15 18:10:43 2009
@@ -0,0 +1,33 @@
+/**
+ * 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 demos.wssec.common;
+
+import java.util.logging.LogRecord;
+import java.util.logging.SimpleFormatter;
+
+public class ConciseFormatter extends SimpleFormatter {
+    public synchronized String format(LogRecord record) {
+        String longForm = super.format(record);
+        String shortForm = longForm.indexOf("INFO: ") > 0
+                           ? longForm.substring(longForm.indexOf("INFO: ") + 6)
+                           : longForm;
+        return shortForm;
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/common/ConciseFormatter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/common/ConciseFormatter.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/GreeterImpl.java?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/GreeterImpl.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/GreeterImpl.java Mon Jun 15 18:10:43 2009
@@ -0,0 +1,63 @@
+/**
+ * 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 demo.wssec.server;
+
+import java.util.logging.Logger;
+import org.apache.cxf.hello_world_soap_http.Greeter;
+
+@javax.jws.WebService(serviceName = "GreeterService",
+            portName = "GreeterPort",
+            endpointInterface = "org.apache.cxf.hello_world_soap_http.Greeter",
+            wsdlLocation = "file:./wsdl/hello_world_wssec.wsdl",
+            targetNamespace = "http://cxf.apache.org/hello_world_soap_http")
+                  
+public class GreeterImpl implements Greeter {
+
+    private static final Logger LOG = 
+        Logger.getLogger(GreeterImpl.class.getPackage().getName());
+    
+    /* (non-Javadoc)
+     * @see org.apache.cxf.hello_world_soap_http.Greeter#greetMe(java.lang.String)
+     */
+    public String greetMe(String me) {
+        LOG.info("Executing operation greetMe");
+        System.out.println("Executing operation greetMe");
+        System.out.println("Message received: " + me + "\n");
+        return "Hello " + me;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.cxf.hello_world_soap_http.Greeter#greetMeOneWay(java.lang.String)
+     */
+    public void greetMeOneWay(String me) {
+        LOG.info("Executing operation greetMeOneWay");
+        System.out.println("Executing operation greetMeOneWay\n");
+        System.out.println("Hello there " + me);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.cxf.hello_world_soap_http.Greeter#sayHi()
+     */
+    public String sayHi() {
+        LOG.info("Executing operation sayHi");
+        System.out.println("Executing operation sayHi\n");
+        return "Bonjour";
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/GreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/GreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/Server.java?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/Server.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/Server.java Mon Jun 15 18:10:43 2009
@@ -0,0 +1,103 @@
+/**
+ * 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 demo.wssec.server;
+
+import java.net.URL;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+
+public class Server {
+    private static final String WSU_NS
+        = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
+
+    protected Server() throws Exception {
+        System.out.println("Starting Server");
+
+
+        Object implementor = new GreeterImpl();
+        String address = "http://localhost:9000/SoapContext/GreeterPort";
+        Endpoint e = Endpoint.publish(address, implementor);
+    }
+
+    public static void main(String args[]) throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = Server.class.getResource("wssec.xml");
+        Bus bus = bf.createBus(busFile.toString());
+
+        Map<String, Object> outProps = new HashMap<String, Object>();
+        outProps.put("action", "UsernameToken Timestamp Signature Encrypt");
+
+        outProps.put("passwordType", "PasswordText");
+        outProps.put("user", "serverx509v1");
+        outProps.put("passwordCallbackClass", "demo.wssec.server.UTPasswordCallback");
+
+        //If you are using the patch WSS-194, then uncomment below two lines and 
+        //comment the above "user" prop line.
+        //outProps.put("user", "Alice");
+        //outProps.put("signatureUser", "serverx509v1");
+
+        outProps.put("encryptionUser", "clientx509v1");
+        outProps.put("encryptionPropFile", "etc/Server_SignVerf.properties");
+        outProps.put("encryptionKeyIdentifier", "IssuerSerial");
+        outProps.put("encryptionParts", "{Element}{" + WSU_NS + "}Timestamp;"
+                         + "{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body");
+
+        outProps.put("signaturePropFile", "etc/Server_Decrypt.properties");
+        outProps.put("signatureKeyIdentifier", "DirectReference");
+        outProps.put("signatureParts", "{Element}{" + WSU_NS + "}Timestamp;"
+                         + "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body");
+
+        bus.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
+
+        Map<String, Object> inProps = new HashMap<String, Object>();
+
+        inProps.put("action", "UsernameToken Timestamp Signature Encrypt");
+        inProps.put("passwordType", "PasswordDigest");
+        inProps.put("passwordCallbackClass", "demo.wssec.server.UTPasswordCallback");
+
+        inProps.put("decryptionPropFile", "etc/Server_Decrypt.properties");
+        inProps.put("encryptionKeyIdentifier", "IssuerSerial");
+
+        inProps.put("signaturePropFile", "etc/Server_SignVerf.properties");
+        inProps.put("signatureKeyIdentifier", "DirectReference");
+
+        bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));
+
+        bf.setDefaultBus(bus);
+
+        new Server();
+        System.out.println("Server ready...");
+
+        Thread.sleep(5 * 60 * 1000);
+
+        bus.shutdown(true);
+        System.out.println("Server exiting");
+        System.exit(0);
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/Server.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/Server.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/UTPasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/UTPasswordCallback.java?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/UTPasswordCallback.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/UTPasswordCallback.java Mon Jun 15 18:10:43 2009
@@ -0,0 +1,73 @@
+/**
+ * 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 demo.wssec.server;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ */
+
+public class UTPasswordCallback implements CallbackHandler {
+    
+    private Map<String, String> passwords = 
+        new HashMap<String, String>();
+    
+    public UTPasswordCallback() {
+        passwords.put("Alice", "ecilA");
+        passwords.put("abcd", "dcba");
+        passwords.put("clientx509v1", "storepassword");
+        passwords.put("serverx509v1", "storepassword");
+    }
+
+    /**
+     * Here, we attempt to get the password from the private 
+     * alias/passwords map.
+     */
+    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+            String pass = passwords.get(pc.getIdentifier());
+            if (pass != null) {
+                pc.setPassword(pass);
+                return;
+            }
+        }
+        
+        //
+        // Password not found
+        //
+        throw new IOException();
+    }
+    
+    /**
+     * Add an alias/password pair to the callback mechanism.
+     */
+    public void setAliasPassword(String alias, String password) {
+        passwords.put(alias, password);
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/UTPasswordCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/UTPasswordCallback.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/wssec.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/wssec.xml?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/wssec.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/wssec.xml Mon Jun 15 18:10:43 2009
@@ -0,0 +1,45 @@
+<?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:cxf="http://cxf.apache.org/core"
+       xmlns:wsa="http://cxf.apache.org/ws/addressing"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+       xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+       xsi:schemaLocation="
+       http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+       http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+       http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+       http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ 
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+            <wsa:addressing/>
+        </cxf:features>
+    </cxf:bus>
+    
+    <http:conduit name="{http://cxf.apache.org/hello_world_soap_http}GreeterPort.http-conduit">
+      <http:client DecoupledEndpoint="http://localhost:9990/decoupled_endpoint"/>
+    </http:conduit>
+
+</beans>

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/wssec.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/wssec.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/src/demo/wssec/server/wssec.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/hello_world_wssec.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/hello_world_wssec.wsdl?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/hello_world_wssec.wsdl (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/hello_world_wssec.wsdl Mon Jun 15 18:10:43 2009
@@ -0,0 +1,135 @@
+<?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.
+-->
+<wsdl:definitions name="HelloWorld" targetNamespace="http://cxf.apache.org/hello_world_soap_http" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:tns="http://cxf.apache.org/hello_world_soap_http"
+    xmlns:x1="http://cxf.apache.org/hello_world_soap_http/types"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <wsdl:types>
+        <schema targetNamespace="http://cxf.apache.org/hello_world_soap_http/types" 
+            xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+            <element name="sayHi">
+                <complexType/>
+            </element>
+            <element name="sayHiResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeOneWay">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="sayHiRequest">
+        <wsdl:part element="x1:sayHi" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="sayHiResponse">
+        <wsdl:part element="x1:sayHiResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeRequest">
+        <wsdl:part element="x1:greetMe" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part element="x1:greetMeResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeOneWayRequest">
+        <wsdl:part element="x1:greetMeOneWay" name="in"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="Greeter">
+        <wsdl:operation name="sayHi">
+            <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        
+        <wsdl:operation name="sayHi">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="sayHiRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="sayHiResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMe">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="greetMeResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeOneWayRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="GreeterService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="GreeterPort">
+            <soap:address location="http://localhost:9000/SoapContext/GreeterPort"/>
+            <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/hello_world_wssec.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/hello_world_wssec.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/sign_enc/wsdl/hello_world_wssec.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 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=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt Mon Jun 15 18:10:43 2009
@@ -0,0 +1,146 @@
+WS-Security Demo  (UsernameToken and Timestamp)
+=================
+
+This demo shows how WS-Security support in Apache CXF may be enabled.
+
+WS-Security can be configured to the Client and Server endpoints by adding WSS4JInterceptors.
+Both Server and Client can be configured for outgoing and incoming interceptors. Various Actions like,
+Timestamp, UsernameToken, Signature, Encryption, etc., can be applied to the interceptors by passing
+appropriate configuration properties.
+
+The logging feature is used to log the inbound and outbound
+SOAP messages and display these to the console.
+
+In all other respects this demo is based on the basic hello_world sample.
+
+Please review the README in the samples directory before continuing.
+
+
+Prerequisite
+------------
+
+If your environment already includes cxf-manifest.jar on the CLASSPATH,
+and the JDK and ant bin directories on the PATH, it is not necessary to
+run the environment script described in the samples directory README.
+If your environment is not properly configured, or if you are planning
+on using wsdl2java, javac, and java to build and run the demos, you must
+set the environment by running the script.
+
+
+*** Requirements ***
+
+The samples in this directory use STRONG encryption.  The default encryption algorithms
+included in a JRE is not adequate for these samples.   The Java Cryptography Extension
+(JCE) Unlimited Strength Jurisdiction Policy Files available on Sun's JDK download
+page[3] *must* be installed for the examples to work.   If you get errors about invalid
+key lengths, the Unlimited Strength files are not installed.
+
+[3] http://java.sun.com/javase/downloads/index.jsp
+
+
+Building and running the demo using Ant
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the Ant build.xml file can be used to build and run the demo.
+The server and client targets automatically build the demo.
+
+Using either UNIX or Windows:
+
+  ant server  (from one command line window)
+  ant client  (from a second command line window)
+
+On startup, the client makes a sequence of 4 two-way invocations.
+
+To remove the code generated from the WSDL file and the .class
+files, run "ant clean".
+
+
+Building and running the demo using Maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the maven pom.xml file can be used to build and run the demo.
+
+
+Using either UNIX or Windows:
+
+  mvn install (builds the demo)
+  mvn -Pserver  (from one command line window)
+  Mvn -Pclient  (from a second command line window)
+
+On startup, the client makes a sequence of 4 two-way invocations.
+
+To remove the code generated from the WSDL file and the .class
+files, run "mvn clean".
+
+
+
+Building the demo using wsdl2java and javac
+-------------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located) first create the target directory build/classes and then
+generate code from the WSDL file.
+
+
+For UNIX:
+  mkdir -p build/classes
+
+  wsdl2java -d build/classes -compile ./wsdl/hello_world_wssec.wsdl
+
+For Windows:
+  mkdir build\classes
+    Must use back slashes.
+
+  wsdl2java -d build\classes -compile .\wsdl\hello_world_wssec.wsdl
+    May use either forward or back slashes.
+
+Now compile the provided client and server applications with the commands:
+
+For UNIX:
+
+  export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf-manifest.jar:./build/classes
+  javac -d build/classes src/demo/wssec/common/*.java
+  javac -d build/classes src/demo/wssec/client/*.java
+  javac -d build/classes src/demo/wssec/server/*.java
+
+For Windows:
+  set classpath=%classpath%;%CXF_HOME%\lib\cxf-manifest.jar;.\build\classes
+  javac -d build\classes src\demo\wssec\common\*.java
+  javac -d build\classes src\demo\wssec\client\*.java
+  javac -d build\classes src\demo\wssec\server\*.java
+
+
+Running the demo using java
+---------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located) run the commands, entered on a single command line:
+
+For UNIX (must use forward slashes):
+    java -Djava.util.logging.config.file=./logging.properties
+         demo.wssec.server.Server &
+
+    java -Djava.util.logging.config.file=./logging.properties
+         demo.wssec.client.Client ./wsdl/hello_world_wssec.wsdl
+
+The server process starts in the background.
+
+For Windows (may use either forward or back slashes):
+  start
+    java -Djava.util.logging.config.file=.\logging.properties
+         demo.wssec.server.Server
+
+    java -Djava.util.logging.config.file=.\logging.properties
+         demo.wssec.client.Client .\wsdl\hello_world_wssec.wsdl
+
+The server process starts in a new command window.
+
+After running the client, terminate the server process.
+
+To remove the code generated from the WSDL file and the .class
+files, either delete the build directory and its contents or run:
+
+  ant clean
+

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/ut/README.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/distribution/src/main/release/samples/ws_security/ut/build.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_security/ut/build.xml?rev=784893&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_security/ut/build.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/ws_security/ut/build.xml Mon Jun 15 18:10:43 2009
@@ -0,0 +1,49 @@
+<?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.
+-->
+<project name="WS-Security demo" default="build" basedir=".">
+
+    <import file="../../common_build.xml"/>
+
+    <target name="client" description="run demo client" depends="build">
+        <cxfrun classname="demo.wssec.client.Client"
+                logging-properties-file="logging.properties"/>
+    </target>
+
+    <target name="server" description="run demo server" depends="build">
+        <cxfrun classname="demo.wssec.server.Server"
+                logging-properties-file="${basedir}/logging.properties"/>
+
+    </target>
+
+    <target name="generate.code">
+        <echo level="info" message="Generating code using wsdl2java..."/>
+        <wsdl2java file="hello_world_wssec.wsdl"/>
+    </target>
+
+    <target name="copy-keystoreconfig-files">
+    		<copy todir="${config.dir}" >
+    			<fileset dir="${basedir}/webapp/WEB-INF">
+    				<include name="*.xml" />
+    				<exclude name="web.xml" />
+    			</fileset>
+    		</copy>
+    </target>
+
+</project>

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/ut/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/ut/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/ws_security/ut/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml