Author: alessio.soldano(a)jboss.com
Date: 2008-06-03 11:11:10 -0400 (Tue, 03 Jun 2008)
New Revision: 7295
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoader.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoaderMBean.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/jboss-service.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/bcprov-jdk14.jar
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
Log:
[JBWS-2197] Assuming BC provider is installed
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2008-06-03
15:03:16 UTC (rev 7294)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2008-06-03
15:11:10 UTC (rev 7295)
@@ -95,17 +95,6 @@
<include name="bob.properties" />
</zipfileset>
</war>
- <jar
destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-sign-encrypt.sar">
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/META-INF">
- <include name="jboss-service.xml" />
- </metainf>
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoader*.class"/>
- </fileset>
- <fileset
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt">
- <include name="bcprov*.jar" />
- </fileset>
- </jar>
<!-- jaxws-samples-wsse-sign-encrypt-client -->
<jar
destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-sign-encrypt-client.jar">
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoader.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoader.java 2008-06-03
15:03:16 UTC (rev 7294)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoader.java 2008-06-03
15:11:10 UTC (rev 7295)
@@ -1,54 +0,0 @@
-/*
- * 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.wsse;
-
-import java.security.Security;
-import org.jboss.logging.Logger;
-
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-import javax.crypto.Cipher;
-
-//$Id$
-
-/**
- * Loads / unloads the Bouncy Castle JCE provider
- *
- */
-public class BouncyCastleLoader implements BouncyCastleLoaderMBean
-{
- private static Logger log = Logger.getLogger(BouncyCastleLoader.class);
-
- public void start() throws Exception
- {
- BouncyCastleProvider bcp = new BouncyCastleProvider();
- Security.addProvider(bcp);
- Cipher c = Cipher.getInstance("RSA", "BC");
- log.info("Created RSA cipher: " + c + ", provider:" +
c.getProvider());
- }
-
- public void stop() throws Exception
- {
- BouncyCastleProvider bcp = new BouncyCastleProvider();
- Security.removeProvider(bcp.getName());
- log.info("Bouncy Castle provider removed.");
- }
-}
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoaderMBean.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoaderMBean.java 2008-06-03
15:03:16 UTC (rev 7294)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/BouncyCastleLoaderMBean.java 2008-06-03
15:11:10 UTC (rev 7295)
@@ -1,29 +0,0 @@
-/*
- * 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.wsse;
-
-public interface BouncyCastleLoaderMBean
-{
- public void start() throws Exception;
-
- public void stop() throws Exception;
-}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2008-06-03
15:03:16 UTC (rev 7294)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2008-06-03
15:11:10 UTC (rev 7295)
@@ -43,6 +43,7 @@
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
+import javax.xml.ws.soap.SOAPFaultException;
/**
* WS-Security sign & encrypt test case
@@ -56,8 +57,7 @@
public static Test suite()
{
- return new JBossWSTestSetup(SignEncryptTestCase.class,
- "jaxws-samples-wsse-sign-encrypt.sar
jaxws-samples-wsse-sign-encrypt-client.jar jaxws-samples-wsse-sign-encrypt.war");
+ return new JBossWSTestSetup(SignEncryptTestCase.class,
"jaxws-samples-wsse-sign-encrypt-client.jar
jaxws-samples-wsse-sign-encrypt.war");
}
public void test() throws Exception
@@ -67,7 +67,14 @@
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
setupWsse(proxy);
- assertEquals("Secure Hello World!", proxy.sayHello());
+ try
+ {
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+ catch (SOAPFaultException e)
+ {
+ throw new Exception("Please check that the Bouncy Castle provider is
installed.", e);
+ }
}
private void setupWsse(ServiceIface proxy)
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/jboss-service.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/jboss-service.xml 2008-06-03
15:03:16 UTC (rev 7294)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/jboss-service.xml 2008-06-03
15:11:10 UTC (rev 7295)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
- <mbean code="org.jboss.test.ws.jaxws.samples.wsse.BouncyCastleLoader"
name="org.jboss.test.ws.jaxws.samples.wsse:service=BouncyCastleLoader"/>
-</server>
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/bcprov-jdk14.jar
===================================================================
(Binary files differ)
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-06-03 15:03:16 UTC
(rev 7294)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-06-03 15:11:10 UTC
(rev 7295)
@@ -128,6 +128,3 @@
org/jboss/test/ws/jaxws/samples/advanced/retail/**
org/jboss/test/ws/jaxws/samples/webservice/WebServiceEJB3TestCase.*
org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.*
-
-# [JBWS-2197] Dynamically load Bouncy Castle provider on AS 5.0.x
-org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-06-03 15:03:16 UTC
(rev 7294)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-06-03 15:11:10 UTC
(rev 7295)
@@ -125,6 +125,3 @@
# [JBWS-2194] request requires HTTP authentication: Unauthorized
org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.*
-
-# [JBWS-2197] Dynamically load Bouncy Castle provider on AS 5.0.x
-org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.*