[jbossws-commits] JBossWS SVN: r12487 - in stack/native/branches/dlofthouse/JBPAPP-4447: src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity and 5 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Jun 16 10:45:53 EDT 2010


Author: darran.lofthouse at jboss.com
Date: 2010-06-16 10:45:52 -0400 (Wed, 16 Jun 2010)
New Revision: 12487

Added:
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernamePwdDigestTestCase.java
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml
Removed:
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml
   stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml
Modified:
   stack/native/branches/dlofthouse/JBPAPP-4447/ant-import-tests/build-samples-jaxws.xml
Log:
Sending the first testsuite changes.

Modified: stack/native/branches/dlofthouse/JBPAPP-4447/ant-import-tests/build-samples-jaxws.xml
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-4447/ant-import-tests/build-samples-jaxws.xml	2010-06-16 14:39:27 UTC (rev 12486)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/ant-import-tests/build-samples-jaxws.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -174,6 +174,18 @@
         <include name="jboss-wsse-server.xml"/>
       </webinf>
     </war>
+
+    <!-- jaxws-samples-wssecurity-username-digest -->
+    <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurity-username-digest.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml">
+       <classes dir="${tests.output.dir}/classes">
+         <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UsernameEndpoint.class"/>
+         <include name="org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.class"/>
+       </classes>
+       <webinf dir="${tests.output.dir}/resources/jaxws/samples/wssecurity/username-digest/WEB-INF">
+         <include name="jboss-web.xml"/>
+         <include name="jboss-wsse-server.xml"/>
+       </webinf>
+    </war>      
     
     <!-- jaxws-samples-wssecurityAnnotatedpolicy-encrypt -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-wssecurityAnnotatedpolicy-encrypt.war" webxml="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml">

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernamePwdDigestTestCase.java (from rev 5908, stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernamePwdDigestTestCase.java)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-4447/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernamePwdDigestTestCase.java	                        (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernamePwdDigestTestCase.java	2010-06-16 14:45:52 UTC (rev 12487)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.wssecurity;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test WS-Security for Username Token with password digest
+ *
+ * @author alessio.soldano at jboss.com
+ * @since 10-Mar-2008
+ */
+public class UsernamePwdDigestTestCase extends JBossWSTest
+{
+   private static UsernameEndpoint port;
+
+   public static Test suite() throws Exception
+   {
+      return new JBossWSTestSetup(UsernamePwdDigestTestCase.class, "jaxws-samples-wssecurity-username-digest.war");
+   }
+
+   @Override
+   protected void setUp() throws Exception
+   {
+      if (port == null)
+      {
+         URL wsdlURL = new File("resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl").toURL();
+         URL securityURL = new File("resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml").toURL();
+         QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "UsernameService");
+
+         Service service = Service.create(wsdlURL, serviceName);
+
+         port = (UsernameEndpoint)service.getPort(UsernameEndpoint.class);
+         ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+         ((StubExt)port).setConfigName("Standard WSSecurity Client");
+      }
+   }
+
+   public void testUsernameTokenNegative() throws Exception
+   {
+      try
+      {
+         port.getUsernameToken();
+         fail("Server should respond with [401] - Unauthorized");
+      }
+      catch (Exception ex)
+      {
+         // this should be ok
+      }
+   }
+
+   public void testUsernameToken() throws Exception
+   {
+      Map<String, Object> reqContext = ((BindingProvider)port).getRequestContext();
+      reqContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+      reqContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+      String retObj = port.getUsernameToken();
+      assertEquals("kermit", retObj);
+   }
+}
\ No newline at end of file

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest)

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF)

Deleted: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml	2008-03-10 17:50:55 UTC (rev 5908)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
-  <config>
-      <username digestPassword="true"/>
-  </config>
-</jboss-ws-security>
\ No newline at end of file

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml	                        (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/jboss-wsse-client.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+  <config>
+      <username digestPassword="true"/>
+  </config>
+</jboss-ws-security>
\ No newline at end of file

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl)

