cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1371347 - in /cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy: ./ bin/ certs/ src/demo/ src/main/ src/main/config/ src/main/java/ src/main/java/demo/ src/main/java/demo/wssec/ src/main/java/demo/wssec/c...
Date Thu, 09 Aug 2012 18:03:44 GMT
Author: gmazza
Date: Thu Aug  9 18:03:43 2012
New Revision: 1371347

URL: http://svn.apache.org/viewvc?rev=1371347&view=rev
Log:
Updated ut_policy sample: better Mavenized, no longer disabling CN check by default (backport from CXF 2.7/trunk branch.)

Added:
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/KeyREADME.txt
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/clientKeystore.jks   (with props)
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world.wsdl
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world_no_policy.wsdl
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/serviceKeystore.jks   (with props)
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/Client.java
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/GreeterImpl.java
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/Server.java
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ClientConfig.xml
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ServiceConfig.xml
Removed:
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/bin/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/certs/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/
Modified:
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/README.txt
    cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/pom.xml

Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/README.txt
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/README.txt?rev=1371347&r1=1371346&r2=1371347&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/README.txt (original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/README.txt Thu Aug  9 18:03:43 2012
@@ -1,6 +1,5 @@
 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
@@ -9,22 +8,8 @@ WS-SecurityPolicies into the WSDL.
 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
@@ -37,11 +22,9 @@ key lengths, the Unlimited Strength file
 
 
 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.
-
+located), the Maven pom.xml file can be used to build and run the demo.
 
 Using either UNIX or Windows:
 
@@ -51,78 +34,9 @@ Using either UNIX or Windows:
 
 On startup, the client makes one invocation.
 
-You can use the profile client.unauthenticated to show that the policy UsernameToken is enforced by the server.
+You can also try mvn -Pclient.unauthenticated to show that the policy
+UsernameToken is enforced by the server.
 
 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
-

Modified: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/pom.xml?rev=1371347&r1=1371346&r2=1371347&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/pom.xml (original)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/pom.xml Thu Aug  9 18:03:43 2012
@@ -55,7 +55,7 @@
                         <configuration>
                             <wsdlOptions>
                                 <wsdlOption>
-                                    <wsdl>${basedir}/wsdl/hello_world.wsdl</wsdl>
+                                    <wsdl>${basedir}/src/main/config/hello_world.wsdl</wsdl>
                                 </wsdlOption>
                             </wsdlOptions>
                         </configuration>
@@ -65,27 +65,6 @@
                     </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/server/wssec.xml" todir="${basedir}/target/classes/demo/wssec/server" />
-                                <copy file="${basedir}/src/demo/wssec/client/wssec.xml" todir="${basedir}/target/classes/demo/wssec/client" />
-                                <copy todir="${basedir}/target/classes/certs">
-                                    <fileset dir="${basedir}/certs" />
-                                </copy>
-                            </tasks>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
     <profiles>
@@ -107,7 +86,7 @@
                                     <executable>java</executable>
                                     <arguments>
                                         <argument>-classpath</argument>
-                                        <classpath />
+                                        <classpath/>
                                         <argument>demo.wssec.server.Server</argument>
                                     </arguments>
                                 </configuration>
@@ -134,7 +113,7 @@
                                 <configuration>
                                     <mainClass>demo.wssec.client.Client</mainClass>
                                     <arguments>
-                                        <argument>${basedir}/wsdl/hello_world.wsdl</argument>
+                                        <argument>${basedir}/src/main/config/hello_world.wsdl</argument>
                                         <argument>secure</argument>
                                     </arguments>
                                 </configuration>
@@ -161,7 +140,7 @@
                                 <configuration>
                                     <mainClass>demo.wssec.client.Client</mainClass>
                                     <arguments>
-                                        <argument>${basedir}/wsdl/hello_world_no_policy.wsdl</argument>
+                                        <argument>${basedir}/src/main/config/hello_world_no_policy.wsdl</argument>
                                         <argument>secure</argument>
                                     </arguments>
                                 </configuration>
