cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r980113 - in /cxf/trunk: distribution/src/main/release/samples/ distribution/src/main/release/samples/jax_rs/spring_security/ distribution/src/main/release/samples/jax_rs/spring_security/src/ distribution/src/main/release/samples/jax_rs/spr...
Date Wed, 28 Jul 2010 16:23:24 GMT
Author: dkulp
Date: Wed Jul 28 16:23:23 2010
New Revision: 980113

URL: http://svn.apache.org/viewvc?rev=980113&view=rev
Log:
Add Sergey's JAX-RS with  Spring Security sample

Added:
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/build.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/log4j.properties   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/Client.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/add_customer.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/update_customer.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/AbstractCustomerServiceSecured.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Customer.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerService.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceImpl.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecured.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecuredImpl.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Order.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Product.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/SecurityExceptionMapper.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/servlet/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/servlet/Server.java   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/beans.xml   (with props)
    cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml   (with props)
Modified:
    cxf/trunk/distribution/src/main/release/samples/pom.xml
    cxf/trunk/parent/pom.xml
    cxf/trunk/systests/jaxrs/pom.xml

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/README.txt Wed Jul 28 16:23:23 2010
@@ -0,0 +1,165 @@
+JAX-RS Spring Security Demo 
+===========================
+
+The demo shows how to use Spring Security to secure a JAXRS-based RESTful service.
+ 
+Two approaches toward securing a service are shown :
+- using Spring Security @Secured annotations
+- using AspectJ pointcut expressions
+
+Additionally, the JAXRS annotations inheritance is demonstrated, from interface and abstract class 
+definitions.
+
+
+Prerequisites
+-------------
+Please read the SpringSecurity documentation available at http://static.springframework.org/spring-security/site/reference/html/springsecurity.html.
+
+If you'd like to run a demo with Ant :
+ - Download a Spring Framework distribution from http://www.springsource.org/download and unzip/untar it,
+   as Fuse does not ship spring-aop.jar. Note the spring version used by Fuse and download a corresponding
+   framework distribution.    
+ - Download a Spring Security distribution from http://www.springsource.org/download and unzip/untar it.
+   2.0.4 version was used to develop this demo but newer versions will also work.
+ - Download an AspectJ distribution from http://www.eclipse.org/aspectj/downloads.php
+
+Additionally, 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 set the environment as 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.
+
+
+Building and running the demo using Ant
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the Ant build.xml file can be used to build and run the demo. 
+The server and client targets automatically build the demo.
+
+Using either UNIX or Windows:
+
+  ant server -Dspring.home=%SPRING_HOME% -Dspring.security.home=%SPRING_SECURITY_HOME% -Daspectj.home=%ASPECTJ_HOME%
+     (from one command line window)
+
+  ant client  (from a second command line window)
+    
+
+To remove the .class files, either delete the build directory and its contents or run:
+
+ant clean
+
+
+Building and running the demo using maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the maven pom.xml file can be used to build and run the demo. 
+
+
+Using either UNIX or Windows:
+
+  mvn install
+  mvn -Pserver  (from one command line window)
+  mvn -Pclient  (from a second command line window)
+    
+
+To remove the target dir, run "mvn clean".
+
+
+Building the demo using 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 
+compile the provided client and server applications with the commands:
+
+For UNIX:  
+  mkdir -p build/classes
+  
+  export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf-manifest.jar:./build/classes
+  javac -d build/classes src/demo/jaxrs/client/*.java
+  javac -d build/classes src/demo/jaxrs/server/*.java
+
+For Windows:
+  mkdir build\classes
+    Must use back slashes.
+
+  set classpath=%classpath%;%CXF_HOME%\lib\cxf-manifest.jar;.\build\classes
+  javac -d build\classes src\demo\jaxrs\client\*.java
+  javac -d build\classes src\demo\jaxrs\service\*.java
+  javac -d build\classes src\demo\jaxrs\servlet\*.java
+
+Finally, copy resource files into the build/classes directory with the commands:
+
+For UNIX:    
+  cp ./src/demo/jaxrs/client/*.xml ./build/classes/demo/jaxrs/client
+
+For Windows:
+  copy src\demo\jaxrs\client\*.xml build\classes\demo\jaxrs\client
+
+
+Running the demo using java
+---------------------------
+
+From the samples/jax-rs/spring_security directory run the following commands. They 
+are entered on a single command line.
+
+For UNIX (must use forward slashes):
+    java -Djava.util.logging.config.file=$CXF_HOME/etc/logging.properties
+         demo.jaxrs.servlet.Server &
+
+    java -Djava.util.logging.config.file=$CXF_HOME/etc/logging.properties
+         demo.jaxrs.client.Client
+
+The server process starts in the background.  After running the client,
+use the kill command to terminate the server process.
+
+For Windows (may use either forward or back slashes):
+  start 
+    java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties
+       demo.jaxrs.servlet.Server
+
+    java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties
+       demo.jaxrs.client.Client
+
+A new command windows opens for the server process.  After running the
+client, terminate the server process by issuing Ctrl-C in its command window.
+
+To remove the .class files, either delete the build directory and its contents or run:
+
+  ant clean
+
+
+What happens when a demo is run
+-------------------------------
+
+The demo web application located in a webapp folder is configured for two users, fred and bob, be able to
+access various methods of a customer service bean. 
+
+Fred is in both ROLE_CUSTOMER and ROLE_ADMIN roles, while Bob is in the ROLE_CUSTOMER role only.
+After the server starts, the client is run and it's shown that Fred can access all the methods
+while Bob can access only those which ROLE_CUSTOMER users are permitted to. 
+
+By default, the demo is configured to use AspectJ pointcut expressions to apply ACL rules to a service bean.
+Please see webapp/WEB-INF/beans.xml as well as src/demo/jaxrs/service.
+
+demo.jaxrs.service.CustomerServiceImpl bean implements CustomerService interface. AspectJ expressions are applied to interface methods. Note, neither CustomerService interface nor its CustomerServiceImpl implementation have security-specific annotations. CustomerService interface does have JAXRS annotations which are inherited by the service bean.
+
+To see the @Secured annotations in action, please uncomment 
+
+<bean id="customerservice" class="demo.jaxrs.service.CustomerServiceSecuredImpl"/>
+
+and comment the one used by default :
+
+<bean id="customerservice" class="demo.jaxrs.service.CustomerServiceImpl"/>
+
+Note this time @Secured annotations are coming from a CustomerServiceSecured interface, while
+JAXRS annotations are inherited from AbstractCustomerServiceSecured class. Also the secure annotations have to be explictly enabled in the configuration :
+
+<security:global-method-security secured-annotations="enabled"/>
+
+Basic authentication is used to provide user credentials to a service. 
+No HTTPS protocol is used in this demo for simplicity only.

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

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

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/build.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/build.xml?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/build.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/build.xml Wed Jul 28 16:23:23 2010
@@ -0,0 +1,79 @@
+<?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.
+-->
+<project name="JAX-RS Spring Security demo" default="build" basedir=".">
+    <property name="codegen.notrequired" value="true"/>
+
+    <import file="../../common_build.xml"/>        
+
+    <property name="spring.dist" location="${spring.home}/dist/modules"/> 
+    <property name="aspectj.lib" location="${aspectj.home}/lib"/>
+    <property name="spring.security.version" value="2.0.4"/>
+    <property name="spring.security.dist" location="${spring.security.home}/dist"/>
+
+    <path id="spring.extra.classpath">
+        <pathelement location="${spring.dist}/spring-aop.jar"/> 
+    </path>
+
+    <path id="spring.security.classpath">
+        <pathelement location="${spring.security.dist}/spring-security-core-${spring.security.version}.jar"/>
+        <pathelement location="${spring.security.dist}/spring-security-core-tiger-${spring.security.version}.jar"/>
+    </path>
+
+    <path id="aspectj.classpath">
+        <pathelement location="${aspectj.lib}/aspectjrt.jar"/>
+        <pathelement location="${aspectj.lib}/aspectjweaver.jar"/>
+    </path>
+        
+    <target name="client" description="run demo client" depends="build">
+        <cxfrun classname="demo.jaxrs.client.Client"/>
+    </target> 
+        
+    <target name="server" description="run demo server" depends="build">
+         <java classname="demo.jaxrs.servlet.Server" fork="yes">
+                <classpath>
+                    <path refid="cxf.classpath"/>
+                    <path refid="spring.extra.classpath"/>
+                    <path refid="spring.security.classpath"/>
+                    <path refid="aspectj.classpath"/>
+                    <path refid="jdk.tools.classpath"/>
+                </classpath>
+                <jvmarg value="-Dcxf.home=${cxf.home}"/> 
+         </java> 
+    </target>
+
+    <target name="compile" depends="maybe.generate.code">
+        <mkdir dir="${build.classes.dir}"/>
+        <mkdir dir="${build.src.dir}"/>
+
+        <javac destdir="${build.classes.dir}" debug="true">
+            <src path="${build.src.dir}"/>
+            <src path="${basedir}/src"/>
+            <classpath>
+                <path refid="cxf.classpath"/>
+                <path refid="spring.security.classpath"/>
+            </classpath>
+        </javac>
+
+        <copy todir="${build.classes.dir}">
+            <fileset dir="${basedir}/src" includes="**/*.xml" />
+        </copy>
+    </target> 
+
+</project>

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

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

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

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/log4j.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/log4j.properties?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/log4j.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/log4j.properties Wed Jul 28 16:23:23 2010
@@ -0,0 +1,30 @@
+#
+#
+#    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.
+#
+#
+
+# Global logging configuration
+log4j.rootLogger=WARN, stdout
+
+log4j.logger.org.springframework.security=DEBUG, stdout
+
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.conversionPattern=[%p,%c{1},%t] %m%n

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/log4j.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/log4j.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml Wed Jul 28 16:23:23 2010
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project 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>
+    <groupId>org.apache.cxf.samples</groupId>
+    <artifactId>jax_rs_spring_security</artifactId>
+    <parent>
+        <groupId>org.apache.cxf.samples</groupId>
+        <artifactId>cxf-samples</artifactId>
+        <version>2.3.0-SNAPSHOT</version>
+    </parent>
+    <properties>
+        <cxf.version>${project.version}</cxf.version>
+        <aspectj.version>1.5.4</aspectj.version>
+    </properties>
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <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/jaxrs/client/add_customer.xml" todir="${basedir}/target/classes/demo/jaxrs/client"/>
+	    	               <copy file="${basedir}/src/demo/jaxrs/client/update_customer.xml" todir="${basedir}/target/classes/demo/jaxrs/client"/>
+	    	            </tasks>
+	    	        </configuration>
+	    	    </execution>
+	    	</executions>
+            </plugin>
+        </plugins>
+    </build>   
+    <profiles>
+        <profile>
+            <id>server</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>demo.jaxrs.servlet.Server</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>client</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>demo.jaxrs.client.Client</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <!-- This dependency is needed if you're using the Jetty container -->
+        <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-frontend-jaxrs</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+
+        <dependency>
+              <groupId>org.springframework</groupId>
+              <artifactId>spring-core</artifactId>
+        </dependency>
+ 
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-aop</artifactId>
+        </dependency>
+
+        <dependency>
+          <groupId>org.springframework</groupId>
+          <artifactId>spring-context</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-dao</artifactId>
+        </dependency> 
+
+        <dependency>
+           <groupId>org.springframework.security</groupId>
+           <artifactId>spring-security-core-tiger</artifactId>
+        </dependency> 
+
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjrt</artifactId>
+            <version>${aspectj.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjweaver</artifactId>
+            <version>${aspectj.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-webapp</artifactId>
+        </dependency>
+    </dependencies>
+</project>

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

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

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

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/Client.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/Client.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/Client.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,158 @@
+/**
+ * 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.jaxrs.client;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.methods.DeleteMethod;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.commons.httpclient.methods.RequestEntity;
+
+import org.apache.cxf.common.util.Base64Utility;
+
+public final class Client {
+
+    private Client() {
+    }
+
+    public static void main(String args[]) throws Exception {
+
+        System.out.println("\n");
+        Client c = new Client();
+                
+        // 1. get customer info  
+        // 
+        c.getCustomerInfo("fred", "fred", 123);
+        c.getCustomerInfo("fred", "fredspassword", 123);
+        c.getCustomerInfo("bob", "bobspassword", 123);
+
+        // 2. add customer info  
+        // 
+        c.addCustomerInfo("fred", "fredspassword");
+        c.addCustomerInfo("bob", "bobspassword");
+         
+        // 3. update customer info  
+        // 
+        c.updateCustomerInfo("fred", "fredspassword");
+        c.updateCustomerInfo("bob", "bobspassword");
+
+        // 4. delete customer info  
+        // 
+        c.deleteCustomerInfo("bob", "bobspassword", 123);
+        c.deleteCustomerInfo("fred", "fredspassword", 123);
+        
+
+    }
+
+    public void getCustomerInfo(String name, String password, int id) throws Exception {
+               
+        System.out.println("HTTP GET to query customer info, user : " 
+            + name + ", password : " + password);
+        GetMethod get = 
+            new GetMethod("http://localhost:9002/customerservice/customers/" + id);
+        setMethodHeaders(get, name, password);
+        handleHttpMethod(get);
+    } 
+
+    public void addCustomerInfo(String name, String password) throws Exception {
+               
+        System.out.println("HTTP POST to add customer info, user : " 
+            + name + ", password : " + password);
+        PostMethod post = new PostMethod("http://localhost:9002/customerservice/customers");
+        setMethodHeaders(post, name, password);
+        RequestEntity entity = new InputStreamRequestEntity(
+            this.getClass().getResourceAsStream("add_customer.xml"));
+        post.setRequestEntity(entity);
+        
+        handleHttpMethod(post);
+    } 
+
+    public void updateCustomerInfo(String name, String password) throws Exception {
+               
+        System.out.println("HTTP PUT to update customer info, user : " 
+            + name + ", password : " + password);
+        PutMethod put = new PutMethod("http://localhost:9002/customerservice/customers/123");
+        setMethodHeaders(put, name, password);
+        RequestEntity entity = new InputStreamRequestEntity(
+            this.getClass().getResourceAsStream("update_customer.xml"));
+        put.setRequestEntity(entity);
+        
+        handleHttpMethod(put);
+    } 
+
+    public void deleteCustomerInfo(String name, String password, int id) throws Exception {
+               
+        System.out.println("HTTP DELETE to update customer info, user : " 
+            + name + ", password : " + password);
+        System.out.println("Confirming a customer with id " + id + " exists first");
+        getCustomerInfo(name, password, id);
+        System.out.println("Deleting now...");
+        DeleteMethod del = 
+            new DeleteMethod("http://localhost:9002/customerservice/customers/" + id);
+        setMethodHeaders(del, name, password);
+        handleHttpMethod(del);
+        System.out.println("Confirming a customer with id " + id + " does not exist anymore");
+        getCustomerInfo(name, password, id);
+    }  
+
+    private static void handleHttpMethod(HttpMethod httpMethod) throws Exception {
+        HttpClient client = new HttpClient();
+
+        try {
+            int statusCode = client.executeMethod(httpMethod);
+            System.out.println("Response status : " + statusCode); 
+
+            Response.Status status =  Response.Status.fromStatusCode(statusCode);
+
+            if (status == Response.Status.OK) {
+                System.out.println(httpMethod.getResponseBodyAsString());    
+            } else if (status == Response.Status.FORBIDDEN) {
+                System.out.println("Authorization failure");
+            } else if (status == Response.Status.UNAUTHORIZED) {
+                System.out.println("Authentication failure");
+            }
+            System.out.println(); 
+
+        } finally {
+            // release any connection resources used by the method
+            httpMethod.releaseConnection();
+        }  
+    }
+
+    private static void setMethodHeaders(HttpMethod httpMethod, String name, String password) {
+        if (httpMethod instanceof PostMethod || httpMethod instanceof PutMethod) {
+            httpMethod.setRequestHeader("Content-Type", "application/xml");
+        }         
+        httpMethod.setDoAuthentication(false);
+        httpMethod.setRequestHeader("Accept", "application/xml");
+        httpMethod.setRequestHeader("Authorization", 
+                             "Basic " + base64Encode(name + ":" + password));
+          
+    }
+
+    private static String base64Encode(String value) {
+        return Base64Utility.encode(value.getBytes());
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/Client.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/Client.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/add_customer.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/add_customer.xml?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/add_customer.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/add_customer.xml Wed Jul 28 16:23:23 2010
@@ -0,0 +1,3 @@
+<Customer>
+  <name>Jack</name>
+</Customer> 
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/add_customer.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/add_customer.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/add_customer.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/update_customer.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/update_customer.xml?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/update_customer.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/update_customer.xml Wed Jul 28 16:23:23 2010
@@ -0,0 +1,4 @@
+<Customer>
+  <name>Mary</name>
+  <id>123</id>
+</Customer> 
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/update_customer.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/update_customer.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/client/update_customer.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/AbstractCustomerServiceSecured.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/AbstractCustomerServiceSecured.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/AbstractCustomerServiceSecured.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/AbstractCustomerServiceSecured.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,74 @@
+/**
+ * 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.jaxrs.service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Response;
+
+@Path("/customerservice/")
+public abstract class AbstractCustomerServiceSecured implements CustomerServiceSecured {
+    
+    protected long currentId = 123;
+    protected Map<Long, Customer> customers = new HashMap<Long, Customer>();
+    protected Map<Long, Order> orders = new HashMap<Long, Order>();
+
+    protected AbstractCustomerServiceSecured() {
+        init();
+    } 
+
+    @GET
+    @Path("/customers/{id}/")
+    public abstract Customer getCustomer(@PathParam("id") String id);
+
+    @PUT
+    @Path("/customers/{id}")
+    public abstract Response updateCustomer(@PathParam("id") Long id, Customer customer);
+    
+    @POST
+    @Path("/customers/")
+    public abstract Response addCustomer(Customer customer);
+
+    @DELETE
+    @Path("/customers/{id}/")
+    public abstract Response deleteCustomer(@PathParam("id") String id);
+
+    @Path("/orders/{orderId}/")
+    public abstract Order getOrder(@PathParam("orderId") String orderId);
+
+    private void init() {
+        Customer c = new Customer();
+        c.setName("John");
+        c.setId(123);
+        customers.put(c.getId(), c);
+
+        Order o = new Order();
+        o.setDescription("order 223");
+        o.setId(223);
+        orders.put(o.getId(), o);
+    }
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/AbstractCustomerServiceSecured.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/AbstractCustomerServiceSecured.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Customer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Customer.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Customer.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Customer.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,43 @@
+/**
+ * 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.jaxrs.service;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "Customer")
+public class Customer {
+    private long id;
+    private String name;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Customer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Customer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerService.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerService.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerService.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,51 @@
+/**
+ * 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.jaxrs.service;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Response;
+
+@Path("/customerservice/")
+public interface CustomerService {
+    
+    @GET
+    @Path("/customers/{id}/")
+    Customer getCustomer(@PathParam("id") String id);
+
+    @PUT
+    @Path("/customers/{id}")
+    Response updateCustomer(@PathParam("id") Long id, Customer customer);
+    
+    @POST
+    @Path("/customers/")
+    Response addCustomer(Customer customer);
+
+    @DELETE
+    @Path("/customers/{id}/")
+    Response deleteCustomer(@PathParam("id") String id);
+
+    @Path("/orders/{orderId}/")
+    Order getOrder(@PathParam("orderId") String orderId);
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceImpl.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceImpl.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceImpl.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demo.jaxrs.service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+
+public class CustomerServiceImpl implements CustomerService {
+    long currentId = 123;
+    Map<Long, Customer> customers = new HashMap<Long, Customer>();
+    Map<Long, Order> orders = new HashMap<Long, Order>();
+
+    public CustomerServiceImpl() {
+        init();
+    }
+
+    public Customer getCustomer(String id) {
+        System.out.println("----invoking getCustomer, Customer id is: " + id);
+        long idNumber = Long.parseLong(id);
+        Customer c = customers.get(idNumber);
+        return c;
+    }
+
+    public Response updateCustomer(Long id, Customer customer) {
+        System.out.println("----invoking updateCustomer, Customer name is: " + customer.getName());
+        Customer c = customers.get(id);
+        if (c == null || c.getId() != customer.getId()) {
+            throw new WebApplicationException();
+        }
+        Response r;
+        if (c != null) {
+            customers.put(customer.getId(), customer);
+            r = Response.ok(customer).build();
+        } else {
+            r = Response.notModified().build();
+        }
+
+        return r;
+    }
+
+    public Response addCustomer(Customer customer) {
+        System.out.println("----invoking addCustomer, Customer name is: " + customer.getName());
+        customer.setId(++currentId);
+
+        customers.put(customer.getId(), customer);
+
+        return Response.ok(customer).build();
+    }
+
+    public Response deleteCustomer(String id) {
+        System.out.println("----invoking deleteCustomer, Customer id is: " + id);
+        long idNumber = Long.parseLong(id);
+        Customer c = customers.remove(idNumber);
+
+        Response r;
+        if (c != null) {
+            r = Response.ok().build();
+        } else {
+            r = Response.notModified().build();
+        }
+
+        return r;
+    }
+
+    public Order getOrder(String orderId) {
+        System.out.println("----invoking getOrder, Order id is: " + orderId);
+        long idNumber = Long.parseLong(orderId);
+        Order c = orders.get(idNumber);
+        return c;
+    }
+
+    final void init() {
+        Customer c = new Customer();
+        c.setName("John");
+        c.setId(123);
+        customers.put(c.getId(), c);
+
+        Order o = new Order();
+        o.setDescription("order 223");
+        o.setId(223);
+        orders.put(o.getId(), o);
+    }
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecured.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecured.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecured.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecured.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,42 @@
+/**
+ * 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.jaxrs.service;
+
+import javax.ws.rs.core.Response;
+import org.springframework.security.annotation.Secured;
+
+
+public interface CustomerServiceSecured {
+    
+    @Secured({"ROLE_CUSTOMER", "ROLE_ADMIN" })
+    Customer getCustomer(String id);
+
+    @Secured("ROLE_ADMIN")
+    Response updateCustomer(Long id, Customer customer);
+    
+    @Secured("ROLE_ADMIN")
+    Response addCustomer(Customer customer);
+
+    @Secured("ROLE_ADMIN")
+    Response deleteCustomer(String id);
+
+    @Secured({"ROLE_CUSTOMER", "ROLE_ADMIN" })
+    Order getOrder(String orderId);
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecured.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecured.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecuredImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecuredImpl.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecuredImpl.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecuredImpl.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,87 @@
+/**
+ * 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.jaxrs.service;
+
+
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+
+public class CustomerServiceSecuredImpl extends AbstractCustomerServiceSecured {
+
+    public CustomerServiceSecuredImpl() {
+    }
+
+    public Customer getCustomer(String id) {
+        System.out.println("----invoking getCustomer, Customer id is: " + id);
+        long idNumber = Long.parseLong(id);
+        Customer c = customers.get(idNumber);
+        return c;
+    }
+
+    public Response updateCustomer(Long id, Customer customer) {
+        System.out.println("----invoking updateCustomer, Customer name is: " + customer.getName());
+        Customer c = customers.get(id);
+        if (c == null || c.getId() != customer.getId()) {
+            throw new WebApplicationException();
+        }
+        Response r;
+        if (c != null) {
+            customers.put(customer.getId(), customer);
+            r = Response.ok(customer).build();
+        } else {
+            r = Response.notModified().build();
+        }
+
+        return r;
+    }
+
+    public Response addCustomer(Customer customer) {
+        System.out.println("----invoking addCustomer, Customer name is: " + customer.getName());
+        customer.setId(++currentId);
+
+        customers.put(customer.getId(), customer);
+
+        return Response.ok(customer).build();
+    }
+
+    public Response deleteCustomer(String id) {
+        System.out.println("----invoking deleteCustomer, Customer id is: " + id);
+        long idNumber = Long.parseLong(id);
+        Customer c = customers.remove(idNumber);
+
+        Response r;
+        if (c != null) {
+            r = Response.ok().build();
+        } else {
+            r = Response.notModified().build();
+        }
+
+        return r;
+    }
+
+    public Order getOrder(String orderId) {
+        System.out.println("----invoking getOrder, Order id is: " + orderId);
+        long idNumber = Long.parseLong(orderId);
+        Order c = orders.get(idNumber);
+        return c;
+    }
+
+    
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecuredImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/CustomerServiceSecuredImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Order.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Order.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Order.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Order.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,69 @@
+/**
+ * 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.jaxrs.service;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "Order")
+public class Order {
+    private long id;
+    private String description;
+    private Map<Long, Product> products = new HashMap<Long, Product>();
+
+    public Order() {
+        init();
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String d) {
+        this.description = d;
+    }
+
+    @GET
+    @Path("products/{productId}/")
+    public Product getProduct(@PathParam("productId")int productId) {
+        System.out.println("----invoking getProduct with id: " + productId);
+        Product p = products.get(new Long(productId));
+        return p;
+    }
+
+    final void init() {
+        Product p = new Product();
+        p.setId(323);
+        p.setDescription("product 323");
+        products.put(p.getId(), p);
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Order.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Order.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Product.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Product.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Product.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Product.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,43 @@
+/**
+ * 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.jaxrs.service;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "Product")
+public class Product {
+    private long id;
+    private String description;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String d) {
+        this.description = d;
+    }
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Product.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/Product.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/SecurityExceptionMapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/SecurityExceptionMapper.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/SecurityExceptionMapper.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/SecurityExceptionMapper.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.jaxrs.service;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+
+import org.springframework.security.AccessDeniedException;
+
+public class SecurityExceptionMapper implements ExceptionMapper<AccessDeniedException> {
+
+    public Response toResponse(AccessDeniedException exception) {
+        return Response.status(Response.Status.FORBIDDEN).build();
+    }
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/SecurityExceptionMapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/service/SecurityExceptionMapper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/servlet/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/servlet/Server.java?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/servlet/Server.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/servlet/Server.java Wed Jul 28 16:23:23 2010
@@ -0,0 +1,64 @@
+/**
+ * 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.jaxrs.servlet;
+
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.handler.DefaultHandler;
+import org.eclipse.jetty.server.handler.HandlerCollection;
+import org.eclipse.jetty.server.nio.SelectChannelConnector;
+import org.eclipse.jetty.webapp.WebAppContext;
+
+public class Server {
+
+    protected Server() throws Exception {
+        System.out.println("Starting Server");
+
+        /**
+         * Important: This code simply starts up a servlet container and adds
+         * the web application in src/webapp to it. Normally you would be using
+         * Jetty or Tomcat and have the webapp packaged as a WAR. This is simply
+         * as a convenience so you do not need to configure your servlet
+         * container to see CXF in action!
+         */
+        org.eclipse.jetty.server.Server server = new org.eclipse.jetty.server.Server();
+
+        SelectChannelConnector connector = new SelectChannelConnector();
+        connector.setPort(9002);
+        server.setConnectors(new Connector[] {connector});
+
+        WebAppContext webappcontext = new WebAppContext();
+        webappcontext.setContextPath("/");
+
+        webappcontext.setWar("webapp");
+
+        HandlerCollection handlers = new HandlerCollection();
+        handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()});
+
+        server.setHandler(handlers);
+        server.start();
+        System.out.println("Server ready...");
+        server.join();
+    }
+
+    public static void main(String args[]) throws Exception {
+        new Server();
+    }
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/servlet/Server.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/src/demo/jaxrs/servlet/Server.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/beans.xml?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/beans.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/beans.xml Wed Jul 28 16:23:23 2010
@@ -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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+  xmlns:aop="http://www.springframework.org/schema/aop"
+  xmlns:security="http://www.springframework.org/schema/security"
+  xsi:schemaLocation="
+http://www.springframework.org/schema/beans 
+http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/aop 
+http://www.springframework.org/schema/aop/spring-aop.xsd
+http://www.springframework.org/schema/security 
+http://www.springframework.org/schema/security/spring-security-2.0.4.xsd
+http://cxf.apache.org/jaxrs
+http://cxf.apache.org/schemas/jaxrs.xsd">
+
+  <import resource="classpath:META-INF/cxf/cxf.xml" />
+  <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
+  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+  <jaxrs:server id="bookservice" address="/">
+    <jaxrs:serviceBeans>
+      <ref bean="customerservice"/>
+    </jaxrs:serviceBeans>		   
+    <jaxrs:providers>
+        <bean class="demo.jaxrs.service.SecurityExceptionMapper"/>
+    </jaxrs:providers>
+  </jaxrs:server>
+
+  <bean id="customerservice" class="demo.jaxrs.service.CustomerServiceImpl"/>
+<!--
+  <bean id="customerservice" class="demo.jaxrs.service.CustomerServiceSecuredImpl"/>
+-->
+
+   
+  <security:global-method-security secured-annotations="enabled">
+      <security:protect-pointcut 
+        expression="execution(* demo.jaxrs.service.CustomerService.getCustomer(*))" 
+        access="ROLE_CUSTOMER, ROLE_ADMIN"/>
+      <security:protect-pointcut 
+        expression="execution(* demo.jaxrs.service.CustomerService.addCustomer(*))" 
+        access="ROLE_ADMIN"/>
+      <security:protect-pointcut 
+        expression="execution(* demo.jaxrs.service.CustomerService.updateCustomer(Long,demo.jaxrs.service.Customer))" 
+        access="ROLE_ADMIN"/> 
+      <security:protect-pointcut 
+        expression="execution(* demo.jaxrs.service.CustomerService.deleteCustomer(*))" 
+        access="ROLE_ADMIN"/>    
+      <security:protect-pointcut 
+        expression="execution(* demo.jaxrs.service.CustomerService.getOrder(*))" 
+        access="ROLE_CUSTOMER, ROLE_ADMIN"/> 
+  </security:global-method-security>
+  
+  <security:http auto-config='true'>
+    <security:http-basic />
+  </security:http>
+  
+  <security:authentication-provider>
+    <security:user-service>
+      <security:user name="bob" password="bobspassword" authorities="ROLE_CUSTOMER" />
+      <security:user name="fred" password="fredspassword" authorities="ROLE_CUSTOMER, ROLE_ADMIN" />
+    </security:user-service>
+  </security:authentication-provider> 
+</beans>
+

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml?rev=980113&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml Wed Jul 28 16:23:23 2010
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!--
+	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.
+-->
+<!-- START SNIPPET: webxml -->
+<web-app>
+	<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>springSecurityFilterChain</filter-name>
+         <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+        </filter>
+  
+        <filter-mapping>
+         <filter-name>springSecurityFilterChain</filter-name>
+         <url-pattern>/*</url-pattern>
+        </filter-mapping>
+
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-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>
+<!-- END SNIPPET: webxml -->
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/jax_rs/spring_security/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/trunk/distribution/src/main/release/samples/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/pom.xml?rev=980113&r1=980112&r2=980113&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/pom.xml Wed Jul 28 16:23:23 2010
@@ -72,6 +72,7 @@
         <module>jaxws_handlers</module>
         <module>wsdl_first_rpclit</module>
         <module>jms_pubsub</module>
+        <module>jax_rs/spring_security</module>
 
         <!--
         these are a bit fragile as they need to go off to external sites to get stuff like

Modified: cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=980113&r1=980112&r2=980113&view=diff
==============================================================================
--- cxf/trunk/parent/pom.xml (original)
+++ cxf/trunk/parent/pom.xml Wed Jul 28 16:23:23 2010
@@ -798,6 +798,80 @@
                 </exclusions>
             </dependency>
             <dependency>
+                <groupId>org.springframework.security</groupId>
+                <artifactId>spring-security-core-tiger</artifactId>
+                <version>2.0.4</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-core</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-dao</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-jdbc</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-remoting</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-support</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.security</groupId>
+                <artifactId>spring-security-acl</artifactId>
+                <version>2.0.4</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-core</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-dao</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-jdbc</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-remoting</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-support</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+            <dependency>
+                 <groupId>org.springframework</groupId>
+                 <artifactId>spring-dao</artifactId>
+                 <version>2.0.6</version>
+                 <exclusions>
+                  <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-jdbc</artifactId>
+                  </exclusion>
+                  <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>spring-remoting</artifactId>
+                  </exclusion> 
+                  <exclusion>
+                   <groupId>org.springframework</groupId>
+                   <artifactId>spring-support</artifactId>
+                  </exclusion>
+                </exclusions>
+             </dependency> 
+
+            <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>${spring.mock}</artifactId>
                 <version>${spring.version}</version>

Modified: cxf/trunk/systests/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/pom.xml?rev=980113&r1=980112&r2=980113&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/pom.xml (original)
+++ cxf/trunk/systests/jaxrs/pom.xml Wed Jul 28 16:23:23 2010
@@ -267,58 +267,12 @@
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core-tiger</artifactId>
-            <version>2.0.4</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-dao</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-jdbc</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-remoting</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-support</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-acl</artifactId>
-            <version>2.0.4</version>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-dao</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-jdbc</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-remoting</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-support</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>junit</groupId>



Mime
View raw message