Deleted: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl	2008-03-10 17:50:55 UTC (rev 5908)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl	2010-06-16 14:45:52 UTC (rev 12487)
@@ -1,30 +0,0 @@
-<definitions name='UsernameService' targetNamespace='http://org.jboss.ws/samples/wssecurity' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/wssecurity' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types/>
- <message name='UsernameEndpoint_getUsernameToken'></message>
- <message name='UsernameEndpoint_getUsernameTokenResponse'>
-  <part name='return' type='xsd:string'/>
- </message>
- <portType name='UsernameEndpoint'>
-  <operation name='getUsernameToken'>
-   <input message='tns:UsernameEndpoint_getUsernameToken'/>   
-   <output message='tns:UsernameEndpoint_getUsernameTokenResponse'/>
-  </operation>
- </portType>
- <binding name='UsernameEndpointBinding' type='tns:UsernameEndpoint'>
-  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
-  <operation name='getUsernameToken'>
-   <soap:operation soapAction=''/>
-   <input>
-    <soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
-   </input>
-   <output>
-    <soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
-   </output>
-  </operation>
- </binding>
- <service name='UsernameService'>
-  <port binding='tns:UsernameEndpointBinding' name='UsernameEndpointPort'>
-   <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-wssecurity-username-digest'/>
-  </port>
- </service>
-</definitions>
\ No newline at end of file

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl	                        (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/META-INF/wsdl/UsernameService.wsdl	2010-06-16 14:45:52 UTC (rev 12487)
@@ -0,0 +1,30 @@
+<definitions name='UsernameService' targetNamespace='http://org.jboss.ws/samples/wssecurity' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/wssecurity' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='UsernameEndpoint_getUsernameToken'></message>
+ <message name='UsernameEndpoint_getUsernameTokenResponse'>
+  <part name='return' type='xsd:string'/>
+ </message>
+ <portType name='UsernameEndpoint'>
+  <operation name='getUsernameToken'>
+   <input message='tns:UsernameEndpoint_getUsernameToken'/>   
+   <output message='tns:UsernameEndpoint_getUsernameTokenResponse'/>
+  </operation>
+ </portType>
+ <binding name='UsernameEndpointBinding' type='tns:UsernameEndpoint'>
+  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <operation name='getUsernameToken'>
+   <soap:operation soapAction=''/>
+   <input>
+    <soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
+   </input>
+   <output>
+    <soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
+   </output>
+  </operation>
+ </binding>
+ <service name='UsernameService'>
+  <port binding='tns:UsernameEndpointBinding' name='UsernameEndpointPort'>
+   <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-wssecurity-username-digest'/>
+  </port>
+ </service>
+</definitions>
\ No newline at end of file

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF)

Deleted: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml	2008-03-10 17:50:55 UTC (rev 5908)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
-  <security-domain>java:/jaas/JBossWS</security-domain>
-</jboss-web>
\ No newline at end of file

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml	                        (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-web.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+  <security-domain>java:/jaas/JBossWS</security-domain>
+</jboss-web>
\ No newline at end of file

Deleted: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml	2008-03-10 17:50:55 UTC (rev 5908)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
-</jboss-ws-security>
\ No newline at end of file

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml	                        (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/jboss-wsse-server.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+</jboss-ws-security>
\ No newline at end of file

Deleted: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml	2008-03-10 17:50:55 UTC (rev 5908)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<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">
-
-  <servlet>
-    <servlet-name>UsernameService</servlet-name>
-    <servlet-class>org.jboss.test.ws.jaxws.samples.wssecurity.UsernameBean</servlet-class>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>UsernameService</servlet-name>
-    <url-pattern>/*</url-pattern>
-  </servlet-mapping>
-
-  <security-constraint>
-     <web-resource-collection>
-       <web-resource-name>UsernameService</web-resource-name>
-       <url-pattern>/*</url-pattern>
-       <http-method>GET</http-method>
-       <http-method>POST</http-method>
-     </web-resource-collection>
-     <auth-constraint>
-       <role-name>friend</role-name>
-     </auth-constraint>
-   </security-constraint>
-
-   <login-config>
-      <auth-method>BASIC</auth-method>
-      <realm-name>JBossWS</realm-name>
-   </login-config>
-
-   <security-role>
-      <role-name>friend</role-name>
-   </security-role>
-
-</web-app>
-

Copied: stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml (from rev 5908, stack/native/trunk/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml	                        (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-4447/src/test/resources/jaxws/samples/wssecurity/username-digest/WEB-INF/web.xml	2010-06-16 14:45:52 UTC (rev 12487)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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">
+
+  <servlet>
+    <servlet-name>UsernameService</servlet-name>
+    <servlet-class>org.jboss.test.ws.jaxws.samples.wssecurity.UsernameBean</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>UsernameService</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+
+  <security-constraint>
+     <web-resource-collection>
+       <web-resource-name>UsernameService</web-resource-name>
+       <url-pattern>/*</url-pattern>
+       <http-method>GET</http-method>
+       <http-method>POST</http-method>
+     </web-resource-collection>
+     <auth-constraint>
+       <role-name>friend</role-name>
+     </auth-constraint>
+   </security-constraint>
+
+   <login-config>
+      <auth-method>BASIC</auth-method>
+      <realm-name>JBossWS</realm-name>
+   </login-config>
+
+   <security-role>
+      <role-name>friend</role-name>
+   </security-role>
+
+</web-app>
+



More information about the jbossws-commits mailing list