@@ -176,29 +155,27 @@
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-jaxws</artifactId>
-            <version>2.6.2-SNAPSHOT</version>
+            <version>${cxf.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-http</artifactId>
-            <version>2.6.2-SNAPSHOT</version>
+            <version>${cxf.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-http-jetty</artifactId>
-            <version>2.6.2-SNAPSHOT</version>
+            <version>${cxf.version}</version>
         </dependency>
-       
-
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-ws-security</artifactId>
-            <version>2.6.2-SNAPSHOT</version>
+            <version>${cxf.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-ws-policy</artifactId>
-            <version>2.6.2-SNAPSHOT</version>
+            <version>${cxf.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/KeyREADME.txt
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/KeyREADME.txt?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/KeyREADME.txt (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/KeyREADME.txt Thu Aug  9 18:03:43 2012
@@ -0,0 +1,20 @@
+# The below scripts show the commands used to generate the self-signed keys for this sample.
+# If you use the below script to create your own keys be sure to change the passwords used here
+# DO NOT USE THE SUPPLIED KEYS IN PRODUCTION--everyone has them!!
+# For production recommended to use keys signed by a third-party certificate authority (CA)
+
+# Create the combination keystore/truststore for the client and service.
+# Note you can create separate keystores/truststores for both if desired
+keytool -genkeypair -validity 730 -alias myservicekey -keystore serviceKeystore.jks -dname "cn=localhost" -keypass skpass -storepass sspass
+keytool -genkeypair -validity 730 -alias myclientkey -keystore clientKeystore.jks -keypass ckpass -storepass cspass
+
+# Place server public cert in client key/truststore
+keytool -export -rfc -keystore serviceKeystore.jks -alias myservicekey -file MyService.cer -storepass sspass
+keytool -import -noprompt -trustcacerts -file MyService.cer -alias myservicekey -keystore clientKeystore.jks -storepass cspass
+
+# Place client public cert in service key/truststore
+# Note this needs to be done only if you're requiring client authentication
+# as configured in resources/ServerConfig.xml
+keytool -export -rfc -keystore clientKeystore.jks -alias myclientkey -file MyClient.cer -storepass cspass
+keytool -import -noprompt -trustcacerts -file MyClient.cer -alias myclientkey -keystore serviceKeystore.jks -storepass sspass
+

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/clientKeystore.jks
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/clientKeystore.jks?rev=1371347&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/clientKeystore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world.wsdl?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world.wsdl (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world.wsdl Thu Aug  9 18:03:43 2012
@@ -0,0 +1,132 @@
+<?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://apache.org/hello_world_soap_http" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:tns="http://apache.org/hello_world_soap_http"
+    xmlns:x1="http://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://apache.org/hello_world_soap_http/types" 
+            xmlns="http://www.w3.org/2001/XMLSchema"
+	    xmlns:tns="http://apache.org/hello_world_soap_http/types"
+            elementFormDefault="qualified">
+
+	    <simpleType name="MyStringType">
+		<restriction base="string">
+		    <maxLength value="30" />
+		</restriction>
+	    </simpleType>
+
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="tns:MyStringType"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+    <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:portType name="Greeter">
+        
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </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="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:binding>
+    <wsdl:service name="SOAPService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+            <wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#UP_policy"/>
+            <soap:address location="https://localhost:9001/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+
+    <wsp:Policy wsu:Id="UP_policy" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+                    <wsp:Policy>
+                        <sp:TransportToken>
+                            <wsp:Policy>
+                                <sp:HttpsToken>
+                                    <wsp:Policy/>
+                                </sp:HttpsToken>
+                            </wsp:Policy>
+                        </sp:TransportToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Strict />
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp />
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128 />
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:TransportBinding>
+                <sp:SupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+                    <wsp:Policy>
+                        <sp:UsernameToken
+                            sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                            <wsp:Policy>
+                                <sp:WssUsernameToken11/>
+                            </wsp:Policy>
+                        </sp:UsernameToken>
+                    </wsp:Policy>
+                </sp:SupportingTokens>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+        
+</wsdl:definitions>
+

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world_no_policy.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world_no_policy.wsdl?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world_no_policy.wsdl (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/hello_world_no_policy.wsdl Thu Aug  9 18:03:43 2012
@@ -0,0 +1,93 @@
+<?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://apache.org/hello_world_soap_http" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:tns="http://apache.org/hello_world_soap_http"
+    xmlns:x1="http://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://apache.org/hello_world_soap_http/types" 
+            xmlns="http://www.w3.org/2001/XMLSchema"
+	    xmlns:tns="http://apache.org/hello_world_soap_http/types"
+            elementFormDefault="qualified">
+
+	    <simpleType name="MyStringType">
+		<restriction base="string">
+		    <maxLength value="30" />
+		</restriction>
+	    </simpleType>
+
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="tns:MyStringType"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+    <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:portType name="Greeter">
+        
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </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="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:binding>
+    <wsdl:service name="SOAPService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+            <soap:address location="https://localhost:9001/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+    
+        
+</wsdl:definitions>
+

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/serviceKeystore.jks
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/serviceKeystore.jks?rev=1371347&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/config/serviceKeystore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/Client.java?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/Client.java (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/Client.java Thu Aug  9 18:03:43 2012
@@ -0,0 +1,82 @@
+/**
+ * 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.File;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.hello_world_soap_http.Greeter;
+import org.apache.hello_world_soap_http.SOAPService;
+
+public final class Client {
+
+    private static final QName SERVICE_NAME
+        = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
+
+    private static final QName PORT_NAME =
+        new QName("http://apache.org/hello_world_soap_http", "SoapPort");
+
+
+    private Client() {
+    }
+
+    public static void main(String args[]) throws Exception {
+
+        if (args.length == 0) {
+            System.out.println("please specify wsdl");
+            System.exit(1);
+        }
+
+        URL wsdlURL;
+        File wsdlFile = new File(args[0]);
+        if (wsdlFile.exists()) {
+            wsdlURL = wsdlFile.toURL();
+        } else {
+            wsdlURL = new URL(args[0]);
+        }
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = Client.class.getResource("/ClientConfig.xml");
+        
+        Bus bus = bf.createBus(busFile.toString());
+        BusFactory.setDefaultBus(bus);
+
+        System.out.println(wsdlURL);
+        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
+        Greeter port = ss.getPort(PORT_NAME, Greeter.class);
+
+        System.out.println("Invoking greetMe...");
+        try {
+            String resp = port.greetMe(System.getProperty("user.name"));
+            System.out.println("Server responded with: " + resp);
+            System.out.println();
+
+        } catch (Exception e) {
+            System.out.println("Invocation failed with the following: " + e.getCause());
+            System.out.println();
+        }
+
+        System.exit(0);
+    }
+
+}

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/client/UTPasswordCallback.java Thu Aug  9 18:03:43 2012
@@ -0,0 +1,66 @@
+/**
+ * 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");
+    }
+
+    /**
+     * 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;
+            }
+        }
+    }
+
+    /**
+     * Add an alias/password pair to the callback mechanism.
+     */
+    public void setAliasPassword(String alias, String password) {
+        passwords.put(alias, password);
+    }
+}

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/GreeterImpl.java?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/GreeterImpl.java (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/GreeterImpl.java Thu Aug  9 18:03:43 2012
@@ -0,0 +1,41 @@
+/**
+ * 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.hello_world_soap_http.Greeter;
+
+@javax.jws.WebService(name = "Greeter", serviceName = "SOAPService", 
+    targetNamespace = "http://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.objectweb.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;
+    }
+}

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/Server.java?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/Server.java (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/Server.java Thu Aug  9 18:03:43 2012
@@ -0,0 +1,57 @@
+/**
+ * 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 org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+
+public class Server {
+
+    protected Server() throws Exception {
+        System.out.println("Starting Server");
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = Server.class.getResource("/ServiceConfig.xml");
+        Bus bus = bf.createBus(busFile.toString());
+        BusFactory.setDefaultBus(bus);
+
+        //Object implementor = new GreeterImpl();
+        //String address = "https://localhost:9001/SoapContext/SoapPort";
+        //Endpoint.publish(address, implementor);
+    }
+
+    public static void main(String args[]) throws Exception {
+        System.out.println("The server's security configuration will be taken "
+                           + "from server.xml using the bean name : "
+                           + "\"{http://apache.org/hello_world_soap_http}"
+                           + "GreeterImplPort.http-destination\".");
+        System.out.println();
+        new Server();
+        System.out.println("Server ready...");
+
+        Thread.sleep(5 * 60 * 1000);
+        System.out.println("Server exiting");
+        System.exit(0);
+    }
+}

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/java/demo/wssec/server/UTPasswordCallback.java Thu Aug  9 18:03:43 2012
@@ -0,0 +1,66 @@
+/**
+ * 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");
+    }
+
+    /**
+     * 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;
+            }
+        }
+    }
+
+    /**
+     * Add an alias/password pair to the callback mechanism.
+     */
+    public void setAliasPassword(String alias, String password) {
+        passwords.put(alias, password);
+    }
+}

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ClientConfig.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ClientConfig.xml?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ClientConfig.xml (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ClientConfig.xml Thu Aug  9 18:03:43 2012
@@ -0,0 +1,83 @@
+<?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.
+-->
+
+<!-- 
+  ** This file configures the web service client
+-->
+<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>
+
+  <http:conduit name="{http://apache.org/hello_world_soap_http}SoapPort.http-conduit">
+    <http:tlsClientParameters>
+      <sec:keyManagers keyPassword="ckpass">
+          <sec:keyStore file="src/main/config/clientKeystore.jks" password="cspass" type="JKS"/>
+      </sec:keyManagers>
+      <sec:trustManagers>
+          <sec:keyStore file="src/main/config/clientKeystore.jks" password="cspass" type="JKS"/>
+      </sec:trustManagers>
+      <sec:cipherSuitesFilter>
+        <!-- these filters ensure that a ciphersuite with
+          export-suitable or null encryption is used,
+          but exclude anonymous Diffie-Hellman key change as
+          this is vulnerable to man-in-the-middle attacks -->
+        <sec:include>.*_EXPORT_.*</sec:include>
+        <sec:include>.*_EXPORT1024_.*</sec:include>
+        <sec:include>.*_WITH_DES_.*</sec:include>
+        <sec:include>.*_WITH_AES_.*</sec:include>
+        <sec:include>.*_WITH_NULL_.*</sec:include>
+        <sec:exclude>.*_DH_anon_.*</sec:exclude>
+      </sec:cipherSuitesFilter>
+    </http:tlsClientParameters>
+   </http:conduit>
+
+  
+   <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapPort" createdFromAPI="true">
+      <jaxws:properties>
+        <entry key="ws-security.username" value="Alice" />
+        <entry key="ws-security.callback-handler" value="demo.wssec.client.UTPasswordCallback" />
+      </jaxws:properties>
+        
+   </jaxws:client>
+   
+
+   
+</beans> 
+

Added: cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ServiceConfig.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ServiceConfig.xml?rev=1371347&view=auto
==============================================================================
--- cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ServiceConfig.xml (added)
+++ cxf/branches/2.6.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/main/resources/ServiceConfig.xml Thu Aug  9 18:03:43 2012
@@ -0,0 +1,103 @@
+<?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.
+-->
+
+<!-- 
+  ** This file configures the web service provider.
+-->
+<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-jetty.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>
+
+  <!--
+  <http:destination name="{http://apache.org/hello_world_soap_http}GreeterPort.http-destination"> 
+  </http:destination>
+  -->
+  
+  <jaxws:endpoint id="server"
+    endpointName="s:SoapPort"
+    serviceName="s:SOAPService"
+    implementor="demo.wssec.server.GreeterImpl"    
+    address="https://localhost:9001/SoapContext/SoapPort"
+    wsdlLocation="src/main/config/hello_world.wsdl"
+    depends-on="ClientAuthHttpsSettings"
+    xmlns:s="http://apache.org/hello_world_soap_http" >
+    
+    <jaxws:properties>
+        <entry key="ws-security.callback-handler" value="demo.wssec.server.UTPasswordCallback" />
+        <!--<entry key="passwordCallbackRef">
+           <ref bean="myPasswordCallback"/>
+        </entry>-->
+    </jaxws:properties>
+  </jaxws:endpoint>
+  
+  <!--
+  <bean id="myPasswordCallback"
+      class="demo.hw_https.server.UTPasswordCallback"/>
+  -->
+
+  <httpj:engine-factory id="ClientAuthHttpsSettings">
+   <httpj:engine port="9001">
+    <httpj:tlsServerParameters>
+      <sec:keyManagers keyPassword="skpass">
+           <sec:keyStore file="src/main/config/serviceKeystore.jks" password="sspass" type="JKS"/>
+      </sec:keyManagers>
+      <sec:trustManagers>
+           <sec:keyStore file="src/main/config/serviceKeystore.jks" password="sspass" type="JKS"/>
+      </sec:trustManagers>
+      <sec:cipherSuitesFilter>
+        <!-- these filters ensure that a ciphersuite with
+          export-suitable or null encryption is used,
+          but exclude anonymous Diffie-Hellman key change as
+          this is vulnerable to man-in-the-middle attacks -->
+        <sec:include>.*_EXPORT_.*</sec:include>
+        <sec:include>.*_EXPORT1024_.*</sec:include>
+        <sec:include>.*_WITH_DES_.*</sec:include>
+        <sec:include>.*_WITH_AES_.*</sec:include>
+        <sec:include>.*_WITH_NULL_.*</sec:include>
+        <sec:exclude>.*_DH_anon_.*</sec:exclude>
+      </sec:cipherSuitesFilter>
+      <sec:clientAuthentication want="true" required="true"/>
+    </httpj:tlsServerParameters>
+   </httpj:engine>
+  </httpj:engine-factory>
+</beans>



Mime
View raw message