Author: thomas.diesler(a)jboss.com
Date: 2007-01-03 13:15:27 -0500 (Wed, 03 Jan 2007)
New Revision: 1777
Added:
trunk/integration-jboss42/src/main/resources/jbossws.war/
trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/
trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/web.xml
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerEJB.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerJSE.java
trunk/integration-jboss50/src/main/resources/jbossws.war/
trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/
trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/web.xml
trunk/integration-tomcat/src/main/resources/
trunk/integration-tomcat/src/main/resources/jbossws.war/
trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/
trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/jboss-beans.xml
trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/
trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/log4j.xml
trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/web.xml
trunk/jbossws-tests/src/main/resources/jaxws/eardeployment/META-INF/application.xml
trunk/jbossws-tests/src/main/resources/tests-no-excludes.txt
Removed:
trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/
trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/web.xml
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/
trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/web.xml
trunk/integration-tomcat/src/main/resources/jbossws.war/
trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/
trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/jboss-beans.xml
trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/
trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/log4j.xml
trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/web.xml
trunk/jbossws-core/src/main/resources/jbossws.war/JBoss/
trunk/jbossws-core/src/main/resources/jbossws.war/Tomcat/
trunk/jbossws-tests/src/main/resources/tests-excludes.txt
Modified:
trunk/build/build.xml
trunk/integration-jboss42/build.xml
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB.java
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebMetaDataAdaptor.java
trunk/integration-jboss50/build.xml
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerJSE.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
trunk/integration-tomcat/build.xml
trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/wspublish.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
trunk/jbossws-tests/.classpath
trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/etc/log4j.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/encoded/parametermode/ParameterModeTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1205/JBWS1205TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean03.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EJB3Bean03.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/jbws860/WEB-INF/jboss-web.xml
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF01/jboss-web.xml
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF02/jboss-web.xml
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF03/jboss-web.xml
Log:
Finish work on 4.2 porting layer
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-01-03 16:18:52 UTC (rev 1776)
+++ trunk/build/build.xml 2007-01-03 18:15:27 UTC (rev 1777)
@@ -44,6 +44,7 @@
<ant antfile="${integration.jboss42.dir}/build.xml"
target="clean" inheritall="false"/>
<ant antfile="${integration.jboss50.dir}/build.xml"
target="clean" inheritall="false"/>
<ant antfile="${integration.tomcat.dir}/build.xml"
target="clean" inheritall="false"/>
+ <ant antfile="${tests.dir}/build.xml" target="clean"
inheritall="false"/>
</target>
<target name="main" description="Executes the default target
(most)." depends="most"/>
Modified: trunk/integration-jboss42/build.xml
===================================================================
--- trunk/integration-jboss42/build.xml 2007-01-03 16:18:52 UTC (rev 1776)
+++ trunk/integration-jboss42/build.xml 2007-01-03 18:15:27 UTC (rev 1777)
@@ -83,6 +83,17 @@
<metainf
dir="${jboss42.resources.dir}/jbossws-jboss42-integration.jar/META-INF"/>
</jar>
+ <!-- Build jbossws-context.war -->
+ <war warfile="${jboss42.output.lib.dir}/jbossws-context.war"
webxml="${jboss42.resources.dir}/jbossws.war/WEB-INF/web.xml">
+ <fileset dir="${core.resources.dir}/jbossws.war">
+ <include name="index.html"/>
+ <include name="styles.css"/>
+ </fileset>
+ <webinf dir="${jboss42.resources.dir}/jbossws.war/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
<!-- Build jbossws42.sar -->
<jar jarfile="${jboss42.output.lib.dir}/jbossws42.sar"
manifest="${output.etc.dir}/default.mf">
<fileset dir="${jboss42.output.lib.dir}">
Modified:
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
===================================================================
---
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -70,9 +70,7 @@
*/
protected final Object create(Invocation invocation, DeploymentInfo di) throws
Throwable
{
- log.debug("create: " + di.url);
Object retn = invokeNext(invocation);
-
if (isWebserviceDeployment(di))
{
try
@@ -85,7 +83,6 @@
DeploymentException.rethrowAsDeploymentException("Cannot create service
endpoint", ex);
}
}
-
return retn;
}
@@ -93,9 +90,7 @@
*/
protected final Object start(Invocation invocation, DeploymentInfo di) throws
Throwable
{
- log.debug("start: " + di.url);
Object retn = invokeNext(invocation);
-
try
{
startServiceEndpoint(di);
@@ -105,7 +100,6 @@
destroyServiceEndpoint(di);
DeploymentException.rethrowAsDeploymentException("Cannot start service
endpoint", ex);
}
-
return retn;
}
@@ -113,10 +107,7 @@
*/
protected final Object stop(Invocation invocation, DeploymentInfo di) throws
Throwable
{
- log.debug("stop: " + di.url);
-
stopServiceEndpoint(di);
-
return invokeNext(invocation);
}
@@ -124,15 +115,13 @@
*/
protected final Object destroy(Invocation invocation, DeploymentInfo di) throws
Throwable
{
- log.debug("destroy: " + di.url);
-
destroyServiceEndpoint(di);
-
return invokeNext(invocation);
}
protected void createServiceEndpoint(DeploymentInfo di) throws Exception
{
+ log.debug("create: " + di.url);
UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(di);
di.context.put(UnifiedDeploymentInfo.class.getName(), udi);
getServiceEndpointDeployer().create(udi);
@@ -143,6 +132,8 @@
UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
+ log.debug("start: " + di.url);
+
// late initialization of the web context loader
if (di.metaData instanceof WebMetaData)
{
@@ -159,6 +150,7 @@
UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
+ log.debug("stop: " + di.url);
getServiceEndpointDeployer().stop(udi);
}
}
@@ -168,6 +160,7 @@
UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
+ log.debug("destroy: " + di.url);
getServiceEndpointDeployer().destroy(udi);
}
}
Modified:
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB.java
===================================================================
---
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -57,6 +57,8 @@
protected void destroyServiceEndpoint(DeploymentInfo di) throws Exception
{
+ super.destroyServiceEndpoint(di);
+
UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
Modified:
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
===================================================================
---
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -27,6 +27,9 @@
import java.util.Iterator;
import java.util.Map;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.WebMetaData;
import org.jboss.ws.WSException;
@@ -49,6 +52,51 @@
*/
public class DeployerInterceptorJSE extends DeployerInterceptor implements
DeployerInterceptorJSEMBean
{
+ /** Return true if the deployment is a web service endpoint
+ */
+ protected boolean isWebserviceDeployment(DeploymentInfo di)
+ {
+ WebMetaData webMetaData = (WebMetaData)di.metaData;
+ boolean isWebserviceDeployment = webMetaData.isWebServiceDeployment();
+
+ // Check if we have a webservices.xml descriptor
+ if (isWebserviceDeployment == false)
+ {
+ if (getWebservicesDescriptor(di) != null)
+ {
+ di.context.put("UnifiedDeploymentInfo.Type",
UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE);
+ isWebserviceDeployment = true;
+ }
+ }
+
+ // Check if the web.xml contains annotated endpoint impl
+ if (isWebserviceDeployment == false)
+ {
+ Map servletClassMap = webMetaData.getServletClassMap();
+ Iterator<String> it = servletClassMap.values().iterator();
+ while (it.hasNext() && isWebserviceDeployment == false)
+ {
+ String servletClassName = it.next();
+ try
+ {
+ Class servletClass = di.annotationsCl.loadClass(servletClassName);
+ if (servletClass.isAnnotationPresent(WebService.class) ||
servletClass.isAnnotationPresent(WebServiceProvider.class))
+ {
+ di.context.put("UnifiedDeploymentInfo.Type",
UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE);
+ isWebserviceDeployment = true;
+ }
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + servletClassName);
+ }
+ }
+ }
+
+ webMetaData.setWebServiceDeployment(isWebserviceDeployment);
+ return isWebserviceDeployment;
+ }
+
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws
Exception
{
UnifiedDeploymentInfo udi;
@@ -84,7 +132,7 @@
if (udi != null)
{
AbstractServiceEndpointPublisher endpointPublisher =
getServiceEndpointPublisher();
- RewriteResults results = endpointPublisher.rewriteWebXml(udi.url);
+ RewriteResults results = endpointPublisher.rewriteWebXml(udi);
updateServiceEndpointTargetBeans(udi, results);
}
}
@@ -105,51 +153,6 @@
}
}
- /** Return true if the deployment is a web service endpoint
- */
- protected boolean isWebserviceDeployment(DeploymentInfo di)
- {
- WebMetaData webMetaData = (WebMetaData)di.metaData;
- boolean isWebserviceDeployment = webMetaData.isWebServiceDeployment();
-
- // Check if we have a webservices.xml descriptor
- if (isWebserviceDeployment == false)
- {
- if (getWebservicesDescriptor(di) != null)
- {
- di.context.put("UnifiedDeploymentInfo.Type",
UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE);
- isWebserviceDeployment = true;
- }
- }
-
- // Check if the web.xml contains annotated endpoint impl
- if (isWebserviceDeployment == false)
- {
- Map servletClassMap = webMetaData.getServletClassMap();
- Iterator<String> it = servletClassMap.values().iterator();
- while (it.hasNext() && isWebserviceDeployment == false)
- {
- String servletClassName = it.next();
- try
- {
- Class servletClass = di.annotationsCl.loadClass(servletClassName);
- if (servletClass.isAnnotationPresent(javax.jws.WebService.class))
- {
- di.context.put("UnifiedDeploymentInfo.Type",
UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE);
- isWebserviceDeployment = true;
- }
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + servletClassName);
- }
- }
- }
-
- webMetaData.setWebServiceDeployment(isWebserviceDeployment);
- return isWebserviceDeployment;
- }
-
/**
* Get the resource name of the webservices.xml descriptor.
*/
Modified:
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
===================================================================
---
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -51,9 +51,10 @@
udi.name = di.getCanonicalName();
udi.simpleName = di.shortName;
udi.url = getDeploymentURL(di);
- udi.metaData = buildMetaData(di.metaData);
udi.classLoader = di.annotationsCl;
udi.deployedObject = di.deployedObject;
+
+ buildMetaData(udi, di.metaData);
return udi;
}
@@ -72,17 +73,16 @@
return deploymentURL;
}
- private static Object buildMetaData(Object metaData)
+ private static void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
{
- Object retMetaData = null;
if (metaData instanceof WebMetaData)
{
- retMetaData =
WebMetaDataAdaptor.buildUnifiedWebMetaData((WebMetaData)metaData);
+ udi.metaData =
WebMetaDataAdaptor.buildUnifiedWebMetaData((WebMetaData)metaData);
+ udi.webappURL = udi.url;
}
else if (metaData instanceof ApplicationMetaData)
{
- retMetaData =
ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData((ApplicationMetaData)metaData);
+ udi.metaData =
ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData((ApplicationMetaData)metaData);
}
- return retMetaData;
}
}
Modified:
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java
===================================================================
---
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -53,10 +53,10 @@
if (di == null)
throw new IllegalStateException("Cannot obtain DeploymentInfo from
context");
- URL warURL = udi.url;
- rewriteWebXml(warURL);
+ rewriteWebXml(udi);
// Preserve the repository config
+ URL warURL = udi.webappURL;
DeploymentInfo auxdi = new DeploymentInfo(warURL, null,
MBeanServerLocator.locateJBoss());
auxdi.repositoryConfig = di.getTopRepositoryConfig();
getMainDeployer().deploy(auxdi);
Modified:
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebMetaDataAdaptor.java
===================================================================
---
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebMetaDataAdaptor.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/WebMetaDataAdaptor.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -27,6 +27,8 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.WebSecurityMetaData;
@@ -49,6 +51,7 @@
UnifiedWebMetaData umd = new UnifiedWebMetaData();
umd.setContextRoot(wmd.getContextRoot());
umd.setServletMappings(wmd.getServletMappings());
+ umd.setServletClassNames(getServletClassMap(wmd));
umd.setConfigName(wmd.getConfigName());
umd.setConfigFile(wmd.getConfigFile());
umd.setSecurityDomain(wmd.getSecurityDomain());
@@ -98,4 +101,19 @@
return unifiedsecurityMetaData;
}
+ private static Map<String, String> getServletClassMap(WebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ Iterator it = wmd.getServletClassMap().entrySet().iterator();
+ while(it.hasNext())
+ {
+ Map.Entry entry = (Entry)it.next();
+ String servletName = (String)entry.getKey();
+ String servletClass = (String)entry.getValue();
+ // Skip JSPs
+ if (servletClass != null)
+ mappings.put(servletName, servletClass);
+ }
+ return mappings;
+ }
}
Copied: trunk/integration-jboss42/src/main/resources/jbossws.war (from rev 1776,
branches/tdiesler/trunk/integration-jboss42/src/main/resources/jbossws.war)
Copied: trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF (from rev 1776,
branches/tdiesler/trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF)
Deleted: trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
===================================================================
---
branches/tdiesler/trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!DOCTYPE jboss-web
- PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
-
-<jboss-web>
-
- <!--
- <security-domain>java:/jaas/jbossws</security-domain>
- -->
- <context-root>jbossws</context-root>
-
-</jboss-web>
Copied: trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
(from rev 1776,
branches/tdiesler/trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml)
Deleted: trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/web.xml
===================================================================
---
branches/tdiesler/trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++ trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- A web application that installs the JBossWS servlets
-
- $Id$
--->
-
-<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <display-name>JBossWS</display-name>
-
- <servlet>
- <servlet-name>ContextServlet</servlet-name>
-
<servlet-class>org.jboss.ws.integration.jboss42.JBossContextServlet</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>PortComponentLinkServlet</servlet-name>
-
<servlet-class>org.jboss.ws.integration.jboss42.PortComponentLinkServlet</servlet-class>
- </servlet>
-
- <!-- now the mappings -->
-
- <servlet-mapping>
- <servlet-name>ContextServlet</servlet-name>
- <url-pattern>/services/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>PortComponentLinkServlet</servlet-name>
- <url-pattern>/pclink</url-pattern>
- </servlet-mapping>
-
- <!--
- currently the W3C haven't settled on a media type for WSDL;
-
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
- for now we go with the basic 'it's XML' response
- -->
- <mime-mapping>
- <extension>wsdl</extension>
- <mime-type>text/xml</mime-type>
- </mime-mapping>
-
- <mime-mapping>
- <extension>xsd</extension>
- <mime-type>text/xml</mime-type>
- </mime-mapping>
-
- <welcome-file-list id="WelcomeFileList">
- <welcome-file>index.html</welcome-file>
- </welcome-file-list>
-
-</web-app>
Copied: trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/web.xml (from rev
1776,
branches/tdiesler/trunk/integration-jboss42/src/main/resources/jbossws.war/WEB-INF/web.xml)
Modified: trunk/integration-jboss50/build.xml
===================================================================
--- trunk/integration-jboss50/build.xml 2007-01-03 16:18:52 UTC (rev 1776)
+++ trunk/integration-jboss50/build.xml 2007-01-03 18:15:27 UTC (rev 1777)
@@ -84,12 +84,12 @@
</jar>
<!-- Build jbossws-context.war -->
- <war warfile="${jboss50.output.lib.dir}/jbossws-context.war"
webxml="${core.resources.dir}/jbossws.war/JBoss/WEB-INF/web.xml">
+ <war warfile="${jboss50.output.lib.dir}/jbossws-context.war"
webxml="${jboss50.resources.dir}/jbossws.war/WEB-INF/web.xml">
<fileset dir="${core.resources.dir}/jbossws.war">
<include name="index.html"/>
<include name="styles.css"/>
</fileset>
- <webinf dir="${core.resources.dir}/jbossws.war/JBoss/WEB-INF">
+ <webinf dir="${jboss50.resources.dir}/jbossws.war/WEB-INF">
<include name="jboss-web.xml"/>
</webinf>
</war>
Copied:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerEJB.java
(from rev 1776,
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerEJB.java)
Copied:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerJSE.java
(from rev 1776,
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerJSE.java)
Deleted:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,93 +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.ws.integration.jboss50;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * An abstract deployer for EJB Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2006
- */
-public abstract class AbstractEJBDeployer extends AbstractDeployer
-{
- @Override
- protected void createServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit)
throws Exception
- {
- // Create the service endpoint
- super.createServiceEndpoint(udi, unit);
-
- // Generate the webapp and publish through th publisher
- try
- {
- UnifiedMetaData wsMetaData =
getServiceEndpointDeployer().getUnifiedMetaData(udi);
- udi.webappURL = new
ServiceEndpointGeneratorEJB3().generatWebDeployment(wsMetaData, unit);
- unit.addAttachment(ServiceEndpointWebApp.class, new
ServiceEndpointWebApp(udi.webappURL));
- getServiceEndpointPublisher().publishServiceEndpoint(udi);
- }
- catch (Exception ex)
- {
- DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
- }
- }
-
- @Override
- protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit)
- {
- // Destroy the webapp
- URL warURL = unit.getAttachment(ServiceEndpointWebApp.class).getWarURL();
- try
- {
- getServiceEndpointPublisher().destroyServiceEndpoint(udi);
- }
- catch (Exception ex)
- {
- log.error("Cannot destroy service endpoint: " + warURL, ex);
- }
-
- // Destroy the service endpoint
- super.destroyServiceEndpoint(udi, unit);
- }
-
- static class ServiceEndpointWebApp
- {
- private URL warURL;
-
- ServiceEndpointWebApp(URL warURL)
- {
- this.warURL = warURL;
- }
-
- public URL getWarURL()
- {
- return warURL;
- }
- }
-}
Deleted:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,115 +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.ws.integration.jboss50;
-
-//$Id$
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.metadata.NameValuePair;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.web.Servlet;
-import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
-import org.jboss.ws.core.server.AbstractServiceEndpointPublisher.RewriteResults;
-
-/**
- * An abstract deployer for JSE Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2006
- */
-public abstract class AbstractJSEDeployer extends AbstractDeployer
-{
- public AbstractJSEDeployer()
- {
- super();
- super.setRelativeOrder(CLASSLOADER_DEPLOYER + 1);
- }
-
- /**
- * After the service endpoint has successfully been deployed to the
ServiceEndpointManager,
- *
- */
- @Override
- protected void deployServiceEndpoint(DeploymentUnit unit) throws Exception
- {
- // Call the super implementation
- super.deployServiceEndpoint(unit);
-
- // FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
- InputStream stream =
unit.getDeploymentContext().getRoot().findChild("WEB-INF/web.xml").openStream();
- RewriteResults results = getServiceEndpointPublisher().rewriteWebXml(stream, null,
unit.getClassLoader());
-
- URL webXML = results.webXML;
- modifyWebMetaData(unit, webXML);
- }
-
- private void modifyWebMetaData(DeploymentUnit unit, URL webXML) throws Exception
- {
- Set<? extends WebMetaData> allMetaData =
unit.getAllMetaData(WebMetaData.class);
- if (allMetaData.size() < 1)
- throw new DeploymentException("Cannot find WebMetaData");
-
- WebMetaData webMetaData = allMetaData.iterator().next();
- String serviceEndpointServlet =
getServiceEndpointPublisher().getServiceEndpointServlet();
-
- Iterator it = webMetaData.getServlets().iterator();
- while (it.hasNext())
- {
- Servlet servlet = (Servlet)it.next();
- String servletClassName = servlet.getServletClass();
-
- // JSP
- if (servletClassName == null)
- continue;
-
- // Nothing to do if we have an <init-param>
- if (isAlreadyModified(servlet) == false)
- {
- servlet.setServletClass(serviceEndpointServlet);
- NameValuePair initParam = new
NameValuePair(AbstractServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL,
servletClassName);
- servlet.addInitParam(initParam);
- }
- }
-
- // FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
- String webXmlPath = webXML.getPath();
- webMetaData.setAltDDPath(webXmlPath);
- }
-
- private boolean isAlreadyModified(Servlet servlet)
- {
- Iterator itParams = servlet.getInitParams().iterator();
- while (itParams.hasNext())
- {
- NameValuePair pair = (NameValuePair)itParams.next();
- if
(AbstractServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL.equals(pair.getName()))
- return true;
- }
- return false;
- }
-}
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.integration.jboss50;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
@@ -58,7 +60,8 @@
udi.name = unit.getName();
udi.simpleName = unit.getSimpleName();
udi.url = unit.getDeploymentContext().getRoot().toURL();
- udi.metaData = buildMetaData(unit);
+
+ buildMetaData(udi, unit);
// Since we create temporary classes, we need to create a delegate loader
// This prevents CCE problems where the parent loader is available at deploy
time,
@@ -73,20 +76,20 @@
}
}
- private static Object buildMetaData(DeploymentUnit unit)
+ private static void buildMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit)
throws Exception
{
Object metaData = null;
if (unit.getAttachment(Ejb3Deployment.class) != null)
{
- metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(unit);
+ udi.metaData =
ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(unit);
}
else
{
if (unit.getAllMetaData(WebMetaData.class).size() > 0)
{
- metaData = WebMetaDataAdaptor.buildUnifiedWebMetaData(unit);
+ udi.metaData = WebMetaDataAdaptor.buildUnifiedWebMetaData(unit);
+ udi.webappURL = unit.getDeploymentContext().getRoot().toURL();
}
}
- return metaData;
}
}
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerJSE.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerJSE.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerJSE.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -40,7 +40,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 31-Oct-2005
*/
-public class JAXRPCDeployerJSE extends AbstractJSEDeployer
+public class JAXRPCDeployerJSE extends AbstractDeployerJSE
{
@Override
protected DeploymentType getDeploymentType()
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -43,7 +43,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 31-Oct-2005
*/
-public class JAXWSDeployerEJB3 extends AbstractEJBDeployer
+public class JAXWSDeployerEJB3 extends AbstractDeployerEJB
{
@Override
protected DeploymentType getDeploymentType()
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -43,7 +43,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 31-Oct-2005
*/
-public class JAXWSDeployerJSE extends AbstractJSEDeployer
+public class JAXWSDeployerJSE extends AbstractDeployerJSE
{
@Override
protected DeploymentType getDeploymentType()
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -66,7 +66,7 @@
URL warURL = udi.webappURL;
log.debug("publishServiceEndpoint: " + warURL);
- rewriteWebXml(warURL);
+ rewriteWebXml(udi);
DeploymentContext context = createDeploymentContext(warURL);
mainDeployer.addDeploymentContext(context);
Copied: trunk/integration-jboss50/src/main/resources/jbossws.war (from rev 1776,
branches/tdiesler/trunk/integration-jboss50/src/main/resources/jbossws.war)
Copied: trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF (from rev 1776,
branches/tdiesler/trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF)
Deleted: trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!DOCTYPE jboss-web
- PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
-
-<jboss-web>
-
- <!--
- <security-domain>java:/jaas/jbossws</security-domain>
- -->
- <context-root>jbossws</context-root>
-
-</jboss-web>
Copied: trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
(from rev 1776,
branches/tdiesler/trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml)
Deleted: trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/web.xml
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++ trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- A web application that installs the JBossWS servlets
-
- $Id$
--->
-
-<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <display-name>JBossWS</display-name>
-
- <servlet>
- <servlet-name>ContextServlet</servlet-name>
-
<servlet-class>org.jboss.ws.integration.jboss50.JBossContextServlet</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>PortComponentLinkServlet</servlet-name>
-
<servlet-class>org.jboss.ws.integration.jboss50.PortComponentLinkServlet</servlet-class>
- </servlet>
-
- <!-- now the mappings -->
-
- <servlet-mapping>
- <servlet-name>ContextServlet</servlet-name>
- <url-pattern>/services/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>PortComponentLinkServlet</servlet-name>
- <url-pattern>/pclink</url-pattern>
- </servlet-mapping>
-
- <!--
- currently the W3C haven't settled on a media type for WSDL;
-
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
- for now we go with the basic 'it's XML' response
- -->
- <mime-mapping>
- <extension>wsdl</extension>
- <mime-type>text/xml</mime-type>
- </mime-mapping>
-
- <mime-mapping>
- <extension>xsd</extension>
- <mime-type>text/xml</mime-type>
- </mime-mapping>
-
- <welcome-file-list id="WelcomeFileList">
- <welcome-file>index.html</welcome-file>
- </welcome-file-list>
-
-</web-app>
Copied: trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/web.xml (from rev
1776,
branches/tdiesler/trunk/integration-jboss50/src/main/resources/jbossws.war/WEB-INF/web.xml)
Modified: trunk/integration-tomcat/build.xml
===================================================================
--- trunk/integration-tomcat/build.xml 2007-01-03 16:18:52 UTC (rev 1776)
+++ trunk/integration-tomcat/build.xml 2007-01-03 18:15:27 UTC (rev 1777)
@@ -82,12 +82,12 @@
</jar>
<!-- Build jbossws.war -->
- <war warfile="${tomcat.output.lib.dir}/jbossws.war"
webxml="${core.resources.dir}/jbossws.war/Tomcat/WEB-INF/web.xml">
+ <war warfile="${tomcat.output.lib.dir}/jbossws.war"
webxml="${tomcat.resources.dir}/jbossws.war/WEB-INF/web.xml">
<fileset dir="${core.resources.dir}/jbossws.war">
<include name="index.html"/>
<include name="styles.css"/>
</fileset>
- <fileset dir="${core.resources.dir}/jbossws.war/Tomcat">
+ <fileset dir="${tomcat.resources.dir}/jbossws.war">
<include name="META-INF/jboss-beans.xml"/>
</fileset>
<fileset dir="${core.resources.dir}/jbossws.sar">
@@ -96,7 +96,7 @@
<include name="META-INF/standard-jaxws-client-config.xml"/>
<include name="META-INF/standard-jaxws-endpoint-config.xml"/>
</fileset>
- <classes dir="${core.resources.dir}/jbossws.war/Tomcat/WEB-INF">
+ <classes dir="${tomcat.resources.dir}/jbossws.war/WEB-INF">
<include name="log4j.xml"/>
</classes>
</war>
Modified:
trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/wspublish.java
===================================================================
---
trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/wspublish.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/wspublish.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -32,6 +32,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.file.JarUtils;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
* Publish a standard portable J2EE web service endpoint
@@ -67,9 +68,13 @@
JarUtils.unjar(in, tmpDir);
in.close();
+ UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(null);
+ udi.webappURL = tmpDir.toURL();
+
TomcatServiceEndpointPublisher publisher = new TomcatServiceEndpointPublisher();
publisher.setServiceEndpointServlet(servletName);
- publisher.rewriteWebXml(tmpDir.toURL());
+
+ publisher.rewriteWebXml(udi);
File outFile = new File(destDir.getCanonicalPath() + "/" + warName);
outFile.getParentFile().mkdirs();
Copied: trunk/integration-tomcat/src/main/resources (from rev 1776,
branches/tdiesler/trunk/integration-tomcat/src/main/resources)
Copied: trunk/integration-tomcat/src/main/resources/jbossws.war (from rev 1776,
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war)
Copied: trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF (from rev 1776,
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF)
Deleted: trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/jboss-beans.xml
===================================================================
---
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/jboss-beans.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/jboss-beans.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
-
- <bean name="ServiceEndpointManager"
class="org.jboss.ws.core.server.ServiceEndpointManager">
- <!--
- The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
- element which points to the location of the endpoint. JBossWS supports rewriting of
that SOAP address.
-
- If the content of <soap:address> is a valid URL, JBossWS will not rewrite it
unless AlwaysModifySOAPAddress is true.
- If the content of <soap:address> is not a valid URL, JBossWS will rewrite it
using the attribute values given below.
- -->
- <property name="alwaysModifySOAPAddress">true</property>
- <property name="webServiceHost">localhost</property>
- <property name="webServiceSecurePort">8443</property>
- <property name="webServicePort">8080</property>
- <property
name="serviceEndpointInvokerJSE">org.jboss.ws.core.server.ServiceEndpointInvokerJSE</property>
- </bean>
-
- <bean name="ServiceEndpointDeployer"
class="org.jboss.ws.core.server.ServiceEndpointDeployer">
- <property name="serviceEndpointManager"><inject
bean="ServiceEndpointManager"/></property>
- </bean>
-
- <bean name="ServiceEndpointPublisher"
class="org.jboss.ws.integration.tomcat.TomcatServiceEndpointPublisher">
- <property
name="serviceEndpointServlet">org.jboss.ws.integration.tomcat.TomcatServiceEndpointServlet</property>
- <property
name="deployDir">${catalina.home}/jbossws-deploy</property>
- <property name="targetDir">${catalina.home}/webapps</property>
- <property name="interval">500</property>
- </bean>
-
- <!--
- A subscription manager for WS-Eventing
- -->
- <bean name="SubscriptionManager"
class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
-
- <bean name="ServerConfig"
class="org.jboss.ws.integration.tomcat.ServerConfigImpl"/>
-
- <bean name="KernelLocator"
class="org.jboss.ws.core.server.KernelLocator"/>
-
-</deployment>
Copied: trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/jboss-beans.xml
(from rev 1776,
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war/META-INF/jboss-beans.xml)
Copied: trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF (from rev 1776,
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF)
Deleted: trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/log4j.xml
===================================================================
---
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/log4j.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++ trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/log4j.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id:log4j.xml 1492 2006-11-21 19:49:34Z thomas.diesler(a)jboss.com $ -->
-
-<!--
-| For more configuration infromation and examples see the Jakarta Log4j
-| owebsite:
http://jakarta.apache.org/log4j
--->
-
-<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
-
- <!-- ================================= -->
- <!-- Preserve messages in a local file -->
- <!-- ================================= -->
-
- <!-- A time/date based rolling appender -->
- <appender name="FILE"
class="org.jboss.logging.appender.DailyRollingFileAppender">
- <param name="File" value="../logs/jbossws.log"/>
- <param name="Append" value="false"/>
-
- <!-- Rollover at midnight each day -->
- <param name="DatePattern" value="'.'yyyy-MM-dd"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c:%L]
%m%n"/>
- </layout>
- </appender>
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
- <param name="Threshold" value="INFO"/>
- <param name="Target" value="System.out"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]
%m%n"/>
- </layout>
- </appender>
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <category name="org.jboss.ws">
- <priority value="DEBUG"/>
- </category>
-
- <category name="org.jboss.remoting">
- <priority value="INFO"/>
- </category>
-
- <category name="jbossws.SOAPMessage">
- <priority value="TRACE" class="org.jboss.logging.XLevel"/>
- </category>
-
- <!--
- <category name="org.jboss.xb">
- <priority value="TRACE" class="org.jboss.logging.XLevel"/>
- </category>
- -->
-
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
-<!--
- <appender-ref ref="CONSOLE"/>
--->
- <appender-ref ref="FILE"/>
- </root>
-
-</log4j:configuration>
Copied: trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/log4j.xml (from
rev 1776,
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/log4j.xml)
Deleted: trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/web.xml
===================================================================
---
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++ trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- A web application that installs the JBossWS servlets
-
- $Id$
--->
-
-<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <display-name>JBossWS</display-name>
-
- <servlet>
- <servlet-name>ContextServlet</servlet-name>
-
<servlet-class>org.jboss.ws.integration.tomcat.TomcatContextServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- now the mappings -->
-
- <servlet-mapping>
- <servlet-name>ContextServlet</servlet-name>
- <url-pattern>/services/*</url-pattern>
- </servlet-mapping>
-
- <!--
- currently the W3C haven't settled on a media type for WSDL;
-
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
- for now we go with the basic 'it's XML' response
- -->
- <mime-mapping>
- <extension>wsdl</extension>
- <mime-type>text/xml</mime-type>
- </mime-mapping>
-
- <mime-mapping>
- <extension>xsd</extension>
- <mime-type>text/xml</mime-type>
- </mime-mapping>
-
- <welcome-file-list id="WelcomeFileList">
- <welcome-file>index.html</welcome-file>
- </welcome-file-list>
-
-</web-app>
Copied: trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/web.xml (from rev
1776,
branches/tdiesler/trunk/integration-tomcat/src/main/resources/jbossws.war/WEB-INF/web.xml)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -186,7 +186,7 @@
private void handleRemoteException(OperationMetaData opMetaData, Exception ex)
{
String bindingId = opMetaData.getEndpointMetaData().getBindingId();
- if (SOAPBinding.SOAP11HTTP_BINDING.equals(bindingId) ||
SOAPBinding.SOAP12HTTP_BINDING.equals(bindingId))
+ if (bindingId.startsWith(SOAPBinding.SOAP11HTTP_BINDING) ||
bindingId.startsWith(SOAPBinding.SOAP12HTTP_BINDING))
{
if (ex instanceof SOAPFaultException)
{
@@ -204,7 +204,7 @@
}
else
{
- throw new WebServiceException("Unsuported binding: " + bindingId);
+ throw new WebServiceException("Unsuported binding: " + bindingId,
ex);
}
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -84,8 +84,9 @@
public abstract String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws
Exception;
- public RewriteResults rewriteWebXml(URL warURL)
+ public RewriteResults rewriteWebXml(UnifiedDeploymentInfo udi)
{
+ URL warURL = udi.webappURL;
File warFile = new File(warURL.getFile());
if (warFile.isDirectory() == false)
throw new WSException("Expected a war directory: " + warURL);
@@ -105,7 +106,7 @@
throw new WSException("Cannot rename web.xml: " + orgWebXML);
FileInputStream stream = new FileInputStream(orgWebXML);
- return rewriteWebXml(stream, webXML, null);
+ return rewriteWebXml(stream, webXML, udi.classLoader);
}
catch (RuntimeException rte)
{
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -30,6 +30,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
+import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB21;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -89,6 +90,11 @@
JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
wsMetaData = builder.buildMetaData(udi);
}
+ else if (udi.type == UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB21)
+ {
+ JAXWSMetaDataBuilderEJB21 builder = new JAXWSMetaDataBuilderEJB21();
+ wsMetaData = builder.buildMetaData(udi);
+ }
else if (udi.type == UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3)
{
JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -26,7 +26,6 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
import java.util.HashMap;
import java.util.Map;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -42,8 +42,7 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.security.SSLSocketBuilder;
-import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.xop.XOPContext;
@@ -81,7 +80,7 @@
//configMap.put(StubExt.PROPERTY_TRUST_STORE,
SSLSocketBuilder.REMOTING_TRUST_STORE_FILE_PATH);
//configMap.put(StubExt.PROPERTY_TRUST_STORE_PASSWORD,
SSLSocketBuilder.REMOTING_TRUST_STORE_PASSWORD);
//configMap.put(StubExt.PROPERTY_TRUST_STORE_TYPE,
SSLSocketBuilder.REMOTING_TRUST_STORE_TYPE);
-
+
configMap.put(StubExt.PROPERTY_KEY_STORE,
"org.jboss.remoting.keyStore");
configMap.put(StubExt.PROPERTY_KEY_STORE_PASSWORD,
"org.jboss.remoting.keyStorePassword");
configMap.put(StubExt.PROPERTY_KEY_STORE_TYPE,
"org.jboss.remoting.keyStoreType");
@@ -94,9 +93,9 @@
public SOAPConnectionImpl()
{
- // HTTPClientInvoker conect sends gratuitous POST
- //
http://jira.jboss.com/jira/browse/JBWS-711
- config.put(Client.ENABLE_LEASE, false);
+ // HTTPClientInvoker conect sends gratuitous POST
+ //
http://jira.jboss.com/jira/browse/JBWS-711
+ config.put(Client.ENABLE_LEASE, false);
}
/**
@@ -128,8 +127,6 @@
if (closed)
throw new SOAPException("SOAPConnection is already closed");
- InvokerLocator locator;
- Client remotingClient;
String targetAddress;
Map callProps;
@@ -142,8 +139,7 @@
if (callProps.containsKey(StubExt.PROPERTY_CLIENT_TIMEOUT))
{
Object timeout = callProps.get(StubExt.PROPERTY_CLIENT_TIMEOUT);
- int qmIndex = targetAddress.indexOf("?");
- targetAddress += (qmIndex < 0 ? "?" : "&") +
"timeout=" + timeout;
+ targetAddress = addURLParameter(targetAddress, "timeout",
timeout.toString());
}
}
else if (endpoint instanceof EndpointReference)
@@ -158,47 +154,22 @@
callProps = null;
}
- // enforce xop transitions
+ // enforce xop transitions
// TODO: there should be a clear transition to an immutable object model
XOPContext.eagerlyCreateAttachments();
// save object model changes
- if (reqMessage.saveRequired()) reqMessage.saveChanges();
+ if (reqMessage.saveRequired())
+ reqMessage.saveChanges();
- try
- {
- // Get the invoker from Remoting for a given endpoint address
- log.debug("Get locator for: " + endpoint);
- locator = new InvokerLocator(targetAddress);
- }
- catch (MalformedURLException e)
- {
- throw new SOAPException("Malformed endpoint address", e);
- }
+ // setup remoting client
+ Map metadata = createRemotingMetaData(reqMessage, callProps);
+ Client client = createRemotingClient(endpoint, targetAddress, oneway);
- Map metadata = getRemotingMetaData(reqMessage, targetAddress, callProps);
-
try
{
- remotingClient = new Client(locator, "saaj", config);
- remotingClient.connect();
- remotingClient.setMarshaller(new SOAPMessageMarshaller());
- if (oneway == false)
- remotingClient.setUnMarshaller(new SOAPMessageUnMarshaller());
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new SOAPException("Could not setup remoting client", e);
- }
-
- try
- {
// debug the outgoing message
- if(msgLog.isTraceEnabled())
+ if (msgLog.isTraceEnabled())
{
SOAPEnvelope soapReqEnv = reqMessage.getSOAPPart().getEnvelope();
String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapReqEnv,
true);
@@ -209,15 +180,15 @@
SOAPMessage resMessage = null;
if (oneway == true)
{
- remotingClient.invokeOneway(reqMessage, metadata, false);
+ client.invokeOneway(reqMessage, metadata, false);
}
else
{
- resMessage = (SOAPMessage)remotingClient.invoke(reqMessage, metadata);
+ resMessage = (SOAPMessage)client.invoke(reqMessage, metadata);
}
- // disconnect the rmoting client
- remotingClient.disconnect();
+ // Disconnect the remoting client
+ client.disconnect();
// debug the incomming response message
if (resMessage != null && msgLog.isTraceEnabled())
@@ -231,6 +202,7 @@
}
catch (RuntimeException rte)
{
+ rte.printStackTrace();
throw rte;
}
catch (Throwable t)
@@ -239,6 +211,13 @@
}
}
+ private String addURLParameter(String url, String key, String value)
+ {
+ int qmIndex = url.indexOf("?");
+ url += (qmIndex < 0 ? "?" : "&") + key + "=" +
value;
+ return url;
+ }
+
/** Closes this SOAPConnection
*/
public void close() throws SOAPException
@@ -249,8 +228,48 @@
closed = true;
}
- private Map getRemotingMetaData(SOAPMessage reqMessage, String targetAddress, Map
callProps) throws SOAPException
+ private Client createRemotingClient(Object endpoint, String targetAddress, boolean
oneway) throws SOAPException
{
+ Client client;
+ try
+ {
+ // Get the invoker from Remoting for a given endpoint address
+ log.debug("Get locator for: " + endpoint);
+ targetAddress = addURLParameter(targetAddress, InvokerLocator.DATATYPE,
"SOAPMessage");
+ InvokerLocator locator = new InvokerLocator(targetAddress);
+
+ /* An HTTPClientInvoker may disconnect from the server and recreated by the
remoting layer.
+ * In that case the new invoker does not inherit the marshaller/unmarshaller
from the disconnected invoker.
+ * We therefore explicitly specify the invoker locator datatype and register the
SOAP marshaller/unmarshaller
+ * with the MarshalFactory.
+ *
+ * This applies to remoting-1.4.5
+ */
+ SOAPMessageMarshaller marshaller = new SOAPMessageMarshaller();
+ SOAPMessageUnMarshaller unmarshaller = new SOAPMessageUnMarshaller();
+ MarshalFactory.addMarshaller("SOAPMessage", marshaller,
unmarshaller);
+
+ client = new Client(locator, "saaj", config);
+ client.connect();
+
+ client.setMarshaller(marshaller);
+
+ if (oneway == false)
+ client.setUnMarshaller(unmarshaller);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new SOAPException("Malformed endpoint address", e);
+ }
+ catch (Exception e)
+ {
+ throw new SOAPException("Could not setup remoting client", e);
+ }
+ return client;
+ }
+
+ private Map createRemotingMetaData(SOAPMessage reqMessage, Map callProps) throws
SOAPException
+ {
// R2744 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
// with a quoted value equal to the value of the soapAction attribute of
// soapbind:operation, if present in the corresponding WSDL description.
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -46,6 +46,9 @@
UsernameToken user = (UsernameToken)token;
String propName = SecurityAssociationAdaptorFactory.class.getName();
SecurityAssociationAdaptorFactory factory =
(SecurityAssociationAdaptorFactory)FactoryLoader.loadFactory(propName, null);
+ if (factory == null)
+ throw new WSSecurityException("Cannot load: " + propName);
+
SecurityAssociationAdaptor securityAdaptor =
factory.getSecurityAssociationAdaptor();
securityAdaptor.setPrincipal(new SimplePrincipal(user.getUsername()));
securityAdaptor.setCredential(user.getPassword());
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -24,6 +24,10 @@
import java.util.Iterator;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.annotation.security.SecurityDomain;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
@@ -64,10 +68,25 @@
{
UnifiedBeanMetaData beanMetaData = (UnifiedBeanMetaData)it.next();
- String ejbName = beanMetaData.getEjbName();
String ejbClassName = beanMetaData.getEjbClass();
Class beanClass = udi.classLoader.loadClass(ejbClassName);
- setupEndpoint(wsMetaData, udi, beanClass, ejbName);
+ if (beanClass.isAnnotationPresent(WebService.class) ||
beanClass.isAnnotationPresent(WebServiceProvider.class))
+ {
+ String ejbLink = beanMetaData.getEjbName();
+ setupEndpoint(wsMetaData, udi, beanClass, ejbLink);
+
+ // setup the security domain
+ if (beanClass.isAnnotationPresent(SecurityDomain.class))
+ {
+ SecurityDomain anSecurityDomain =
(SecurityDomain)beanClass.getAnnotation(SecurityDomain.class);
+ String lastDomain = wsMetaData.getSecurityDomain();
+ String securityDomain = anSecurityDomain.value();
+ if (lastDomain != null && lastDomain.equals(securityDomain) ==
false)
+ throw new IllegalStateException("Multiple security domains not
supported: " + securityDomain);
+
+ wsMetaData.setSecurityDomain(securityDomain);
+ }
+ }
}
log.debug("END buildMetaData: " + wsMetaData);
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -25,6 +25,7 @@
import java.util.Iterator;
import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
import org.jboss.annotation.security.SecurityDomain;
import org.jboss.logging.Logger;
@@ -70,7 +71,7 @@
UnifiedBeanMetaData beanMetaData = it.next();
String ejbClassName = beanMetaData.getEjbClass();
Class<?> beanClass = udi.classLoader.loadClass(ejbClassName);
- if (beanClass.isAnnotationPresent(WebService.class))
+ if (beanClass.isAnnotationPresent(WebService.class) ||
beanClass.isAnnotationPresent(WebServiceProvider.class))
{
String ejbLink = beanMetaData.getEjbName();
setupEndpoint(wsMetaData, udi, beanClass, ejbLink);
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -23,8 +23,6 @@
// $Id$
-import java.io.IOException;
-
import javax.jws.WebService;
import javax.xml.ws.WebServiceProvider;
@@ -38,24 +36,17 @@
*/
public abstract class JAXWSServerMetaDataBuilder extends JAXWSMetaDataBuilder
{
- public abstract UnifiedMetaData buildMetaData(UnifiedDeploymentInfo udi);
-
- protected JAXWSEndpointMetaDataBuilder getEndpointBuilder(Class<?> bean)
+ protected void setupEndpoint(UnifiedMetaData umd, UnifiedDeploymentInfo udi,
Class<?> beanClass, String beanName) throws Exception
{
- if (bean.isAnnotationPresent(WebServiceProvider.class))
- return new JAXWSProviderMetaDataBuilder();
-
- if (bean.isAnnotationPresent(WebService.class))
- return new JAXWSWebServiceMetaDataBuilder();
-
- return null;
- }
-
- protected void setupEndpoint(UnifiedMetaData umd, UnifiedDeploymentInfo udi,
Class<?> beanClass, String beanName)
- throws SecurityException, ClassNotFoundException, NoSuchMethodException,
IOException
- {
- JAXWSEndpointMetaDataBuilder builder = getEndpointBuilder(beanClass);
- if (builder != null)
+ if (beanClass.isAnnotationPresent(WebService.class))
+ {
+ JAXWSEndpointMetaDataBuilder builder = new JAXWSWebServiceMetaDataBuilder();
builder.buildEndpointMetaData(umd, udi, beanClass, beanName);
+ }
+ else if (beanClass.isAnnotationPresent(WebServiceProvider.class))
+ {
+ JAXWSEndpointMetaDataBuilder builder = new JAXWSProviderMetaDataBuilder();
+ builder.buildEndpointMetaData(umd, udi, beanClass, beanName);
+ }
}
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -669,10 +669,8 @@
if (anWebService.portName().length() > 0 ||
anWebService.serviceName().length() > 0 || anWebService.endpointInterface().length()
> 0)
throw new
WSException("@WebService[portName,serviceName,endpointInterface] MUST NOT be defined
on: " + seiName);
- name = anWebService.name();
- if (name.length() == 0)
- name = WSDLUtils.getJustClassName(seiClass);
-
+ // @WebService[name] is allowed, but what should we do with it?
+
interfaceNS = anWebService.targetNamespace();
if (interfaceNS.length() == 0)
interfaceNS = wsdlUtils.getTypeNamespace(seiClass);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -190,7 +190,12 @@
throw new WSException("Cannot load java type: " + javaTypeName);
faultBean = getFaultBean();
+ if (faultBean != null)
+ initializeFaultBean();
+ }
+ private void initializeFaultBean()
+ {
/* JAX-WS 3.7: For exceptions that match the pattern described in section
* 2.5 (i.e. exceptions that have a getFaultInfo method), the FaultBean
* is used as input to JAXB */
Modified: trunk/jbossws-tests/.classpath
===================================================================
--- trunk/jbossws-tests/.classpath 2007-01-03 16:18:52 UTC (rev 1776)
+++ trunk/jbossws-tests/.classpath 2007-01-03 18:15:27 UTC (rev 1777)
@@ -40,5 +40,6 @@
<classpathentry combineaccessrules="false" kind="src"
path="/integration-jboss50"/>
<classpathentry combineaccessrules="false" kind="src"
path="/integration-tomcat"/>
<classpathentry combineaccessrules="false" kind="src"
path="/jbossws-core"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/integration-jboss42"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-03 16:18:52 UTC (rev
1776)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-03 18:15:27 UTC (rev
1777)
@@ -18,6 +18,8 @@
<target name="build-jars" description="Build the jaxrpc
deployments">
+ <mkdir dir="${tests.output.dir}/libs"/>
+
<!-- jaxrpc-anonymous -->
<war warfile="${tests.output.dir}/libs/jaxrpc-anonymous.war"
webxml="${tests.output.dir}/resources/jaxrpc/anonymous/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
@@ -666,7 +668,7 @@
<!-- jaxrpc-jbws1124one -->
<copy todir="${tests.output.dir}/resources"
overwrite="true">
- <fileset dir="${tests.output.dir}/resources">
+ <fileset dir="${tests.resources.dir}">
<include name="jaxrpc/jbws1124/META-INF/jboss-client.xml"/>
<include name="jaxrpc/jbws1124/WEB-INF/test-resource.txt"/>
<include name="jaxrpc/jbws1124/WEB-INF/jboss-web.xml"/>
@@ -690,7 +692,7 @@
</war>
<!-- jaxrpc-jbws1124two -->
<copy todir="${tests.output.dir}/resources"
overwrite="true">
- <fileset dir="${tests.output.dir}/resources">
+ <fileset dir="${tests.resources.dir}">
<include name="jaxrpc/jbws1124/META-INF/jboss-client.xml"/>
<include name="jaxrpc/jbws1124/WEB-INF/test-resource.txt"/>
<include name="jaxrpc/jbws1124/WEB-INF/jboss-web.xml"/>
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-03 16:18:52 UTC (rev
1776)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-03 18:15:27 UTC (rev
1777)
@@ -18,6 +18,8 @@
<target name="build-jars" description="Build the
deployments.">
+ <mkdir dir="${tests.output.dir}/libs"/>
+
<!-- jaxws-asynchronous -->
<war warfile="${tests.output.dir}/libs/jaxws-asynchronous.war"
webxml="${tests.output.dir}/resources/jaxws/asynchronous/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
@@ -68,6 +70,15 @@
<include name="jboss-app.xml"/>
</metainf>
</jar>
+ <jar jarfile="${tests.output.dir}/libs/jaxws-eardeployment42.ear">
+ <fileset dir="${tests.output.dir}/libs">
+ <include name="jaxws-eardeployment.jar"/>
+ <include name="jaxws-eardeployment.war"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/resources/jaxws/eardeployment/META-INF">
+ <include name="application.xml"/>
+ </metainf>
+ </jar>
<!-- jaxws-endpoint-servlet -->
<war warfile="${tests.output.dir}/libs/jaxws-endpoint-servlet.war"
webxml="${tests.output.dir}/resources/jaxws/endpoint/WEB-INF/web.xml">
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-03 16:18:52 UTC (rev 1776)
+++ trunk/jbossws-tests/build.xml 2007-01-03 18:15:27 UTC (rev 1777)
@@ -110,7 +110,7 @@
<target name="init" depends="prepare,thirdparty">
<!-- Define excluded tests -->
- <condition property="tests.excludesfile"
value="${tests.resources.dir}/tests-excludes.txt">
+ <condition property="tests.excludesfile"
value="${tests.resources.dir}/tests-no-excludes.txt">
<equals arg1="${jbossws.target.server}" arg2="jboss"/>
</condition>
<condition property="tests.excludesfile"
value="${tests.resources.dir}/tests-tomcat-excludes.txt">
@@ -159,8 +159,9 @@
-->
<path id="test.client.classpath">
<path refid="jbossws.client.classpath"/>
- <pathelement
location="${core.output.lib.dir}/jbossws-${jboss.integration.target}-integration.jar"/>
- <pathelement
location="${core.output.lib.dir}/jbossws-tomcat-integration.jar"/>
+ <pathelement
location="${integration.jboss50.dir}/output/lib/jbossws-${jboss.integration.target}-integration.jar"/>
+ <pathelement
location="${integration.jboss42.dir}/output/lib/jbossws-${jboss.integration.target}-integration.jar"/>
+ <pathelement
location="${integration.tomcat.dir}/output/lib/jbossws-tomcat-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"/>
@@ -180,7 +181,7 @@
<!-- Compiling -->
<!-- ================================================================== -->
- <target name="compile"
depends="core-jars,jboss42-jars,jboss50-jars,tomcat-jars,compile14,compile15"
description="Compile sources"/>
+ <target name="compile" depends="compile14,compile15"
description="Compile sources"/>
<target name="compile14" depends="init"
unless="HAVE_JDK_1.5">
<mkdir dir="${tests.output.dir}/classes"/>
@@ -242,8 +243,6 @@
<!-- ================================================================== -->
<target name="main"
depends="compile,copy-resources,generate-sources,compile-generated,copy-generated"
description="Build the deployments.">
- <mkdir dir="${tests.output.dir}/reports"/>
- <mkdir dir="${tests.output.dir}/libs"/>
<ant antfile="${basedir}/ant-import/build-jars-jaxrpc.xml"
target="build-jars" inheritall="true"/>
<ant antfile="${basedir}/ant-import/build-jars-jaxws.xml"
target="build-jars" inheritall="true"/>
</target>
@@ -317,7 +316,7 @@
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/**/*TestCase.class"/>
<param name="exclude.wildcard"
value="org/jboss/test/ws/*/benchmark/**"/>
- <param name="excludesfile"
value="${tests.resources.dir}/tests-excludes.txt"/>
+ <param name="excludesfile"
value="${tests.resources.dir}/tests-no-excludes.txt"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -326,7 +325,7 @@
<target name="tests-benchmark" 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.resources.dir}/tests-excludes.txt"/>
+ <param name="excludesfile"
value="${tests.resources.dir}/tests-no-excludes.txt"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -344,7 +343,7 @@
<target name="tests-tools" 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.resources.dir}/tests-excludes.txt"/>
+ <param name="excludesfile"
value="${tests.resources.dir}/tests-no-excludes.txt"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -356,12 +355,14 @@
<target name="test" 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="excludesfile"
value="${tests.resources.dir}/tests-excludes.txt"/>
+ <param name="exclude.wildcard"
value="org/jboss/test/ws/*/benchmark/**"/>
+ <param name="excludesfile"
value="${tests.resources.dir}/tests-no-excludes.txt"/>
</antcall>
</target>
<!-- Common test target -->
<target name="tests-main" depends="init">
+ <mkdir dir="${tests.output.dir}/reports"/>
<junit printsummary="yes" showoutput="yes"
dir="${tests.output.dir}">
<jvmarg value="-Djava.security.manager"/>
<sysproperty key="java.security.policy"
value="${tests.etc.dir}/tst.policy"/>
@@ -399,6 +400,7 @@
ant -Dtest=org.jboss.test.ws.jaxrpc.samples.jsr109pojo.RpcJSETestCase one-test
-->
<target name="one-test" depends="init" if="test"
description="Run a single unit test">
+ <mkdir dir="${tests.output.dir}/reports"/>
<junit printsummary="yes" showoutput="yes"
dir="${tests.output.dir}">
<jvmarg line="${remote.debug.line}"/>
<jvmarg value="-Djava.security.manager"/>
Modified: trunk/jbossws-tests/src/main/etc/log4j.xml
===================================================================
--- trunk/jbossws-tests/src/main/etc/log4j.xml 2007-01-03 16:18:52 UTC (rev 1776)
+++ trunk/jbossws-tests/src/main/etc/log4j.xml 2007-01-03 18:15:27 UTC (rev 1777)
@@ -53,7 +53,7 @@
<!-- ================ -->
<category name="org.jboss.ws">
- <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ <priority value="DEBUG"/>
</category>
<category name="org.jboss.remoting">
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java 2007-01-03
16:18:52 UTC (rev 1776)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossTestDeployer.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -25,8 +25,6 @@
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
/**
* A JBossWS test helper that deals with test deployment/undeployment, etc.
@@ -37,23 +35,21 @@
public class JBossTestDeployer implements JBossWSTestDeployer
{
private static final String MAIN_DEPLOYER =
"jboss.system:service=MainDeployer";
+
+ private MBeanServerConnection server;
+ public JBossTestDeployer(MBeanServerConnection server)
+ {
+ this.server = server;
+ }
+
public void deploy(URL url) throws Exception
{
- MBeanServerConnection server = getServer();
server.invoke(new ObjectName(MAIN_DEPLOYER), "deploy", new Object[] { url
}, new String[] { "java.net.URL" });
}
public void undeploy(URL url) throws Exception
{
- MBeanServerConnection server = getServer();
server.invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] {
url }, new String[] { "java.net.URL" });
}
-
- private MBeanServerConnection getServer() throws NamingException
- {
- InitialContext iniCtx = new InitialContext();
- MBeanServerConnection server =
(MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
- return server;
- }
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java 2007-01-03
16:18:52 UTC (rev 1776)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -70,6 +70,26 @@
return delegate.isTargetServerTomcat();
}
+ public String getJBossVersion()
+ {
+ return delegate.getJBossVersion();
+ }
+
+ public boolean isJBoss50()
+ {
+ return delegate.isJBoss50();
+ }
+
+ public boolean isJBoss42()
+ {
+ return delegate.isJBoss42();
+ }
+
+ public boolean isJBoss40()
+ {
+ return delegate.isJBoss40();
+ }
+
/** Deploy the given archive
*/
public void deploy(String archive) throws Exception
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-03
16:18:52 UTC (rev 1776)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -26,9 +26,12 @@
import java.net.URL;
import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import org.jboss.ws.core.utils.ObjectNameFactory;
+
/**
* A JBossWS test helper that deals with test deployment/undeployment, etc.
*
@@ -37,6 +40,8 @@
*/
public class JBossWSTestHelper
{
+ private static MBeanServerConnection server;
+
/** Deploy the given archive
*/
public void deploy(String archive) throws Exception
@@ -54,23 +59,70 @@
}
/** True, if -Djbossws.target.server=jboss */
- public boolean isTargetServerJBoss()
+ public static boolean isTargetServerJBoss()
{
String targetServer = getTargetServer();
return "jboss".equals(targetServer);
}
/** True, if -Djbossws.target.server=tomcat */
- public boolean isTargetServerTomcat()
+ public static boolean isTargetServerTomcat()
{
String targetServer = getTargetServer();
return "tomcat".equals(targetServer);
}
- public MBeanServerConnection getServer() throws NamingException
+ public static String getJBossVersion()
{
- InitialContext iniCtx = new InitialContext();
- MBeanServerConnection server =
(MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ String jbossVersion = null;
+ if (isTargetServerJBoss())
+ {
+ try
+ {
+ ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ jbossVersion = (String)getServer().getAttribute(oname,
"SpecificationVersion");
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ ex.printStackTrace();
+ }
+ }
+ return jbossVersion;
+ }
+
+ public static boolean isJBoss50()
+ {
+ String jbossVersion = getJBossVersion();
+ return jbossVersion != null && jbossVersion.startsWith("5.0");
+ }
+
+ public static boolean isJBoss42()
+ {
+ String jbossVersion = getJBossVersion();
+ return jbossVersion != null && jbossVersion.startsWith("4.2");
+ }
+
+ public static boolean isJBoss40()
+ {
+ String jbossVersion = getJBossVersion();
+ return jbossVersion != null && jbossVersion.startsWith("4.0");
+ }
+
+ public static MBeanServerConnection getServer()
+ {
+ if (server == null)
+ {
+ try
+ {
+ InitialContext iniCtx = new InitialContext();
+ server =
(MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ }
+ catch (NamingException ex)
+ {
+ throw new RuntimeException("Cannot obtain MBeanServerConnection",
ex);
+ }
+ }
return server;
}
@@ -78,7 +130,7 @@
{
if (isTargetServerJBoss())
{
- return new JBossTestDeployer();
+ return new JBossTestDeployer(getServer());
}
else if (isTargetServerTomcat())
{
@@ -92,7 +144,7 @@
}
}
- private String getTargetServer()
+ private static String getTargetServer()
{
return System.getProperty("jbossws.target.server");
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/encoded/parametermode/ParameterModeTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/encoded/parametermode/ParameterModeTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/encoded/parametermode/ParameterModeTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -159,9 +159,9 @@
public void testEchoInOut() throws Exception
{
- StringHolder varString = new StringHolder("Frerrari");
+ StringHolder varString = new StringHolder("Ferrari");
port.echoInOut(varString);
- assertEquals("Frerrari", varString.value);
+ assertEquals("Ferrari", varString.value);
}
public void testEchoMix() throws Exception
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -44,23 +44,24 @@
return JBossWSTestSetup.newTestSetup(EnvEntryEJBTestCase.class,
"jaxrpc-enventry.jar, jaxrpc-enventry-client.jar");
}
- /*
protected void setUp() throws Exception
{
super.setUp();
- if (port == null)
+ if (port == null && isJBoss50() == false)
{
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestService");
port = (EnvEntryTestService)service.getPort(EnvEntryTestService.class);
}
}
- */
public void testHandlers() throws Exception
{
- System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
+ return;
+ }
String res = port.helloEnvEntry("InitalMessage");
assertEquals("InitalMessage:ClientSideHandler:appclient:8:ServerSideHandler:ejb:8:endpoint:ejb:8:ServerSideHandler:ejb:8:ClientSideHandler:appclient:8",
res);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -57,8 +57,11 @@
public void testHandlers() throws Exception
{
- System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
+ return;
+ }
String res = port.helloEnvEntry("InitalMessage");
assertEquals("InitalMessage:ClientSideHandler:appclient:8:ServerSideHandler:web:8:endpoint:web:8:ServerSideHandler:web:8:ClientSideHandler:appclient:8",
res);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -42,7 +42,6 @@
private static TestEndpoint port;
- /*
public static Test suite() throws Exception
{
return JBossWSTestSetup.newTestSetup(JBWS1011TestCase.class,
"jaxrpc-jbws1011.jar, jaxrpc-jbws1011-client.jar");
@@ -51,19 +50,21 @@
public void setUp() throws Exception
{
super.setUp();
- if (port == null)
+ if (port == null && isJBoss50() == false)
{
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestService");
port = (TestEndpoint)service.getPort(TestEndpoint.class);
}
}
- */
public void testCall() throws Exception
{
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
String response = port.echoString("Hello");
assertEquals("Hello", response);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1205/JBWS1205TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1205/JBWS1205TestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1205/JBWS1205TestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -57,8 +57,11 @@
public void testEndpoint() throws Exception
{
- System.out.println("[JBAS-3824] Fix ENC for EJB2.1 and Servlets");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
+ return;
+ }
port.performTest();
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -21,7 +21,13 @@
*/
package org.jboss.test.ws.jaxrpc.samples.jsr109ejb;
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
/**
* Test EJB endpoint for a document style service.
@@ -33,7 +39,6 @@
{
private static JaxRpcTestService endpoint;
- /*
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(DocEJBTestCase.class,
"jaxrpc-samples-jsr109ejb-doc.jar, jaxrpc-samples-jsr109ejb-doc-client.jar");
@@ -43,19 +48,21 @@
{
super.setUp();
- if (endpoint == null)
+ if (endpoint == null && isJBoss50() == false)
{
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestServiceEJB");
endpoint = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
}
}
- */
public void testEchoString() throws Exception
{
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
String hello = "Hello";
String world = "world!";
@@ -65,8 +72,11 @@
public void testEchoSimpleUserType() throws Exception
{
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -49,7 +49,6 @@
private static Call call;
- /*
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(RpcDIIConfiguredCallTestCase.class,
"jaxrpc-samples-jsr109ejb-rpc.jar");
@@ -59,7 +58,7 @@
{
super.setUp();
- if (call == null)
+ if (call == null && isJBoss50() == false)
{
File javaWsdlMappingFile = new
File("resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jaxrpc-mapping.xml");
assertTrue(javaWsdlMappingFile.exists());
@@ -71,12 +70,14 @@
call = service.createCall();
}
}
- */
public void testEchoString() throws Exception
{
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
QName operationName = new QName(TARGET_NAMESPACE, "echoString");
call.setOperationName(operationName);
@@ -96,8 +97,11 @@
public void testEchoSimpleUserType() throws Exception
{
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
QName operationName = new QName(TARGET_NAMESPACE, "echoSimpleUserType");
call.setOperationName(operationName);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -47,12 +47,10 @@
private final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxrpc-samples-jsr109ejb-rpc";
private static final String TARGET_NAMESPACE =
"http://org.jboss.ws/samples/jsr109ejb";
- /*
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(RpcDIIUnconfiguredCallTestCase.class,
"jaxrpc-samples-jsr109ejb-rpc.jar");
}
- */
public void testEchoString() throws Exception
{
@@ -67,8 +65,11 @@
call.setTargetEndpointAddress(TARGET_ENDPOINT_ADDRESS);
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
String hello = "Hello";
String world = "world!";
@@ -95,8 +96,11 @@
call.setTargetEndpointAddress(TARGET_ENDPOINT_ADDRESS);
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -39,7 +39,6 @@
{
private static JaxRpcTestService endpoint;
- /*
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(RpcEJBTestCase.class,
"jaxrpc-samples-jsr109ejb-rpc.jar, jaxrpc-samples-jsr109ejb-rpc-client.jar");
@@ -56,15 +55,17 @@
endpoint = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
}
}
- */
public void testEchoString() throws Exception
{
String hello = "Hello";
String world = "world!";
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
Object retObj = endpoint.echoString(hello, world);
assertEquals(hello + world, retObj);
@@ -75,8 +76,11 @@
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
Object retObj = endpoint.echoSimpleUserType(hello, userType);
assertEquals(userType, retObj);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -44,9 +44,8 @@
private final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxrpc-samples-jsr109ejb-rpc";
private static final String TARGET_NAMESPACE =
"http://org.jboss.ws/samples/jsr109ejb";
- private static JaxRpcTestService endpoint;
+ private static JaxRpcTestService port;
- /*
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(RpcProxyTestCase.class,
"jaxrpc-samples-jsr109ejb-rpc.jar");
@@ -56,7 +55,7 @@
{
super.setUp();
- if (endpoint == null)
+ if (port == null && isJBoss50() == false)
{
File javaWsdlMappingFile = new
File("resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF/jaxrpc-mapping.xml");
assertTrue(javaWsdlMappingFile.exists());
@@ -65,20 +64,22 @@
ServiceFactoryImpl factory = new ServiceFactoryImpl();
URL wsdlLocation = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile.toURL());
- endpoint = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
+ port = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
}
}
- */
public void testEchoString() throws Exception
{
String hello = "Hello";
String world = "world!";
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- Object retObj = endpoint.echoString(hello, world);
+ Object retObj = port.echoString(hello, world);
assertEquals(hello + world, retObj);
}
@@ -87,10 +88,13 @@
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- Object retObj = endpoint.echoSimpleUserType(hello, userType);
+ Object retObj = port.echoSimpleUserType(hello, userType);
assertEquals(userType, retObj);
}
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -47,7 +47,6 @@
public static final String USERNAME = "kermit";
public static final String PASSWORD = "thefrog";
- /*
public static Test suite() throws Exception
{
return JBossWSTestSetup.newTestSetup(SecureEJBTestCase.class,
"jaxrpc-samples-secureejb.jar, jaxrpc-samples-secureejb-client.jar");
@@ -59,16 +58,17 @@
SecurityAssociation.setPrincipal(null);
SecurityAssociation.setCredential(null);
}
- */
/** Test required principal/credential for this bean
*/
public void testRoleSecuredSLSB() throws Exception
{
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
InitialContext iniCtx = getInitialContext();
OrganizationHome home =
(OrganizationHome)iniCtx.lookup("ejb/RoleSecuredSLSB");
@@ -94,10 +94,12 @@
*/
public void testBasicSecuredSLSB() throws Exception
{
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
InitialContext iniCtx = getInitialContext();
OrganizationHome home =
(OrganizationHome)iniCtx.lookup("ejb/BasicSecuredSLSB");
@@ -108,10 +110,12 @@
public void testBasicSecuredServiceAccess() throws Exception
{
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/BasicSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb",
"BasicSecuredPort");
@@ -137,10 +141,12 @@
public void testRoleSecuredServiceAccess() throws Exception
{
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/RoleSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb",
"RoleSecuredPort");
@@ -166,10 +172,12 @@
public void testConfidentialServiceAccess() throws Exception
{
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
InitialContext iniCtx = getInitialContext();
Service service =
(Service)iniCtx.lookup("java:comp/env/service/ConfidentialSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb",
"ConfidentialPort");
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -47,7 +47,6 @@
{
public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxrpc-webserviceref";
- /*
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(WebServiceRefEJBTestCase.class,
"jaxrpc-webserviceref.war, jaxrpc-webserviceref-ejb-client.jar");
@@ -60,14 +59,15 @@
WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
assertNotNull(wsdlDefinitions);
}
- */
public void testDynamicProxy() throws Exception
{
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
URL wsdlURL = new
File("resources/jaxrpc/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
URL mappingURL = new
File("resources/jaxrpc/webserviceref/META-INF/jaxrpc-mapping.xml").toURL();
QName qname = new QName("http://org.jboss.ws/wsref",
"TestEndpointService");
@@ -81,10 +81,12 @@
public void testEJBClient() throws Exception
{
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
InitialContext iniCtx = getInitialContext();
EJBRemoteHome ejbHome = (EJBRemoteHome)iniCtx.lookup("/ejb/EJBClient");
EJBRemote ejbRemote = ejbHome.create();
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -76,8 +76,11 @@
public void testServletClient() throws Exception
{
- System.out.println("[JBAS-3824] Fix ENC for EJB2.1 and Servlets");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
+ return;
+ }
URL url = new URL(TARGET_ENDPOINT_ADDRESS +
"-servlet-client?echo=HelloWorld");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -48,8 +48,11 @@
*/
public void testWebClient() throws Exception
{
- System.out.println("[JBAS-3824] Fix ENC for EJB2.1 and Servlets");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
+ return;
+ }
URL url = new URL("http://" + getServerHost() +
":8080/jaxrpc-wsse-rpc/RpcTestClientServlet?input=Hello");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -29,6 +29,7 @@
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestHelper;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
@@ -46,45 +47,49 @@
{
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(EarTestCase.class,
"jaxws-eardeployment.ear");
+ String earName = (JBossWSTestHelper.isJBoss50() ?
"jaxws-eardeployment.ear" : "jaxws-eardeployment42.ear");
+ return JBossWSTestSetup.newTestSetup(EarTestCase.class, earName);
}
-
+
public void testResourceURL() throws Exception
{
File earFile = new File("libs/jaxws-eardeployment.ear");
assertTrue(earFile.exists());
-
+
URL warURL = new URL("jar:" + earFile.toURL() +
"!/jaxws-eardeployment.war!/");
URL wsdlURL = new URL(warURL, "WEB-INF/wsdl/TestEndpoint.wsdl");
-
+
Element root = DOMUtils.parse(new ResourceURL(wsdlURL).openStream());
assertNotNull(root);
}
public void testVirtualFile() throws Exception
{
+ if (isJBoss50() == false)
+ return;
+
File earFile = new File("libs/jaxws-eardeployment.ear");
assertTrue(earFile.exists());
-
+
URL earURL = earFile.toURL();
VFS fsEar = VFS.getVFS(earURL);
VirtualFile vfWar = fsEar.findChild("jaxws-eardeployment.war");
assertNotNull(earURL + "!/jaxws-eardeployment.war", vfWar);
-
+
VirtualFile vfWsdl = vfWar.findChild("WEB-INF/wsdl/TestEndpoint.wsdl");
assertNotNull(earURL +
"!/jaxws-eardeployment.war!/WEB-INF/wsdl/TestEndpoint.wsdl", vfWsdl);
-
+
Element root = DOMUtils.parse(vfWsdl.openStream());
assertNotNull(root);
}
public void testEJB3Endpoint() throws Exception
{
- URL wsdlURL = new URL ("http://" + getServerHost() +
":8080/earejb3/EJB3Bean?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/earejb3/EJB3Bean?wsdl");
QName serviceName = new
QName("http://eardeployment.jaxws.ws.test.jboss.org/",
"TestEndpointService");
TestEndpointService service = new TestEndpointService(wsdlURL, serviceName);
TestEndpoint port = service.getTestEndpointPort();
-
+
String helloWorld = "Hello world!";
String retObj = port.echo(helloWorld);
assertEquals(helloWorld, retObj);
@@ -92,11 +97,11 @@
public void testJSEEndpoint() throws Exception
{
- URL wsdlURL = new URL ("http://" + getServerHost() +
":8080/earjse/JSEBean?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/earjse/JSEBean?wsdl");
QName serviceName = new
QName("http://eardeployment.jaxws.ws.test.jboss.org/",
"TestEndpointService");
TestEndpointService service = new TestEndpointService(wsdlURL, serviceName);
TestEndpoint port = service.getTestEndpointPort();
-
+
String helloWorld = "Hello world!";
String retObj = port.echo(helloWorld);
assertEquals(helloWorld, retObj);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean03.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean03.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean03.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -33,7 +33,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.webservice.EndpointInterface03")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.webservice.EndpointInterface03", targetNamespace
= "http://www.openuri.org/2004/04/HelloWorld", serviceName =
"TestService")
public class EJB21Bean03 implements SessionBean
{
private SessionContext sessionContext;
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EJB3Bean03.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EJB3Bean03.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EJB3Bean03.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -33,7 +33,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.webservice.EndpointInterface03")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.webservice.EndpointInterface03", targetNamespace
= "http://www.openuri.org/2004/04/HelloWorld", serviceName =
"TestService")
@Remote(EJB3RemoteInterface.class)
@RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
@Stateless
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -35,7 +35,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
-@WebService(name = "EndpointInterface", targetNamespace =
"http://foo")
+@WebService(targetNamespace = "http://foo")
@PortComponent(contextRoot="/jsr181", urlPattern="/*")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface EndpointInterface03 extends Remote
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -54,7 +54,7 @@
private EndpointInterface03 getPort03() throws MalformedURLException
{
- QName serviceName = new
QName("http://www.openuri.org/2004/04/HelloWorld", "TestService");
+ QName serviceName = new QName("http://foo", "TestService");
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jsr181?wsdl");
Service service = Service.create(wsdlURL, serviceName);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -44,9 +44,11 @@
deploy("jaxws-jsr181-webservice01-ejb21.jar");
try
{
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
webServiceTest();
}
finally
@@ -60,9 +62,11 @@
deploy("jaxws-jsr181-webservice02-ejb21.jar");
try
{
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
webServiceWsdlLocationTest();
}
finally
@@ -76,9 +80,11 @@
deploy("jaxws-jsr181-webservice03-ejb21.jar");
try
{
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- if (true) return;
-
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
+ return;
+ }
webServiceEndpointInterfaceTest();
}
finally
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -75,17 +75,13 @@
public void testWebService() throws Exception
{
- assertWSDLAccess();
-
+ if (isJBoss50() == false)
+ {
+ System.out.println("FIXME: [JBWS-1438] Implement @WebServiceRef injection
for JBossAS-4.2");
+ return;
+ }
+
OrderStatus result = orderMgmtWS.prepareOrder(ORDER);
assertEquals("Prepared", result.getStatus());
}
-
- private void assertWSDLAccess() throws MalformedURLException
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
- assertNotNull(wsdlDefinitions);
- }
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -48,7 +48,7 @@
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(WebServiceRefEJB3TestCase.class,
"jaxws-webserviceref.war, jaxws-webserviceref-ejb3-client.jar");
+ return JBossWSTestSetup.newTestSetup(WebServiceRefEJB3TestCase.class,
"jaxws-webserviceref.war");
}
public void testWSDLAccess() throws MalformedURLException
@@ -73,12 +73,25 @@
public void testEJB3Client() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- EJB3Remote ejb3Remote = (EJB3Remote)iniCtx.lookup("/ejb3/EJB3Client");
+ if (isJBoss50() == false)
+ {
+ System.out.println("FIXME: [JBWS-1438] Implement @WebServiceRef injection
for JBossAS-4.2");
+ return;
+ }
+
+ deploy("jaxws-webserviceref-ejb3-client.jar");
+ try
+ {
+ InitialContext iniCtx = getInitialContext();
+ EJB3Remote ejb3Remote =
(EJB3Remote)iniCtx.lookup("/ejb3/EJB3Client");
- String helloWorld = "Hello World!";
- Object retObj = ejb3Remote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
-
+ String helloWorld = "Hello World!";
+ Object retObj = ejb3Remote.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ finally
+ {
+ undeploy("jaxws-webserviceref-ejb3-client.jar");
+ }
}
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2007-01-03
18:15:27 UTC (rev 1777)
@@ -27,6 +27,7 @@
import java.net.MalformedURLException;
import java.net.URL;
+import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -49,7 +50,7 @@
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(WebServiceRefServletTestCase.class,
"jaxws-webserviceref.war, jaxws-webserviceref-servlet-client.war");
+ return JBossWSTestSetup.newTestSetup(WebServiceRefServletTestCase.class,
"jaxws-webserviceref.war");
}
public void testWSDLAccess() throws MalformedURLException
@@ -74,12 +75,29 @@
public void testServletClient() throws Exception
{
- System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
- if (true) return;
+ if (isJBoss50())
+ {
+ System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and
Servlets");
+ return;
+ }
- URL url = new URL(TARGET_ENDPOINT_ADDRESS +
"-servlet-client?echo=HelloWorld");
- BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
- String retStr = br.readLine();
- assertEquals("HelloWorld", retStr);
+ if (isJBoss50() == false)
+ {
+ System.out.println("FIXME: [JBWS-1438] Implement @WebServiceRef injection
for JBossAS-4.2");
+ return;
+ }
+
+ deploy("jaxws-webserviceref-servlet-client.jar");
+ try
+ {
+ URL url = new URL(TARGET_ENDPOINT_ADDRESS +
"-servlet-client?echo=HelloWorld");
+ BufferedReader br = new BufferedReader(new
InputStreamReader(url.openStream()));
+ String retStr = br.readLine();
+ assertEquals("HelloWorld", retStr);
+ }
+ finally
+ {
+ undeploy("jaxws-webserviceref-servlet-client.jar");
+ }
}
}
Copied:
trunk/jbossws-tests/src/main/resources/jaxws/eardeployment/META-INF/application.xml (from
rev 1776,
branches/tdiesler/trunk/jbossws-tests/src/main/resources/jaxws/eardeployment/META-INF/application.xml)
Modified: trunk/jbossws-tests/src/main/resources/jaxws/jbws860/WEB-INF/jboss-web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/jbws860/WEB-INF/jboss-web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++ trunk/jbossws-tests/src/main/resources/jaxws/jbws860/WEB-INF/jboss-web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
-
<jboss-web>
<context-root>/test</context-root>
</jboss-web>
\ No newline at end of file
Modified:
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF01/jboss-web.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF01/jboss-web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF01/jboss-web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
-
<jboss-web>
<context-root>/jsr181</context-root>
</jboss-web>
Modified:
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF02/jboss-web.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF02/jboss-web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF02/jboss-web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
-
<jboss-web>
<context-root>/jsr181</context-root>
</jboss-web>
Modified:
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF03/jboss-web.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF03/jboss-web.xml 2007-01-03
16:18:52 UTC (rev 1776)
+++
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/webservice/WEB-INF03/jboss-web.xml 2007-01-03
18:15:27 UTC (rev 1777)
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
-
<jboss-web>
<context-root>/jsr181</context-root>
</jboss-web>
Deleted: trunk/jbossws-tests/src/main/resources/tests-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/main/resources/tests-excludes.txt 2007-01-03 16:18:52 UTC (rev
1776)
+++ trunk/jbossws-tests/src/main/resources/tests-excludes.txt 2007-01-03 18:15:27 UTC (rev
1777)
@@ -1 +0,0 @@
-org/jboss/test/ws/*/benchmark/**
\ No newline at end of file
Copied: trunk/jbossws-tests/src/main/resources/tests-no-excludes.txt (from rev 1776,
branches/tdiesler/trunk/jbossws-tests/src/main/resources/tests-no-excludes.txt)