Author: alessio.soldano(a)jboss.com
Date: 2011-10-28 07:10:44 -0400 (Fri, 28 Oct 2011)
New Revision: 15172
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jboss.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Use @SecurityDomain instead of security domain declaration in jboss.xml to make the test
pass against AS 7.1 too (EJB3 DD support still to be implemented)
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-10-27
09:18:37 UTC (rev 15171)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-10-28
11:10:44 UTC (rev 15172)
@@ -386,7 +386,6 @@
</fileset>
<metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF">
<include name="wsdl/*"/>
- <include name="jboss.xml"/>
<include name="jaxws-endpoint-config.xml"/>
</metainf>
<manifest>
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java 2011-10-27
09:18:37 UTC (rev 15171)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java 2011-10-28
11:10:44 UTC (rev 15172)
@@ -28,6 +28,7 @@
import org.apache.cxf.interceptor.InInterceptors;
import org.jboss.logging.Logger;
+import org.jboss.ejb3.annotation.SecurityDomain;
import org.jboss.ws.api.annotation.EndpointConfig;
@@ -40,6 +41,7 @@
targetNamespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
endpointInterface =
"org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.ServiceIface"
)
+@SecurityDomain("JBossWS")
@EndpointConfig(configFile = "META-INF/jaxws-endpoint-config.xml", configName =
"Custom WS-Security Endpoint")
//be sure to have dependency on org.apache.cxf module when on AS7, otherwise Apache CXF
annotations are ignored
@InInterceptors(interceptors =
{"org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingPolicyInterceptor"})
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java 2011-10-27
09:18:37 UTC (rev 15171)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java 2011-10-28
11:10:44 UTC (rev 15172)
@@ -91,7 +91,8 @@
catch (Exception e)
{
assertNotNull(e.getMessage());
- assertTrue(e.getMessage().toLowerCase().contains("unauthorized"));
+ String msg = e.getMessage().toLowerCase();
+ assertTrue(msg.contains("unauthorized") || msg.contains("not
allowed"));
}
}
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jboss.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jboss.xml 2011-10-27
09:18:37 UTC (rev 15171)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jboss.xml 2011-10-28
11:10:44 UTC (rev 15172)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
-
-<jboss>
- <security-domain>java:/jaas/JBossWS</security-domain>
-</jboss>
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl 2011-10-27
09:18:37 UTC (rev 15171)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl 2011-10-28
11:10:44 UTC (rev 15172)
@@ -58,7 +58,7 @@
</binding>
<service name="SecurityService">
<port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-jaas"/>
+ <soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-jaas-ejb"/>
</port>
</service>
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-10-27 09:18:37 UTC (rev 15171)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-10-28 11:10:44 UTC (rev 15172)
@@ -1330,9 +1330,6 @@
<exclude>org/jboss/test/ws/jaxws/jbws1581/**</exclude>
<exclude>org/jboss/test/ws/jaxws/cxf/bus/*EJB3*</exclude>
- <!-- TODO: investigate -->
-
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase*</exclude>
-
<!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on
AS7 -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
Show replies by date