You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ow...@apache.org on 2012/04/13 10:46:00 UTC

svn commit: r1325659 - in /cxf/sandbox/fediz/fediz-examples: ./ webapp/ webapp/src/ webapp/src/main/ webapp/src/main/java/ webapp/src/main/java/org/ webapp/src/main/java/org/apache/ webapp/src/main/java/org/apache/cxf/ webapp/src/main/java/org/apache/c...

Author: owulff
Date: Fri Apr 13 08:45:58 2012
New Revision: 1325659

URL: http://svn.apache.org/viewvc?rev=1325659&view=rev
Log:
example added to federate identity across web sso and web services stack

Added:
    cxf/sandbox/fediz/fediz-examples/
    cxf/sandbox/fediz/fediz-examples/pom.xml
    cxf/sandbox/fediz/fediz-examples/webapp/
    cxf/sandbox/fediz/fediz-examples/webapp/pom.xml
    cxf/sandbox/fediz/fediz-examples/webapp/src/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/log4j.properties
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/logging.properties
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/tomcatKeystore.jks   (with props)
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/META-INF/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/META-INF/context.xml
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/beans.xml
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/web.xml
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/wsdl/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/index.html
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/service.jsp
    cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/test.html
    cxf/sandbox/fediz/fediz-examples/webservice/
    cxf/sandbox/fediz/fediz-examples/webservice/common/
    cxf/sandbox/fediz/fediz-examples/webservice/common/pom.xml
    cxf/sandbox/fediz/fediz-examples/webservice/common/src/
    cxf/sandbox/fediz/fediz-examples/webservice/common/src/main/
    cxf/sandbox/fediz/fediz-examples/webservice/common/src/main/resources/
    cxf/sandbox/fediz/fediz-examples/webservice/common/src/main/resources/wsdl/
    cxf/sandbox/fediz/fediz-examples/webservice/common/src/main/resources/wsdl/hello_world.wsdl
    cxf/sandbox/fediz/fediz-examples/webservice/pom.xml
    cxf/sandbox/fediz/fediz-examples/webservice/service/
    cxf/sandbox/fediz/fediz-examples/webservice/service/pom.xml
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/fediz/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/fediz/examples/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsKeystore.properties
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsstore.jks   (with props)
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/beans.xml
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/web.xml
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/wsdl/
    cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl

Added: cxf/sandbox/fediz/fediz-examples/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/pom.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/pom.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/pom.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,21 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+   <modelVersion>4.0.0</modelVersion>
+    <parent>
+       <groupId>org.apache.cxf.fediz</groupId>
+       <artifactId>fediz</artifactId>
+       <version>0.6-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.cxf.fediz.examples</groupId>
+    <artifactId>fediz-examples</artifactId>
+    <name>WS Federation examples</name>
+   <packaging>pom</packaging>
+
+   <modules>
+      <module>webservice</module>
+      <module>webapp</module>
+   </modules>
+
+</project>

