Author: richard.opalka(a)jboss.com
Date: 2008-05-23 06:10:21 -0400 (Fri, 23 May 2008)
New Revision: 7150
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsaSoap12/AddressingTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/AbstractWSSEBase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/EncryptTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/UsernameTokenHTTPSTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/AbstractWSSEBase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/EncryptTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/SignTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewsTestCase.java
Log:
remove useless classloader hara-kiri
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2008-05-23
10:10:21 UTC (rev 7150)
@@ -175,7 +175,7 @@
<include name="wsse10.truststore"/>
</metainf>
</jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-news-step2-agency.jar">
+ <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-news-step2-agency-client.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include
name="org/jboss/test/ws/jaxws/samples/news/generated/agency/*.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/news/Agency.class"/>
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsaSoap12/AddressingTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsaSoap12/AddressingTestCase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsaSoap12/AddressingTestCase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -21,10 +21,8 @@
*/
package org.jboss.test.ws.interop.nov2007.wsaSoap12;
-import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
-import java.net.URLClassLoader;
import java.util.List;
import javax.xml.namespace.QName;
@@ -46,7 +44,6 @@
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
import org.w3c.dom.Element;
@@ -80,21 +77,14 @@
private Element extraStuff;
private Element wsdl1Param;
private Element wsdl2Param;
- private ClassLoader origCL;
public static Test suite()
{
- return new JBossWSTestSetup(AddressingTestCase.class,
"jbossws-interop-nov2007-wsaSoap12.war");
+ return new JBossWSTestSetup(AddressingTestCase.class,
"jbossws-interop-nov2007-wsaSoap12.war,
jbossws-interop-nov2007-wsaSoap12-client.jar");
}
- protected void tearDown() throws Exception
- {
- Thread.currentThread().setContextClassLoader(origCL);
- }
-
protected void setUp() throws Exception
{
- origCL =
addClientConfToClasspath("jbossws-interop-nov2007-wsaSoap12-client.jar");
if (echoPort==null || notifyPort==null)
{
wsdlLocation =
getResourceURL("interop/nov2007/wsaSoap12/WEB-INF/wsdl/service.wsdl");
@@ -109,7 +99,6 @@
configureClient();
}
-
customerParam = DOMUtils.parse("<customer:CustomerKey
xmlns:customer=\"http://example.org/customer\">Key#123456789...);
faultParam = DOMUtils.parse("<customer:CustomerKey
xmlns:customer=\"http://example.org/customer\">Fault#1234567...);
wsdl1Param = DOMUtils.parse("<definitions
xmlns=\"http://schemas.xmlsoap.org/wsdl/\">insert WSDL 1.1
here!</definitions>");
@@ -117,23 +106,6 @@
extraStuff = DOMUtils.parse("<customer:extraStuff
xmlns:customer=\"http://example.org/customer\">This should be
ignored</customer:extraStuff>");
}
- protected static ClassLoader 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.getArchiveURL(s) }, parent);
- Thread.currentThread().setContextClassLoader(replacement);
- return parent;
- }
- catch (MalformedURLException e)
- {
- throw new IllegalStateException(e);
- }
- }
-
private void configureClient() {
InteropConfigFactory factory = InteropConfigFactory.newInstance();
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/AbstractWSSEBase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/AbstractWSSEBase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/AbstractWSSEBase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -21,9 +21,7 @@
*/
package org.jboss.test.ws.interop.nov2007.wsse;
-import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
import javax.xml.bind.JAXBElement;
import javax.xml.namespace.QName;
@@ -36,7 +34,6 @@
import org.jboss.test.ws.interop.nov2007.wsse.EchoDataSetResponse.EchoDataSetResult;
import org.jboss.test.ws.interop.nov2007.wsse.EchoXmlResponse.EchoXmlResult;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
/**
* @author Alessio Soldano <alessio.soldano(a)jboss.com>
@@ -115,23 +112,6 @@
}
- protected static ClassLoader 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.getArchiveURL(s) }, parent);
- Thread.currentThread().setContextClassLoader(replacement);
- return parent;
- }
- catch (MalformedURLException e)
- {
- throw new IllegalStateException(e);
- }
- }
-
public void testEcho() throws Exception
{
String text = "Hello!";
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/Encrypt3DESTestCase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -60,24 +60,24 @@
*/
public class Encrypt3DESTestCase extends AbstractWSSEBase
{
- private ClassLoader origCL;
-
public static Test suite()
{
- return new JBossWSTestSetup(Encrypt3DESTestCase.class,
"jbossws-interop-nov2007-wsseEncrypt3DES.war");
+ return new JBossWSTestSetup
+ (
+ Encrypt3DESTestCase.class,
+ "jbossws-interop-nov2007-wsseEncrypt3DES.war,
jbossws-interop-nov2007-wsseEncrypt3DES-client.jar"
+ );
}
@Override
protected void setUp() throws Exception
{
- origCL =
addClientConfToClasspath("jbossws-interop-nov2007-wsseEncrypt3DES-client.jar");
super.setUp();
}
@Override
protected void tearDown() throws Exception
{
- Thread.currentThread().setContextClassLoader(origCL);
super.tearDown();
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/EncryptTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/EncryptTestCase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/EncryptTestCase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -61,24 +61,24 @@
*/
public class EncryptTestCase extends AbstractWSSEBase
{
- private ClassLoader origCL;
-
public static Test suite()
{
- return new JBossWSTestSetup(EncryptTestCase.class,
"jbossws-interop-nov2007-wsseEncrypt.war");
+ return new JBossWSTestSetup
+ (
+ EncryptTestCase.class,
+ "jbossws-interop-nov2007-wsseEncrypt.war,
jbossws-interop-nov2007-wsseEncrypt-client.jar"
+ );
}
@Override
protected void setUp() throws Exception
{
- origCL =
addClientConfToClasspath("jbossws-interop-nov2007-wsseEncrypt-client.jar");
super.setUp();
}
@Override
protected void tearDown() throws Exception
{
- Thread.currentThread().setContextClassLoader(origCL);
super.tearDown();
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/UsernameTokenHTTPSTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/UsernameTokenHTTPSTestCase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/UsernameTokenHTTPSTestCase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -51,24 +51,24 @@
*/
public class UsernameTokenHTTPSTestCase extends AbstractWSSEBase
{
- private ClassLoader origCL;
-
public static Test suite()
{
- return new JBossWSTestSetup(UsernameTokenHTTPSTestCase.class,
"jbossws-interop-nov2007-wsseUsernameTokenHTTPS.war");
+ return new JBossWSTestSetup
+ (
+ UsernameTokenHTTPSTestCase.class,
+ "jbossws-interop-nov2007-wsseUsernameTokenHTTPS.war,
jbossws-interop-nov2007-wsseUsernameTokenHTTPS-client.jar"
+ );
}
@Override
protected void setUp() throws Exception
{
- origCL =
addClientConfToClasspath("jbossws-interop-nov2007-wsseUsernameTokenHTTPS-client.jar");
super.setUp();
}
@Override
protected void tearDown() throws Exception
{
- Thread.currentThread().setContextClassLoader(origCL);
super.tearDown();
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/AbstractWSSEBase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/AbstractWSSEBase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/AbstractWSSEBase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -21,11 +21,9 @@
*/
package org.jboss.test.ws.interop.wsse;
-// $Id: $
+// $Id: AbstractWSSEBase.java 2064 2007-01-24 11:30:23Z heiko.braun(a)jboss.com $
-import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -33,7 +31,6 @@
import org.jboss.ws.core.StubExt;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
/**
* @author Heiko.Braun(a)jboss.org
@@ -61,7 +58,6 @@
port = service.getPort(IPingService.class);
((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
getEndpointURL());
- configureClient();
}
defaultSetup(port);
@@ -100,38 +96,4 @@
System.setProperty("org.jboss.ws.wsse.trustStoreType", trustStoreType);
super.tearDown();
}
-
- protected void configureClient()
- {
-
- /*InteropConfigFactory factory = InteropConfigFactory.newInstance();
- ClientScenario scenario =
factory.createClientScenario(System.getProperty("client.scenario"));
- if(scenario!=null)
- {
- log.info("Using scenario: " + scenario);
- ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
scenario.getTargetEndpoint().toString());
- }
- else
- {
- throw new IllegalStateException("Failed to load client scenario");
- }
- */
- }
-
- protected static ClassLoader 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.getArchiveURL(s) }, parent);
- Thread.currentThread().setContextClassLoader(replacement);
- return parent;
- }
- catch (MalformedURLException e)
- {
- throw new IllegalStateException(e);
- }
- }
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/EncryptTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/EncryptTestCase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/EncryptTestCase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -30,36 +30,37 @@
* @version $Id: EncryptTestCase.java 2064 2007-01-24 11:30:23Z heiko.braun(a)jboss.com $
* @since Aug 23, 2006
*/
-public class EncryptTestCase extends AbstractWSSEBase {
- private ClassLoader origCL;
-
+public class EncryptTestCase extends AbstractWSSEBase
+{
public static Test suite()
{
- return new JBossWSTestSetup(EncryptTestCase.class,
"jbossws-interop-wsse10Encrypt.war");
+ return new JBossWSTestSetup
+ (
+ EncryptTestCase.class,
+ "jbossws-interop-wsse10Encrypt.war,
jbossws-interop-wsse10Encrypt-client.jar"
+ );
}
@Override
protected void setUp() throws Exception
{
- origCL =
addClientConfToClasspath("jbossws-interop-wsse10Encrypt-client.jar");
super.setUp();
}
@Override
protected void tearDown() throws Exception
{
- Thread.currentThread().setContextClassLoader(origCL);
super.tearDown();
}
- String getEndpointURL() {
+ String getEndpointURL()
+ {
return
"http://"+getServerHost()+":8080/wsse10Encrypt/endpoint";
}
// Scenario 3.3. X509 Mutual Authentication, Sign Then Encrypt
- public void testSignEncrypt() throws Exception{
-
- //
+ public void testSignEncrypt() throws Exception
+ {
Ping request = new Ping();
request.setScenario("testSignOnly");
@@ -73,5 +74,4 @@
assertNotNull(response);
assertEquals(response.getEchoResult(), request2.getRequest());
}
-
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/SignTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/SignTestCase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsse/SignTestCase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -29,36 +29,37 @@
* @author Heiko Braun, <heiko(a)openj.net>
* @since 07-Mar-2006
*/
-public class SignTestCase extends AbstractWSSEBase {
- private ClassLoader origCL;
-
+public class SignTestCase extends AbstractWSSEBase
+{
public static Test suite()
{
- return new JBossWSTestSetup(SignTestCase.class,
"jbossws-interop-wsse10Sign.war");
+ return new JBossWSTestSetup
+ (
+ SignTestCase.class,
+ "jbossws-interop-wsse10Sign.war,
jbossws-interop-wsse10Sign-client.jar"
+ );
}
@Override
protected void setUp() throws Exception
{
- origCL =
addClientConfToClasspath("jbossws-interop-wsse10Sign-client.jar");
super.setUp();
}
@Override
protected void tearDown() throws Exception
{
- Thread.currentThread().setContextClassLoader(origCL);
super.tearDown();
}
- String getEndpointURL() {
+ String getEndpointURL()
+ {
return "http://"+getServerHost()+":8080/wsse10Sign/endpoint";
}
// Scenario 3.2. X509 Mutual Authentication, Sign Only
- public void testSignOnly() throws Exception{
-
- //
+ public void testSignOnly() throws Exception
+ {
Ping request = new Ping();
request.setScenario("testSignOnly");
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -133,8 +133,8 @@
return resURL;
}
};
+
Thread.currentThread().setContextClassLoader(urlLoader);
-
try
{
URL configURL =
urlLoader.findResource("META-INF/standard-jaxrpc-client-config.xml");
@@ -179,8 +179,8 @@
return resURL;
}
};
+
Thread.currentThread().setContextClassLoader(urlLoader);
-
try
{
ServiceFactoryImpl factory = new ServiceFactoryImpl();
@@ -224,8 +224,8 @@
return resURL;
}
};
+
Thread.currentThread().setContextClassLoader(urlLoader);
-
try
{
ServiceFactoryImpl factory = new ServiceFactoryImpl();
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewsTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewsTestCase.java 2008-05-23
08:05:21 UTC (rev 7149)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewsTestCase.java 2008-05-23
10:10:21 UTC (rev 7150)
@@ -23,14 +23,9 @@
//$Id$
-import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
-
import junit.framework.Test;
-
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -43,44 +38,19 @@
*/
public class SecureNewsTestCase extends JBossWSTest
{
- private ClassLoader origCL;
-
public static Test suite()
{
- return new JBossWSTestSetup(SecureNewsTestCase.class,
"jaxws-samples-news-step2-newspaper.jar");
+ return new JBossWSTestSetup
+ (
+ SecureNewsTestCase.class,
+ "jaxws-samples-news-step2-newspaper.jar,
jaxws-samples-news-step2-agency-client.jar"
+ );
}
- protected void setUp() throws Exception
- {
- origCL = addClientConfToClasspath("jaxws-samples-news-step2-agency.jar");
//this way the ws-security conf is available
- }
-
- protected void tearDown() throws Exception
- {
- Thread.currentThread().setContextClassLoader(origCL);
- }
-
public void testAgency() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/news/pressRelease?wsdl");
SecureAgency agency = new SecureAgency(wsdlURL);
agency.run("Press release title", "Press release body");
}
-
- protected static ClassLoader 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);
- return parent;
- }
- catch (MalformedURLException e)
- {
- throw new IllegalStateException(e);
- }
- }
}