Author: thomas.diesler(a)jboss.com
Date: 2007-01-05 16:52:21 -0500 (Fri, 05 Jan 2007)
New Revision: 1830
Modified:
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java
trunk/jbossws-tests/src/main/resources/tests-tomcat-excludes.txt
Log:
Fix tomcat integration
Add config name/file access on StubExt
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-05 21:52:07 UTC (rev 1829)
+++ trunk/jbossws-tests/build.xml 2007-01-05 21:52:21 UTC (rev 1830)
@@ -12,8 +12,9 @@
<import file="${basedir}/../build/ant-import/build-thirdparty.xml"/>
<import file="${basedir}/../build/ant-import/build-setup.xml"/>
- <import file="${basedir}/../integration-jboss42/build.xml"/>
<import file="${basedir}/../integration-jboss50/build.xml"/>
+ <import file="${basedir}/../integration-jboss42/build.xml"/>
+ <import file="${basedir}/../integration-jboss40/build.xml"/>
<import file="${basedir}/../integration-tomcat/build.xml"/>
<import file="${basedir}/../jbossws-core/build.xml"/>
@@ -52,12 +53,28 @@
<equals arg1="${jbossws.integration.target}"
arg2="jboss40"/>
</condition>
+ <!-- Integration Target Server -->
+ <condition property="jbossws.integration.target.jboss">
+ <isset property="jboss.home"/>
+ </condition>
+ <condition property="jbossws.integration.target.tomcat">
+ <equals arg1="${jbossws.integration.target}"
arg2="tomcat"/>
+ </condition>
+
<property name="jboss.client" value="${jboss.home}/client"/>
<property name="jboss.lib" value="${jboss.home}/lib"/>
<property name="jboss.server"
value="${jboss.home}/server/${jboss.server.instance}"/>
<property name="jboss.server.lib"
value="${jboss.server}/lib"/>
<property name="jboss.server.deploy"
value="${jboss.server}/deploy"/>
+ <!-- Java Endorsed -->
+ <condition property="endorsed.dirs"
value="${jboss.home}/lib/endorsed">
+ <isset property="jbossws.integration.target.jboss"/>
+ </condition>
+ <condition property="endorsed.dirs"
value="${tomcat.home}/common/endorsed">
+ <isset property="jbossws.integration.target.tomcat"/>
+ </condition>
+
<!-- Set a hostname property based on COMPUTERNAME for win32, HOSTNAME
otherwise and initialize the node0/node1 cluster hostnames to localhost
and ${hostname} by default. If you cannot route multicast traffic between
@@ -88,9 +105,10 @@
<target name="prepare">
<echo message="-----------------------------------------------"/>
- <echo message="jboss.home = ${jboss.home}"/>
- <echo message="tomcat.home = ${tomcat.home}"/>
- <echo message="java.home = ${java.home}"/>
+ <echo message="jboss.home = ${jboss.home}"/>
+ <echo message="tomcat.home = ${tomcat.home}"/>
+ <echo message="java.home = ${java.home}"/>
+ <echo message="endorsed.dirs = ${endorsed.dirs}"/>
<echo message="-----------------------------------------------"/>
<available property="jbossws.available"
file="${jboss.home}/client/jbossall-client.jar"/>
@@ -119,67 +137,42 @@
<condition property="jbossws.build" value="jbossws">
<isset property="HAVE_JDK_1.5"/>
</condition>
- <property name="jbossws.client.jar"
value="${jbossws.build}-client.jar"/>
<!-- Define excluded tests -->
<property name="tests.excludesfile"
value="${tests.resources.dir}/tests-${jbossws.integration.target}-excludes.txt"/>
<!-- The jbossws client classpath -->
<path id="jbossws.client.classpath">
- <pathelement location="${jboss.client}/${jbossws.client.jar}"/>
- <pathelement location="${jboss.client}/activation.jar"/>
- <pathelement location="${jboss.client}/commons-logging.jar"/>
- <pathelement location="${jboss.client}/javassist.jar"/>
- <pathelement location="${jboss.client}/jaxb-api.jar"/>
- <pathelement location="${jboss.client}/jaxb-impl.jar"/>
- <pathelement
location="${jboss.client}/jboss-backport-concurrent.jar"/>
- <pathelement location="${jboss.client}/jboss-common-core.jar"/>
- <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
- <pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
- <pathelement location="${jboss.client}/jboss-logging-log4j.jar"/>
- <pathelement location="${jboss.client}/jboss-jaxrpc.jar"/>
- <pathelement location="${jboss.client}/jboss-jaxws.jar"/>
- <pathelement location="${jboss.client}/jboss-saaj.jar"/>
- <pathelement location="${jboss.client}/jbossall-client.jar"/>
- <pathelement location="${jboss.client}/jbossretro-rt.jar"/>
- <pathelement location="${jboss.client}/log4j.jar"/>
- <pathelement location="${jboss.client}/mail.jar"/>
- <pathelement location="${jboss.lib}/jboss-container.jar"/>
- <pathelement location="${jboss.server.lib}/jbosssx.jar"/>
+ <path refid="jbossws.thirdparty.classpath"/>
+ <pathelement
location="${core.output.lib.dir}/jbossws-client.jar"/>
+ <pathelement location="${core.output.lib.dir}/jboss-jaxrpc.jar"/>
+ <pathelement location="${core.output.lib.dir}/jboss-jaxws.jar"/>
+ <pathelement location="${core.output.lib.dir}/jboss-saaj.jar"/>
</path>
<!-- The combined compile classpath -->
<path id="javac.classpath">
- <path refid="library.classpath"/>
<path refid="jbossws.client.classpath"/>
- <pathelement location="${jboss.lib}/jboss-system.jar"/>
- <pathelement location="${jboss.server.lib}/jboss.jar"/>
- <pathelement
location="${jboss.server.deploy}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
- <pathelement
location="${jboss.server.deploy}/ejb3.deployer/jboss-ejb3x.jar"/>
- <pathelement
location="${basedir}/../integration-${jbossws.integration.target}/output/lib/jbossws-${jbossws.integration.target}-integration.jar"/>
- <pathelement
location="${integration.tomcat.dir}/output/lib/jbossws-tomcat-integration.jar"/>
- </path>
-
- <!--
- The test client classpath which does not include the library classpath
- The idea is that we test agains the jar versions in the target container
- -->
- <path id="test.client.classpath">
- <path refid="jbossws.client.classpath"/>
- <pathelement
location="${basedir}/../integration-${jbossws.integration.target}/output/lib/jbossws-${jbossws.integration.target}-integration.jar"/>
- <pathelement
location="${jboss.client}/jboss-aspect-jdk50-client.jar"/>
- <pathelement
location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
- <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
- <pathelement location="${jboss.lib}/jboss-system.jar"/>
- <pathelement location="${jboss.server.lib}/jboss.jar"/>
- <pathelement location="${thirdparty.dir}/hibernate3.jar"/>
- <pathelement location="${thirdparty.dir}/policy-1.0.jar"/>
+ <pathelement
location="${thirdparty.dir}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+ <pathelement
location="${thirdparty.dir}/ejb3.deployer/jboss-ejb3x.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-vfs.jar"/>
<pathelement location="${thirdparty.dir}/qdox.jar"/>
+ <pathelement location="${thirdparty.dir}/policy-1.0.jar"/>
<pathelement location="${thirdparty.dir}/servlet-api.jar"/>
<pathelement location="${thirdparty.dir}/stax-api-1.0.jar"/>
- <pathelement location="${thirdparty.dir}/wstx-lgpl-2.9.3.jar"/>
<pathelement location="${thirdparty.dir}/xmlunit1.0.jar"/>
</path>
+
+ <!-- The test client classpath -->
+ <path id="test.client.classpath">
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
+ <pathelement
location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
+ <pathelement
location="${jboss.client}/jboss-aspect-jdk50-client.jar"/>
+ <pathelement
location="${basedir}/../integration-${jbossws.integration.target}/output/lib/jbossws-${jbossws.integration.target}-integration.jar"/>
+ <pathelement
location="${integration.tomcat.dir}/output/lib/jbossws-tomcat-integration.jar"/>
+ <path refid="javac.classpath"/>
+ </path>
</target>
<!-- ================================================================== -->
@@ -327,7 +320,7 @@
</target>
<!-- Run benchmark test cases -->
- <target name="tests-benchmark" description="Run benchmark unit
tests">
+ <target name="tests-benchmark" depends="init"
description="Run benchmark unit tests">
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/benchmark/**/*TestCase.class"/>
<param name="excludesfile"
value="${tests.excludesfile}"/>
@@ -345,7 +338,7 @@
</target>
<!-- Run tools test cases -->
- <target name="tests-tools" description="Run tools unit
tests">
+ <target name="tests-tools" depends="init" description="Run
tools unit tests">
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/tools/**/*TestCase.class"/>
<param name="excludesfile"
value="${tests.excludesfile}"/>
@@ -357,7 +350,7 @@
Run a collection of unit tests.
ant -Dtest=tools test
-->
- <target name="test" if="test" description="Run all unit
tests in a given directory">
+ <target name="test" depends="init" if="test"
description="Run all unit tests in a given directory">
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/${test}/**/*TestCase.class"/>
<param name="exclude.wildcard"
value="org/jboss/test/ws/*/benchmark/**"/>
@@ -376,7 +369,7 @@
<sysproperty key="jbosstest.host.name"
value="${node0}"/>
<sysproperty key="java.naming.provider.url"
value="${node0.jndi.url}"/>
<sysproperty key="build.testlog"
value="${tests.output.dir}/log"/>
- <sysproperty key="java.endorsed.dirs"
value="${jboss.home}/lib/endorsed"/>
+ <sysproperty key="java.endorsed.dirs"
value="${endorsed.dirs}"/>
<sysproperty key="jbosstest.server.host"
value="${node0}"/>
<sysproperty key="jbossws.integration.target"
value="${jbossws.integration.target}"/>
<sysproperty key="tomcat.manager.username"
value="${tomcat.manager.username}"/>
@@ -415,7 +408,7 @@
<sysproperty key="jbosstest.host.name"
value="${node0}"/>
<sysproperty key="java.naming.provider.url"
value="${node0.jndi.url}"/>
<sysproperty key="build.testlog"
value="${tests.output.dir}/log"/>
- <sysproperty key="java.endorsed.dirs"
value="${jboss.home}/lib/endorsed"/>
+ <sysproperty key="java.endorsed.dirs"
value="${endorsed.dirs}"/>
<sysproperty key="jbosstest.server.host"
value="${node0}"/>
<sysproperty key="jbossws.integration.target"
value="${jbossws.integration.target}"/>
<sysproperty key="tomcat.manager.username"
value="${tomcat.manager.username}"/>
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java 2007-01-05
21:52:07 UTC (rev 1829)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java 2007-01-05
21:52:21 UTC (rev 1830)
@@ -23,15 +23,11 @@
import java.io.File;
import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.Stub;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.HandlerRegistry;
import junit.framework.Test;
@@ -39,7 +35,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.extensions.security.jaxrpc.WSSecurityHandlerOutbound;
+import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test WS-Security with RPC/Literal
@@ -87,17 +83,14 @@
URL securityURL = new
File("resources/jaxrpc/samples/wssecurity/simple-encrypt/META-INF/jboss-wsse-client.xml").toURL();
QName serviceName = new
QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
- QName portName = new QName("http://org.jboss.ws/samples/wssecurity",
"HelloPort");
-
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName,
mappingURL, securityURL);
- HandlerRegistry registry = service.getDynamicHandlerRegistry();
- List infos = registry.getHandlerChain(portName);
- infos.add(new HandlerInfo(WSSecurityHandlerOutbound.class, new HashMap(), new
QName[]{}));
- registry.setHandlerChain(portName, infos);
-
Hello port = (Hello)service.getPort(Hello.class);
- ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-samples-wssecurity-encrypt");
+ StubExt stub = (StubExt)port;
+
+ stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-samples-wssecurity-encrypt");
+ stub.setConfigName("Standard WSSecurity Client");
+
return port;
}
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java 2007-01-05
21:52:07 UTC (rev 1829)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java 2007-01-05
21:52:21 UTC (rev 1830)
@@ -39,6 +39,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
+import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.security.jaxrpc.WSSecurityHandlerOutbound;
/**
@@ -91,13 +92,12 @@
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName,
mappingURL, securityURL);
- HandlerRegistry registry = service.getDynamicHandlerRegistry();
- List infos = registry.getHandlerChain(portName);
- infos.add(new HandlerInfo(WSSecurityHandlerOutbound.class, new HashMap(), new
QName[]{}));
- registry.setHandlerChain(portName, infos);
+ Hello port = (Hello)service.getPort(Hello.class);
+ StubExt stub = (StubExt)port;
- Hello port = (Hello)service.getPort(Hello.class);
- ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-samples-wssecurity-sign");
+ stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-samples-wssecurity-sign");
+ stub.setConfigName("Standard WSSecurity Client");
+
return port;
}
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java 2007-01-05
21:52:07 UTC (rev 1829)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java 2007-01-05
21:52:21 UTC (rev 1830)
@@ -24,10 +24,10 @@
import javax.ejb.Stateless;
import javax.jws.WebService;
import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
import org.jboss.logging.Logger;
-import org.jboss.mx.util.MBeanServerLocator;
/**
*
@@ -43,9 +43,9 @@
public String hello(final String message)
{
- MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
try
{
+ MBeanServer mbeanServer =
(MBeanServer)MBeanServerFactory.findMBeanServer("jboss").get(0);
ObjectName on = new
ObjectName("jboss.web:J2EEApplication=none,J2EEServer=none,WebModule...;
mbeanServer.getMBeanInfo(on);
}
Modified: trunk/jbossws-tests/src/main/resources/tests-tomcat-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/main/resources/tests-tomcat-excludes.txt 2007-01-05 21:52:07
UTC (rev 1829)
+++ trunk/jbossws-tests/src/main/resources/tests-tomcat-excludes.txt 2007-01-05 21:52:21
UTC (rev 1830)
@@ -6,3 +6,4 @@
org/jboss/test/ws/jaxrpc/samples/wsbpel/**
org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.class
org/jboss/test/ws/jaxws/samples/jsr181ejb/**
+org/jboss/test/ws/jaxws/samples/retail/**