Added: cxf/sandbox/fediz/fediz-examples/webapp/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/pom.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/pom.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/pom.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+       <groupId>org.apache.cxf.fediz.examples</groupId>
+       <artifactId>fediz-examples</artifactId>
+       <version>0.6-SNAPSHOT</version>
+    </parent>
+    <artifactId>webapp</artifactId>
+    <name>WS Federation Tomcat example</name>
+    <packaging>war</packaging>
+
+   <properties>
+      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+      <cxf.version>2.5.2</cxf.version>
+   </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf.fediz.examples.webservice</groupId>
+            <artifactId>service-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.apache.tomcat</groupId>
+			<artifactId>tomcat-catalina</artifactId>
+			<version>${tomcat.version}</version>
+			<scope>provided</scope>
+		</dependency>
+        <dependency>
+        	<groupId>org.apache.cxf.fediz</groupId>
+        	<artifactId>fediz-core</artifactId>
+        	<version>0.6-SNAPSHOT</version>
+        	<scope>provided</scope>
+        </dependency>
+        <dependency>
+        	<groupId>org.apache.cxf.fediz</groupId>
+        	<artifactId>fediz-tomcat</artifactId>
+        	<version>0.6-SNAPSHOT</version>
+        	<scope>provided</scope>
+        </dependency>
+        <dependency>
+        	<groupId>org.apache.commons</groupId>
+        	<artifactId>commons-lang3</artifactId>
+        	<version>3.0.1</version>
+        </dependency>
+                <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-ws-policy</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-security</artifactId>
+            <version>${cxf.version}</version>
+            <exclusions>
+            	<exclusion>
+            		<artifactId>xmlsec</artifactId>
+            		<groupId>org.apache.santuario</groupId>
+            	</exclusion>
+            	<exclusion>
+            		<artifactId>wss4j</artifactId>
+            		<groupId>org.apache.ws.security</groupId>
+            	</exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>        
+        <dependency>
+        	<groupId>org.springframework</groupId>
+        	<artifactId>spring-context</artifactId>
+        	<version>3.0.6.RELEASE</version>
+        	<type>jar</type>
+        	<scope>compile</scope>
+        </dependency>
+        <dependency>
+        	<groupId>org.springframework</groupId>
+        	<artifactId>spring-web</artifactId>
+        	<version>3.0.6.RELEASE</version>
+        	<type>jar</type>
+        	<scope>compile</scope>
+        </dependency>
+                <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.6.1</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!--
+            <plugin>
+                <groupId>org.apache.tomcat.maven</groupId>
+                <artifactId>tomcat-maven-plugin</artifactId>
+                <version>2.0-SNAPSHOT</version>
+                <configuration>
+                     <server>myTomcat</server>
+                     <url>http://localhost:8080/manager/text</url>
+                     <warFile>${project.build.finalName}.war</warFile>
+                </configuration>
+            </plugin>
+            -->
+            <plugin><!--for mvn tomcat:deploy/:undeploy/:redeploy -->
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>tomcat-maven-plugin</artifactId>
+				<version>1.1</version>
+				<configuration>
+					<server>myTomcat</server>
+					<url>http://localhost:8080/manager/text</url>
+					<path>/${project.build.finalName}</path>
+				</configuration>
+			</plugin>
+        </plugins>
+        <!-- Name of the generated WAR file -->
+        <finalName>fedizhelloworld</finalName>
+    </build>
+
+</project>

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ApplicationContextProvider.java Fri Apr 13 08:45:58 2012
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cxf.fediz.example;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+/**
+ * This class provides an application-wide access to the
+ * Spring ApplicationContext.
+ **/
+@Component
+public class ApplicationContextProvider implements ApplicationContextAware {
+
+    private static ApplicationContext ctx = null;
+
+    public ApplicationContextProvider() {
+        super();
+    }
+
+    public void setApplicationContext(ApplicationContext ctx)
+    throws BeansException {
+
+        ApplicationContextProvider.ctx = ctx;
+    }
+
+    public static ApplicationContext getContext() {
+        return ctx;
+    }
+
+}

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationFilter.java Fri Apr 13 08:45:58 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 org.apache.cxf.fediz.example;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+import org.w3c.dom.Element;
+
+/**
+* Add security token to thread local
+*
+*/
+public class FederationFilter implements Filter {
+
+	private static final String DEFAULT_SECURITY_TOKEN_ATTR = "org.apache.fediz.SECURITY_TOKEN";
+	private static final String SECURITY_TOKEN_ATTR_CONFIG = "security.token.attribute";
+	
+	private String securityTokenAttr = DEFAULT_SECURITY_TOKEN_ATTR;
+	
+	@Override
+	public void init(FilterConfig filterConfig) throws ServletException {
+		String attrName = filterConfig.getInitParameter(SECURITY_TOKEN_ATTR_CONFIG);
+		if (attrName != null) {
+			securityTokenAttr = attrName;
+		}
+		
+	}
+
+	@Override
+	public void doFilter(ServletRequest request, ServletResponse response,
+			FilterChain chain) throws IOException, ServletException {
+	
+		if (request instanceof HttpServletRequest) {
+			HttpServletRequest hrequest = (HttpServletRequest)request;
+			Element el = (Element)hrequest.getSession().getAttribute(securityTokenAttr);
+			if (el != null) {
+				try
+				{
+					SecurityTokenThreadLocal.setToken(el);
+					chain.doFilter(request, response);
+				} finally {
+					SecurityTokenThreadLocal.setToken(null);
+				}		
+			} else {
+				chain.doFilter(request, response);
+			}
+			
+		} else {
+			chain.doFilter(request, response);
+		}
+	}
+
+	@Override
+	public void destroy() {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java Fri Apr 13 08:45:58 2012
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cxf.fediz.example;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.security.Principal;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.cxf.fediz.core.Claim;
+import org.apache.cxf.fediz.core.ClaimCollection;
+import org.apache.cxf.fediz.tomcat.FederationPrincipal;
+import org.apache.hello_world_soap_http.Greeter;
+import org.w3c.dom.Element;
+
+public class FederationServlet extends HttpServlet {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -9019993850246851112L;
+
+    public void doGet(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+
+        response.setContentType("text/html");
+        PrintWriter out = response.getWriter();
+
+        out.println("<html>");
+        out.println("<head><title>WS Federation Tomcat Examples</title></head>");
+        out.println("<body>");
+        out.println("<h1>Hello World</h1>");
+        out.println("Hello world<br>");
+        out.println("Request url: " + request.getRequestURL().toString() + "<p>");
+
+
+
+        out.println("<br><b>User</b><p>");
+        Principal p = request.getUserPrincipal();
+        if (p != null) {
+            out.println("Principal: " + p.getName() + "<p>");
+        }
+
+        out.println("<br><b>Roles</b><p>");
+        List<String> roleListToCheck = Arrays.asList("Admin", "Manager", "User", "Authenticated");
+        for (String item: roleListToCheck) {
+            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>" );
+        }
+
+        if (p instanceof FederationPrincipal) {
+            FederationPrincipal fp = (FederationPrincipal)p;
+
+            out.println("<br><b>Claims</b><p>");
+            ClaimCollection claims = fp.getClaims();
+            for (Claim c: claims) {
+                out.println(c.getClaimType().toString() + ": " + c.getValue() + "<p>");
+            }
+        }
+        else {
+            out.println("Principal is not instance of FederationPrincipal");
+        }
+
+        Element el = SecurityTokenThreadLocal.getToken();
+        if (el != null) {
+            out.println("<p>Bootstrap token...");
+            String token = null;
+            try {
+                TransformerFactory transFactory = TransformerFactory.newInstance();
+                Transformer transformer = transFactory.newTransformer();
+                StringWriter buffer = new StringWriter();
+                transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+                transformer.transform(new DOMSource(el),
+                        new StreamResult(buffer));
+                token = buffer.toString();
+                out.println("<p>" + StringEscapeUtils.escapeXml(token));
+            } catch (Exception ex) {
+                out.println("<p>Failed to transform cached element to string: " + ex.toString());
+            }
+        }
+        else {
+            out.println("<p>Bootstrap token not cached in thread local storage");
+        }
+
+        out.println("</body>");
+    }
+
+
+    public void doPost(HttpServletRequest request, HttpServletResponse response)
+    throws ServletException, IOException {
+
+        response.setContentType("text/html");
+        PrintWriter out = response.getWriter();
+
+        out.println("<html>");
+        out.println("<head><title>WS Federation Tomcat Examples</title></head>");
+        out.println("<body>");
+        out.println("<h1>Hello World</h1>");
+        out.println("Hello world<br>");
+        out.println("Request url: " + request.getRequestURL().toString() + "<p>");
+
+
+
+        out.println("<br><b>User</b><p>");
+        Principal p = request.getUserPrincipal();
+        if (p != null) {
+            out.println("Principal: " + p.getName() + "<p>");
+        }
+
+        out.println("<br><b>Roles</b><p>");
+        List<String> roleListToCheck = Arrays.asList("Admin", "Manager", "User", "Authenticated");
+        for (String item: roleListToCheck) {
+            out.println("Has role '" + item + "': " + ((request.isUserInRole(item)) ? "<b>yes</b>" : "no") + "<p>" );
+        }
+
+        if (p instanceof FederationPrincipal) {
+            FederationPrincipal fp = (FederationPrincipal)p;
+
+            out.println("<br><b>Claims</b><p>");
+            ClaimCollection claims = fp.getClaims();
+            for (Claim c: claims) {
+                out.println(c.getClaimType().toString() + ": " + c.getValue() + "<p>");
+            }
+        }
+        else {
+            out.println("Principal is not instance of FederationPrincipal");
+        }
+
+        Greeter service = (Greeter)ApplicationContextProvider.getContext().getBean("HelloServiceClient");
+        String reply = service.greetMe();
+        
+        out.println("<br><b>Greeter Service Response: " + reply + "</b><p>");
+
+        out.println("</body>");
+    }
+
+}

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/SecurityTokenThreadLocal.java Fri Apr 13 08:45:58 2012
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cxf.fediz.example;
+
+import org.w3c.dom.Element;
+
+
+/**
+* Thread local storage for security token
+*
+*/
+public class SecurityTokenThreadLocal {
+
+	private static final ThreadLocal<Element> threadToken = 
+	       new ThreadLocal<Element>() {
+	};
+	
+	public static void setToken(Element token) {
+		threadToken.set(token);
+	}
+	
+	public static Element getToken() {
+		return threadToken.get();
+	}
+}

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/java/org/apache/cxf/fediz/example/ThreadLocalCallbackHandler.java Fri Apr 13 08:45:58 2012
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cxf.fediz.example;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
+
+import org.apache.cxf.ws.security.trust.delegation.DelegationCallback;
+import org.apache.ws.security.util.DOM2Writer;
+
+
+
+
+/**
+ * This CallbackHandler implementation obtains the security token from
+ * the thread local storage to be used as the delegation token.
+ */ 
+public class ThreadLocalCallbackHandler implements CallbackHandler {
+
+    private static Logger log = LoggerFactory.getLogger(ThreadLocalCallbackHandler.class);
+
+
+    public void handle(Callback[] callbacks)
+    throws IOException, UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            if (callbacks[i] instanceof DelegationCallback) {
+                DelegationCallback callback = (DelegationCallback) callbacks[i];
+                Element token = SecurityTokenThreadLocal.getToken();
+                if (token == null) {
+                    log.error("Security token not cached in thread local storage. Check configuration");
+                } else {
+                    if(log.isDebugEnabled()){
+                        log.debug("******************** TOKEN ********************");
+                        log.debug(DOM2Writer.nodeToString(token));
+                        log.debug("****************** END TOKEN *******************");
+                    }
+                    callback.setToken(token);     
+                }
+
+            } else {
+                throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
+            }
+        }
+    }
+
+}

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/log4j.properties?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/log4j.properties (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/log4j.properties Fri Apr 13 08:45:58 2012
@@ -0,0 +1,17 @@
+# Set root category priority to INFO and its only appender to CONSOLE.
+log4j.rootCategory=FATAL, CONSOLE
+#log4j.rootCategory=DEBUG, CONSOLE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=DEBUG
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=target/wss4j.log
+log4j.appender.LOGFILE.Append=false
+log4j.appender.LOGFILE.Threshold=DEBUG
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/logging.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/logging.properties?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/logging.properties (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/logging.properties Fri Apr 13 08:45:58 2012
@@ -0,0 +1,52 @@
+############################################################
+#  	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
+#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers.  For any given facility this global level
+# can be overridden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= INFO
+
+############################################################
+# 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
+
+
+############################################################
+# 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

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/tomcatKeystore.jks
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/tomcatKeystore.jks?rev=1325659&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cxf/sandbox/fediz/fediz-examples/webapp/src/main/resources/tomcatKeystore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/META-INF/context.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/META-INF/context.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/META-INF/context.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/META-INF/context.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,4 @@
+<Context>
+        <Valve className="org.apache.cxf.fediz.tomcat.FederationAuthenticator" issuerURL="https://localhost:9443/fedizidp/" truststoreFile="conf/stsstore.jks" truststorePassword="stsspass" trustedIssuer=".*CN=www.sts.com.*" />
+        <!--Valve className="org.apache.cxf.fediz.tomcat.FederationAuthenticator" issuerCallbackHandler="org.apache.cxf.fediz.tomcat.DummyIDPCallbackHandler" truststoreFile="conf/stsstore.jks" truststorePassword="stsspass" />-->        
+</Context>

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/beans.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/beans.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/beans.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
+	xmlns:cxf="http://cxf.apache.org/core" xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:http="http://cxf.apache.org/transports/http/configuration"
+	xmlns:sec="http://cxf.apache.org/configuration/security"
+	xsi:schemaLocation="
+        http://cxf.apache.org/core                   	http://cxf.apache.org/schemas/core.xsd
+        http://cxf.apache.org/jaxws                  	http://cxf.apache.org/schemas/jaxws.xsd
+        http://www.springframework.org/schema/beans    	http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+        http://www.springframework.org/schema/context  	http://www.springframework.org/schema/context/spring-context-3.0.xsd
+        http://cxf.apache.org/transports/http/configuration
+        http://cxf.apache.org/schemas/configuration/http-conf.xsd
+        http://cxf.apache.org/configuration/security
+        http://cxf.apache.org/schemas/configuration/security.xsd">
+
+	<import resource="classpath:META-INF/cxf/cxf.xml" />
+
+	<context:component-scan base-package="org.apache.cxf.fediz.example" />
+	<context:annotation-config />
+
+	<cxf:bus>
+		<cxf:features>
+			<cxf:logging />
+		</cxf:features>
+	</cxf:bus>
+
+	<bean id="delegationCallbackHandler"
+		class="org.apache.cxf.fediz.example.ThreadLocalCallbackHandler" />
+
+	<jaxws:client id="HelloServiceClient" serviceName="svc:GreeterService"
+		xmlns:svc="http://apache.org/hello_world_soap_http"
+		serviceClass="org.apache.hello_world_soap_http.Greeter"
+		address="https://localhost:10443/fedizservice/GreeterService"
+		wsdlLocation="WEB-INF/wsdl/hello_world.wsdl">
+		<jaxws:properties>
+			<entry key="ws-security.sts.client">
+				<bean class="org.apache.cxf.ws.security.trust.STSClient">
+					<constructor-arg ref="cxf" />
+					<property name="wsdlLocation" value="https://localhost:9443/fedizidpsts/STSServiceTransport?wsdl" />
+					<property name="serviceName"
+						value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService" />
+					<property name="endpointName"
+						value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port" />
+					<property name="onBehalfOf" ref="delegationCallbackHandler" />
+					<property name="enableAppliesTo" value="true" />
+					<property name="properties">
+						<map>
+
+						</map>
+					</property>
+				</bean>
+			</entry>
+			<entry key="ws-security.cache.issued.token.in.endpoint" value="false" />
+		</jaxws:properties>
+	</jaxws:client>
+
+
+	<!-- TLS settings for TransportBinding test-case -->
+	<http:conduit name="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port.http-conduit">
+		<http:tlsClientParameters disableCNCheck="true">
+			<sec:trustManagers>
+				<sec:keyStore type="jks" password="tompass" resource="tomcatKeystore.jks" />
+			</sec:trustManagers>
+		</http:tlsClientParameters>
+	</http:conduit>
+
+    <!--  STS WSDL download -->
+	<http:conduit name="https://localhost:9443/.*">
+		<http:tlsClientParameters disableCNCheck="true">
+			<sec:trustManagers>
+				<sec:keyStore type="jks" password="tompass" resource="tomcatKeystore.jks" />
+			</sec:trustManagers>
+		</http:tlsClientParameters>
+	</http:conduit>
+
+	<http:conduit
+		name="{http://apache.org/hello_world_soap_http}GreeterSoapPort.http-conduit">
+		<http:tlsClientParameters disableCNCheck="true">
+			<sec:trustManagers>
+				<sec:keyStore type="jks" password="tompass" resource="tomcatKeystore.jks" />
+			</sec:trustManagers>
+		</http:tlsClientParameters>
+	</http:conduit>
+
+</beans>
\ No newline at end of file

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/web.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/web.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/web.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,68 @@
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+	version="3.0" metadata-complete="true">
+
+	<description>
+    WS Federation Tomcat Example
+    </description>
+	<display-name>WS Federation Tomcat Example</display-name>
+
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>WEB-INF/beans.xml</param-value>
+  </context-param>
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+
+	<filter>
+		<filter-name>FederationFilter</filter-name>
+		<filter-class>org.apache.cxf.fediz.example.FederationFilter</filter-class>
+		<!--
+		<init-param>
+			<param-name>security.token.attribute</param-name>
+			<param-value>org.apache.fediz.SECURITY_TOKEN</param-value>
+		</init-param>
+		-->
+	</filter>
+
+	<!-- now map this filter to a URL-pattern -->
+	<filter-mapping>
+		<filter-name>FederationFilter</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+
+	<servlet>
+		<servlet-name>FederationServlet</servlet-name>
+		<servlet-class>org.apache.cxf.fediz.example.FederationServlet</servlet-class>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>FederationServlet</servlet-name>
+		<url-pattern>/secure/fedservlet</url-pattern>
+	</servlet-mapping>
+
+	<security-role>
+		<role-name>Manager</role-name>
+		<role-name>User</role-name>
+		<role-name>Admin</role-name>
+		<role-name>Authenticated</role-name>
+	</security-role>
+
+	<security-constraint>
+		<web-resource-collection>
+			<web-resource-name>Protected Area</web-resource-name>
+			<url-pattern>/secure/*</url-pattern>
+		</web-resource-collection>
+		<auth-constraint>
+			<role-name>*</role-name>
+		</auth-constraint>
+	</security-constraint>
+
+	<login-config>
+		<auth-method>WSFED</auth-method>
+		<realm-name>WSFED</realm-name>
+	</login-config>
+
+</web-app>

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl Fri Apr 13 08:45:58 2012
@@ -0,0 +1,157 @@
+<?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: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"
+    xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+    xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512"
+    xmlns:wsaw="http://www.w3.org/2005/08/addressing"     
+    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">
+        <wsp:PolicyReference URI="#BindingTransportSAMLPolicy" />
+        <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="GreeterService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="GreeterSoapPort">
+            <soap:address location="https://localhost:9001/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+    
+    
+     	<wsp:Policy wsu:Id="BindingTransportSAMLPolicy">
+		<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 RequireClientCertificate="false" />
+							</wsp:Policy>
+						</sp:TransportToken>
+						<sp:AlgorithmSuite>
+							<wsp:Policy>
+								<sp:TripleDesRsa15 />
+							</wsp:Policy>
+						</sp:AlgorithmSuite>
+						<sp:Layout>
+							<wsp:Policy>
+								<sp:Lax />
+							</wsp:Policy>
+						</sp:Layout>
+						<sp:IncludeTimestamp />
+					</wsp:Policy>
+				</sp:TransportBinding>
+				<sp:SupportingTokens
+					xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+					<wsp:Policy>
+						<sp:IssuedToken
+							sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+							<sp:RequestSecurityTokenTemplate>
+								<t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
+								<t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
+							</sp:RequestSecurityTokenTemplate>
+							<wsp:Policy>
+								<sp:RequireInternalReference />
+							</wsp:Policy>
+							<sp:Issuer>
+								<wsaw:Address>http://localhost:8080/DoubleItSTS/DoubleItSTSServiceUT
+								</wsaw:Address>
+							</sp:Issuer>
+						</sp:IssuedToken>
+					</wsp:Policy>
+				</sp:SupportingTokens>
+				<sp:Wss11>
+					<wsp:Policy>
+						<sp:MustSupportRefIssuerSerial />
+						<sp:MustSupportRefThumbprint />
+						<sp:MustSupportRefEncryptedKey />
+					</wsp:Policy>
+				</sp:Wss11>
+				<sp:Trust13>
+					<wsp:Policy>
+						<sp:MustSupportIssuedTokens />
+						<sp:RequireClientEntropy />
+						<sp:RequireServerEntropy />
+					</wsp:Policy>
+				</sp:Trust13>
+			</wsp:All>
+		</wsp:ExactlyOne>
+	</wsp:Policy>
+</wsdl:definitions>
+

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/index.html?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/index.html (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/index.html Fri Apr 13 08:45:58 2012
@@ -0,0 +1,25 @@
+<!--
+  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.
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD><TITLE>WS Federation Tomcat Examples</TITLE>
+<META http-equiv=Content-Type content="text/html">
+</HEAD>
+<BODY>
+<P>
+<H3>Hello World</H3>
+<P></P>
+</BODY></HTML>

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/service.jsp
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/service.jsp?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/service.jsp (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/service.jsp Fri Apr 13 08:45:58 2012
@@ -0,0 +1,17 @@
+<html>
+<head><title>Delegate authenticated identity to web service</title></head>
+<body>
+
+<h1>Hello World</h1>
+<p>Request url: <%= request.getRequestURL() %></p>
+<br><b>User: <%= request.getUserPrincipal().getName() %></b></br>
+
+<br>
+
+<form action="fedservlet" method="POST">
+    <input type="SUBMIT" value="Call Service">
+</form>
+
+</br>
+</body>
+</html>

Added: cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/test.html
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/test.html?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/test.html (added)
+++ cxf/sandbox/fediz/fediz-examples/webapp/src/main/webapp/secure/test.html Fri Apr 13 08:45:58 2012
@@ -0,0 +1,25 @@
+<!--
+  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.
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD><TITLE>WS Federation Tomcat Examples</TITLE>
+<META http-equiv=Content-Type content="text/html">
+</HEAD>
+<BODY>
+<P>
+<H3>Secure Test</H3>
+<P></P>
+</BODY></HTML>

Added: cxf/sandbox/fediz/fediz-examples/webservice/common/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/common/pom.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/common/pom.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/common/pom.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,44 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+       <groupId>org.apache.cxf.fediz.examples</groupId>
+       <artifactId>webservice</artifactId>
+       <version>0.6-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.cxf.fediz.examples.webservice</groupId>
+    <artifactId>service-common</artifactId>
+    <name>Web Service common</name>
+    <version>0.6-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>${cxf.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/src/main/resources/wsdl/hello_world.wsdl</wsdl>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: cxf/sandbox/fediz/fediz-examples/webservice/common/src/main/resources/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/common/src/main/resources/wsdl/hello_world.wsdl?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/common/src/main/resources/wsdl/hello_world.wsdl (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/common/src/main/resources/wsdl/hello_world.wsdl Fri Apr 13 08:45:58 2012
@@ -0,0 +1,91 @@
+<?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="GreeterService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="GreeterSoapPort">
+            <soap:address location="https://localhost:9001/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+

Added: cxf/sandbox/fediz/fediz-examples/webservice/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/pom.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/pom.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/pom.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+       <groupId>org.apache.cxf.fediz.examples</groupId>
+       <artifactId>fediz-examples</artifactId>
+       <version>0.6-SNAPSHOT</version>
+    </parent>
+    <artifactId>webservice</artifactId>
+    <name>WS-Federation web service</name>
+    <version>0.6-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <cxf.version>2.5.2</cxf.version>
+    </properties>
+
+    <modules>
+        <module>common</module>
+        <module>service</module>
+    </modules>
+</project>

Added: cxf/sandbox/fediz/fediz-examples/webservice/service/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/service/pom.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/service/pom.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/service/pom.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,85 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+       <groupId>org.apache.cxf.fediz.examples</groupId>
+       <artifactId>webservice</artifactId>
+       <version>0.6-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.cxf.fediz.examples.webservice</groupId>
+    <artifactId>service-war</artifactId>
+    <name>Web Service implementation</name>
+    <version>0.6-SNAPSHOT</version>
+    <packaging>war</packaging>
+
+
+    <build>
+        <plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.1.1</version>
+				<configuration>
+					<webResources>
+						<resource>
+							<directory>src/main/webapp</directory>
+						</resource>
+					</webResources>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>tomcat-maven-plugin</artifactId>
+				<version>1.1</version>
+				<configuration>
+					<server>myTomcat</server>
+					<url>http://localhost:10080/manager</url>
+					<path>/${project.build.finalName}</path>
+				</configuration>
+			</plugin>
+        </plugins>
+                <finalName>fedizservice</finalName>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf.fediz.examples.webservice</groupId>
+            <artifactId>service-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <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-jetty</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-rt-ws-security</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-jdk14</artifactId>
+            <version>1.6.1</version>
+            <scope>runtime</scope>
+        </dependency>
+
+    </dependencies>
+</project>

Added: cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/java/org/apache/cxf/fediz/examples/service/GreeterImpl.java Fri Apr 13 08:45:58 2012
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cxf.fediz.examples.service;
+
+import java.util.logging.Logger;
+import java.security.Principal;
+
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+import org.apache.hello_world_soap_http.Greeter;
+
+public class GreeterImpl implements Greeter {
+
+    private static final Logger LOG = Logger.getLogger(GreeterImpl.class.getPackage().getName());
+
+	@Resource
+	WebServiceContext context = null;
+
+    public String greetMe() {
+        LOG.info("Executing operation greetMe");
+        System.out.println("Executing operation greetMe");
+        if (context == null) {
+           return "Unknown user";
+        }
+        else {
+           Principal p = context.getUserPrincipal();
+           if (p == null) {
+             return "Principal null";
+           }
+           return p.getName();
+        }
+    }
+
+}

Added: cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsKeystore.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsKeystore.properties?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsKeystore.properties (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsKeystore.properties Fri Apr 13 08:45:58 2012
@@ -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=stsspass
+org.apache.ws.security.crypto.merlin.keystore.file=stsstore.jks
+

Added: cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsstore.jks
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsstore.jks?rev=1325659&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/resources/stsstore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/beans.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/beans.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/beans.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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:context="http://www.springframework.org/schema/context"
+	xmlns:jaxws="http://cxf.apache.org/jaxws"
+	xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+		http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+	<import resource="classpath:META-INF/cxf/cxf.xml" />
+
+	<cxf:bus>
+		<cxf:features>
+			<cxf:logging />
+		</cxf:features>
+	</cxf:bus>
+
+	<!-- GreeterService -->
+	<jaxws:endpoint id="GreeterService" implementor="org.apache.cxf.fediz.examples.service.GreeterImpl"
+		wsdlLocation="WEB-INF/wsdl/hello_world.wsdl" serviceName="svc:GreeterService"
+		xmlns:svc="http://apache.org/hello_world_soap_http" address="/GreeterService">
+
+		<jaxws:properties>
+			<entry key="ws-security.signature.properties" value="stsKeystore.properties" />
+		</jaxws:properties>
+
+		<jaxws:features>
+		</jaxws:features>
+
+	</jaxws:endpoint>
+
+</beans>

Added: cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/web.xml?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/web.xml (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/web.xml Fri Apr 13 08:45:58 2012
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+	<context-param>
+		<param-name>contextConfigLocation</param-name>		
+		<param-value>WEB-INF/beans.xml</param-value>
+	</context-param>
+
+	<listener>
+		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+</web-app>
\ No newline at end of file

Added: cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl?rev=1325659&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl (added)
+++ cxf/sandbox/fediz/fediz-examples/webservice/service/src/main/webapp/WEB-INF/wsdl/hello_world.wsdl Fri Apr 13 08:45:58 2012
@@ -0,0 +1,157 @@
+<?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: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"
+    xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+    xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512"
+    xmlns:wsaw="http://www.w3.org/2005/08/addressing"     
+    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">
+        <wsp:PolicyReference URI="#BindingTransportSAMLPolicy" />
+        <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="GreeterService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="GreeterSoapPort">
+            <soap:address location="https://localhost:9001/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+    
+    
+     	<wsp:Policy wsu:Id="BindingTransportSAMLPolicy">
+		<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 RequireClientCertificate="false" />
+							</wsp:Policy>
+						</sp:TransportToken>
+						<sp:AlgorithmSuite>
+							<wsp:Policy>
+								<sp:TripleDesRsa15 />
+							</wsp:Policy>
+						</sp:AlgorithmSuite>
+						<sp:Layout>
+							<wsp:Policy>
+								<sp:Lax />
+							</wsp:Policy>
+						</sp:Layout>
+						<sp:IncludeTimestamp />
+					</wsp:Policy>
+				</sp:TransportBinding>
+				<sp:SupportingTokens
+					xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+					<wsp:Policy>
+						<sp:IssuedToken
+							sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+							<sp:RequestSecurityTokenTemplate>
+								<t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
+								<t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
+							</sp:RequestSecurityTokenTemplate>
+							<wsp:Policy>
+								<sp:RequireInternalReference />
+							</wsp:Policy>
+							<sp:Issuer>
+								<wsaw:Address>http://localhost:8080/DoubleItSTS/DoubleItSTSServiceUT
+								</wsaw:Address>
+							</sp:Issuer>
+						</sp:IssuedToken>
+					</wsp:Policy>
+				</sp:SupportingTokens>
+				<sp:Wss11>
+					<wsp:Policy>
+						<sp:MustSupportRefIssuerSerial />
+						<sp:MustSupportRefThumbprint />
+						<sp:MustSupportRefEncryptedKey />
+					</wsp:Policy>
+				</sp:Wss11>
+				<sp:Trust13>
+					<wsp:Policy>
+						<sp:MustSupportIssuedTokens />
+						<sp:RequireClientEntropy />
+						<sp:RequireServerEntropy />
+					</wsp:Policy>
+				</sp:Trust13>
+			</wsp:All>
+		</wsp:ExactlyOne>
+	</wsp:Policy>
+</wsdl:definitions>
+