Author: alessio.soldano(a)jboss.com
Date: 2008-06-05 13:23:59 -0400 (Thu, 05 Jun 2008)
New Revision: 7392
Modified:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
Log:
Removing useless classloading trick
Modified:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2008-06-05
17:14:49 UTC (rev 7391)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2008-06-05
17:23:59 UTC (rev 7392)
@@ -21,9 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse;
-import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -46,8 +44,8 @@
public static Test suite()
{
- addClientConfToClasspath("jaxws-samples-wsse-sign-encrypt-client.jar");
- return new JBossWSTestSetup(SignEncryptTestCase.class, new
JBossWSTestHelper().isTargetJBoss50() ? "jaxws-samples-wsse-sign-encrypt-50.war"
: "jaxws-samples-wsse-sign-encrypt.war");
+ String serverJar = new JBossWSTestHelper().isTargetJBoss50() ?
"jaxws-samples-wsse-sign-encrypt-50.war" :
"jaxws-samples-wsse-sign-encrypt.war";
+ return new JBossWSTestSetup(SignEncryptTestCase.class,
"jaxws-samples-wsse-sign-encrypt-client.jar," + serverJar);
}
public void test() throws Exception
@@ -58,20 +56,4 @@
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
assertEquals("Secure Hello World!", proxy.sayHello());
}
-
- protected static void addClientConfToClasspath(String s)
- {
- try
- {
- // wrap the classloader upfront to allow inclusion of the client.jar
- JBossWSTestHelper helper = new JBossWSTestHelper();
- ClassLoader parent = Thread.currentThread().getContextClassLoader();
- URLClassLoader replacement = new URLClassLoader(new URL[] {
helper.getArchiveFile(s).toURL() }, parent);
- Thread.currentThread().setContextClassLoader(replacement);
- }
- catch (MalformedURLException e)
- {
- throw new IllegalStateException(e);
- }
- }
}
Modified:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java 2008-06-05
17:14:49 UTC (rev 7391)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java 2008-06-05
17:23:59 UTC (rev 7392)
@@ -21,9 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse;
-import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -46,8 +44,8 @@
public static Test suite()
{
- addClientConfToClasspath("jaxws-samples-wsse-sign-client.jar");
- return new JBossWSTestSetup(SignTestCase.class, new
JBossWSTestHelper().isTargetJBoss50() ? "jaxws-samples-wsse-sign-50.war" :
"jaxws-samples-wsse-sign.war");
+ String serverJar = new JBossWSTestHelper().isTargetJBoss50() ?
"jaxws-samples-wsse-sign-50.war" : "jaxws-samples-wsse-sign.war";
+ return new JBossWSTestSetup(SignTestCase.class,
"jaxws-samples-wsse-sign-client.jar," + serverJar);
}
public void test() throws Exception
@@ -58,20 +56,4 @@
ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
assertEquals("Secure Hello World!", proxy.sayHello());
}
-
- protected static void addClientConfToClasspath(String s)
- {
- try
- {
- // wrap the classloader upfront to allow inclusion of the client.jar
- JBossWSTestHelper helper = new JBossWSTestHelper();
- ClassLoader parent = Thread.currentThread().getContextClassLoader();
- URLClassLoader replacement = new URLClassLoader(new URL[] {
helper.getArchiveFile(s).toURL() }, parent);
- Thread.currentThread().setContextClassLoader(replacement);
- }
- catch (MalformedURLException e)
- {
- throw new IllegalStateException(e);
- }
- }
}
Modified:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java 2008-06-05
17:14:49 UTC (rev 7391)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java 2008-06-05
17:23:59 UTC (rev 7392)
@@ -21,9 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse;
-import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -31,7 +29,6 @@
import junit.framework.Test;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -46,8 +43,7 @@
public static Test suite()
{
- addClientConfToClasspath("jaxws-samples-wsse-username-client.jar");
- return new JBossWSTestSetup(UsernameTestCase.class,
"jaxws-samples-wsse-username.war");
+ return new JBossWSTestSetup(UsernameTestCase.class,
"jaxws-samples-wsse-username-client.jar,jaxws-samples-wsse-username.war");
}
public void test() throws Exception
@@ -63,20 +59,4 @@
assertEquals("Secure Hello World!", proxy.sayHello());
}
-
- protected static void addClientConfToClasspath(String s)
- {
- try
- {
- // wrap the classloader upfront to allow inclusion of the client.jar
- JBossWSTestHelper helper = new JBossWSTestHelper();
- ClassLoader parent = Thread.currentThread().getContextClassLoader();
- URLClassLoader replacement = new URLClassLoader(new URL[] {
helper.getArchiveFile(s).toURL() }, parent);
- Thread.currentThread().setContextClassLoader(replacement);
- }
- catch (MalformedURLException e)
- {
- throw new IllegalStateException(e);
- }
- }
}
Show replies by date