Author: thomas.diesler(a)jboss.com
Date: 2007-07-16 16:45:09 -0400 (Mon, 16 Jul 2007)
New Revision: 3900
Added:
branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
Removed:
branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri50/
branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/
branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/
branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native-config.xml
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
branches/tdiesler/trunk/integration/sunri/ant-import/build-testsuite.xml
branches/tdiesler/trunk/integration/sunri/ant-import/macros-deploy-sunri.xml
branches/tdiesler/trunk/integration/sunri/build.xml
branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml
branches/tdiesler/trunk/integration/xfire/ant-import/macros-deploy-xfire.xml
Log:
partial
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-16
20:45:09 UTC (rev 3900)
@@ -24,12 +24,16 @@
//$Id: ModifyWebMetaDataDeployer.java 3150 2007-05-20 00:29:48Z thomas.diesler(a)jboss.com
$
import java.util.Iterator;
+import java.util.Map;
+import org.jboss.metadata.Listener;
import org.jboss.metadata.NameValuePair;
import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.ParamValue;
import org.jboss.metadata.web.Servlet;
+import org.jboss.metadata.web.ParamValue.ParamType;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
/**
@@ -43,11 +47,27 @@
@Override
public void create(Deployment dep)
{
- String propKey = "SERVICE_ENDPOINT_SERVLET";
+ String propKey = "ServletClass";
String servletClass = (String)dep.getContext().getProperty(propKey);
if (servletClass == null)
throw new IllegalStateException("Cannot obtain context property: " +
propKey);
+
+ modifyServletClass(dep, servletClass);
+
+ propKey = "ServletContextListener";
+ String listenerClass = (String)dep.getContext().getProperty(propKey);
+ if (listenerClass != null)
+ modifyListener(dep, listenerClass);
+ propKey = "ContextParameterMap";
+ Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
+ if (contextParams != null)
+ modifyContextParams(dep, contextParams);
+ }
+
+ private void modifyServletClass(Deployment dep, String servletClass)
+ {
+
WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
if (webMetaData != null)
{
@@ -73,6 +93,33 @@
}
}
+ private void modifyListener(Deployment dep, String listenerClass)
+ {
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ Listener listener = new Listener();
+ listener.setListenerClass(listenerClass);
+ webMetaData.addListener(listener);
+ }
+ }
+
+ private void modifyContextParams(Deployment dep, Map<String, String>
contextParams)
+ {
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ for (Map.Entry<String, String> entry : contextParams.entrySet())
+ {
+ ParamValue ctxParam = new ParamValue();
+ ctxParam.setType(ParamType.CONTEXT_PARAM);
+ ctxParam.setName(entry.getKey());
+ ctxParam.setValue(entry.getValue());
+ webMetaData.addContextParam(ctxParam);
+ }
+ }
+ }
+
private boolean isJavaxServlet(String orgServletClass, ClassLoader loader)
{
boolean isServlet = false;
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-16
20:45:09 UTC (rev 3900)
@@ -6,12 +6,11 @@
*********************************************************************************************************************
Web Service deployment
- There are three deployers registered with the JBoss Main Deployer.
+ There are two deployers registered with the JBoss Main Deployer.
The order of which is important
1) EJBDeployer < WebServiceDeployerEJB
2) WebServiceDeployerJSE < WarDeployer
- 3) WebServiceMainDeployer
Each WebServiceDeployer has a number of DeployerHooks registered with it
@@ -23,9 +22,6 @@
- WSDeployerHook_JAXRPC_JSE
- WSDeployerHook_JAXWS_JSE
- - WebServiceMainDeployer
- - WSMainDeployerHook
-
Conceptually, each of these hooks implements the following pattern:
DeployerHook.deploy(unit)
@@ -69,17 +65,6 @@
<depends>WebAppParsingDeployer</depends>
</bean>
- <!--
- A web service deployer that hooks in after the web service WAR/EJB deployers
- -->
- <bean name="WebServiceMainDeployer"
class="org.jboss.wsf.container.jboss50.WebServiceMainDeployer">
- <property name="relOrderJSE"><inject
bean="WebServiceDeployerJSE"
property="relativeOrder"/></property>
- <property name="relOrderEJB"><inject
bean="WebServiceDeployerEJB"
property="relativeOrder"/></property>
- <depends>WarDeployer</depends>
- <depends>WebServiceDeployerEJB</depends>
- <depends>WebServiceDeployerJSE</depends>
- </bean>
-
<!--
Register DeployerHooks with JBoss deployers
-->
@@ -139,20 +124,6 @@
</uninstall>
<depends>WebServiceDeployerEJB</depends>
</bean>
- <bean name="WSMainDeployerHook"
class="org.jboss.wsf.container.jboss50.MainDeployerHook">
- <property name="deploymentAspectManager"><inject
bean="WSMainDeploymentAspectManager"/></property>
- <install bean="WebServiceMainDeployer"
method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceMainDeployer"
method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceMainDeployer</depends>
- </bean>
<!--
Each DeploymentAspectManger maintains a list of DeploymentAspects
@@ -163,9 +134,6 @@
<bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
- <bean name="WSMainDeploymentAspectManager"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
- <property name="name">WSMainDeploymentAspectManager</property>
- </bean>
<!--
The container deployment aspects
@@ -190,7 +158,7 @@
</map>
</property>
</bean>
-
+
<bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
<property name="requires">LAST_DEPLOYMENT_ASPECT</property>
</bean>
@@ -205,12 +173,12 @@
</bean>
<bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
- <property
name="requires">EndpointName,StackEndpointHandler,InitializedMetaDataModel</property>
+ <property
name="requires">EndpointName,StackEndpointHandler</property>
<property name="provides">RegisteredEndpoint</property>
</bean>
<bean name="WSModifyWebMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeploymentAspect">
- <property name="requires">ContextProperties</property>
+ <property name="requires">ContextProperties,
StackGeneratedDescriptor</property>
</bean>
<bean name="WSUnifiedDeploymentInfoDeploymentAspect"
class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeploymentAspect">
@@ -249,15 +217,22 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
+ <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
</set>
</property>
</bean>
- <bean name="WSMainDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject
bean="WSMainDeploymentAspectManager"/></property>
+ <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSClassLoaderInjectionDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
<inject bean="WSEndpointLifecycleDeploymentAspect"/>
Modified:
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native-config.xml
===================================================================
---
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-16
20:45:09 UTC (rev 3900)
@@ -51,16 +51,12 @@
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
-
<entry><key>SERVICE_ENDPOINT_SERVLET</key><value>org.jboss.wsf.stack.jbws.ServiceEndpointServlet</value></entry>
+
<entry><key>ServletClass</key><value>org.jboss.wsf.stack.jbws.ServiceEndpointServlet</value></entry>
+
<entry><key>ServletContextListener</key><value>org.jboss.wsf.stack.jbws.ServiceEndpointContextListener</value></entry>
</map>
</property>
</bean>
- <bean name="WSNativeEagerInitializeDeploymentAspect"
class="org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect">
- <property
name="requires">ContainerClassLoader,UnifiedMetaDataModel</property>
- <property name="provides">InitializedMetaDataModel</property>
- </bean>
-
<bean name="WSNativeEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
<property name="requires">ContainerEndpointHandler</property>
<property name="provides">StackEndpointHandler</property>
@@ -88,24 +84,28 @@
<bean name="WSNativeUnifiedMetaDataDeploymentAspect"
class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
<property name="requires">ContainerMetaData,
URLPattern</property>
- <property name="provides">UnifiedMetaDataModel,
AllowClassLoaderInjection</property>
+ <property name="provides">UnifiedMetaDataModel,
StackGeneratedDescriptor</property>
</bean>
<!-- Deployment aspect installers -->
- <bean name="WSNativeJSEDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSNativeDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSNativeContextPropertiesDeploymentAspect"/>
+ <inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSNativeEventingDeploymentAspect"/>
+ <inject bean="WSNativePublishContractDeploymentAspect"/>
+ <inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
+ <inject bean="WSNativeUnifiedMetaDataDeploymentAspect"/>
</set>
</property>
</bean>
- <bean name="WSNativeMainDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject
bean="WSMainDeploymentAspectManager"/></property>
+ <bean name="WSNativeDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSNativeContextPropertiesDeploymentAspect"/>
- <inject bean="WSNativeEagerInitializeDeploymentAspect"/>
<inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
<inject bean="WSNativeEventingDeploymentAspect"/>
<inject bean="WSNativePublishContractDeploymentAspect"/>
@@ -114,4 +114,4 @@
</set>
</property>
</bean>
-
+
\ No newline at end of file
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java 2007-07-16
20:45:09 UTC (rev 3900)
@@ -38,15 +38,19 @@
@Override
public void create(Deployment dep)
{
- String contextRoot = getExplicitContextRoot(dep);
+ String contextRoot = dep.getService().getContextRoot();
if (contextRoot == null)
- contextRoot = getImplicitContextRoot(dep);
-
- // Always prefix with '/'
- if (contextRoot.startsWith("/") == false)
- contextRoot = "/" + contextRoot;
-
- dep.getService().setContextRoot(contextRoot);
+ {
+ contextRoot = getExplicitContextRoot(dep);
+ if (contextRoot == null)
+ contextRoot = getImplicitContextRoot(dep);
+
+ // Always prefix with '/'
+ if (contextRoot.startsWith("/") == false)
+ contextRoot = "/" + contextRoot;
+
+ dep.getService().setContextRoot(contextRoot);
+ }
}
protected String getExplicitContextRoot(Deployment dep)
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java 2007-07-16
20:45:09 UTC (rev 3900)
@@ -42,15 +42,19 @@
{
for (Endpoint ep : dep.getService().getEndpoints())
{
- String urlPattern = getExplicitPattern(dep, ep);
+ String urlPattern = ep.getURLPattern();
if (urlPattern == null)
- urlPattern = getImplicitPattern(dep, ep);
-
- // Always prefix with '/'
- if (urlPattern.startsWith("/") == false)
- urlPattern = "/" + urlPattern;
+ {
+ urlPattern = getExplicitPattern(dep, ep);
+ if (urlPattern == null)
+ urlPattern = getImplicitPattern(dep, ep);
+
+ // Always prefix with '/'
+ if (urlPattern.startsWith("/") == false)
+ urlPattern = "/" + urlPattern;
- ep.setURLPattern(urlPattern);
+ ep.setURLPattern(urlPattern);
+ }
}
}
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-16
20:45:09 UTC (rev 3900)
@@ -22,6 +22,7 @@
package org.jboss.wsf.spi.deployment;
import java.util.Iterator;
+import java.util.Map;
import org.dom4j.Document;
import org.dom4j.Element;
@@ -40,14 +41,34 @@
public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws
ClassNotFoundException
{
- String propKey = "SERVICE_ENDPOINT_SERVLET";
+ RewriteResults results = new RewriteResults();
+ Element root = webXml.getRootElement();
+
+ String propKey = "ServletClass";
String servletClass = (String)dep.getContext().getProperty(propKey);
if (servletClass == null)
throw new IllegalStateException("Cannot obtain context property: " +
propKey);
- RewriteResults results = new RewriteResults();
-
- Element root = webXml.getRootElement();
+ propKey = "ContextParameterMap";
+ Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
+ if (contextParams != null)
+ {
+ for (Map.Entry<String, String> entry : contextParams.entrySet())
+ {
+ Element contextParam = root.addElement("context-param");
+ contextParam.addElement("param-name").addText(entry.getKey());
+ contextParam.addElement("param-value").addText(entry.getValue());
+ }
+ }
+
+ propKey = "ServletContextListener";
+ String listenerClass = (String)dep.getContext().getProperty(propKey);
+ if (listenerClass != null)
+ {
+ Element listener = root.addElement("listener");
+ listener.addElement("listener-class").setText(listenerClass);
+ }
+
for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
{
Element servlet = (Element)it.next();
Modified: branches/tdiesler/trunk/integration/sunri/ant-import/build-testsuite.xml
===================================================================
--- branches/tdiesler/trunk/integration/sunri/ant-import/build-testsuite.xml 2007-07-16
20:42:35 UTC (rev 3899)
+++ branches/tdiesler/trunk/integration/sunri/ant-import/build-testsuite.xml 2007-07-16
20:45:09 UTC (rev 3900)
@@ -18,6 +18,9 @@
<property name="tests.resources.dir"
value="${tests.dir}/resources"/>
<!-- Define excludesfile -->
+ <condition property="excludesfile"
value="${int.sunri.dir}/src/test/resources/test-excludes-${jbossws.integration.target}.txt">
+ <available
file="${int.sunri.dir}/src/test/resources/test-excludes-${jbossws.integration.target}.txt"/>
+ </condition>
<property name="excludesfile"
value="${int.sunri.dir}/src/test/resources/test-excludes.txt"/>
<!-- ================================================================== -->
Modified: branches/tdiesler/trunk/integration/sunri/ant-import/macros-deploy-sunri.xml
===================================================================
---
branches/tdiesler/trunk/integration/sunri/ant-import/macros-deploy-sunri.xml 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/sunri/ant-import/macros-deploy-sunri.xml 2007-07-16
20:45:09 UTC (rev 3900)
@@ -53,6 +53,11 @@
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss50.jar"/>
</fileset>
+ <fileset dir="@{thirdpartylibs}">
+ <include name="jaxws-api.jar"/>
+ <include name="jsr181-api.jar"/>
+ <include name="saaj-api.jar"/>
+ </fileset>
</copy>
<!-- BOOTSTRAP JARS -->
@@ -64,7 +69,7 @@
</copy>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
- <unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"
src="(a){stacklibs}/jbossws-sunri50-deployer.zip"/>
+ <unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"
src="(a){jbosslibs}/jbossws-jboss50-deployer.zip"/>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"/>
<unjar
dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"
src="(a){stacklibs}/jbossws-sunri50.sar"/>
<copy
tofile="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war"
file="(a){stacklibs}/jbossws-context.war" overwrite="true"/>
@@ -100,8 +105,12 @@
<!-- SERVER JARS -->
<fileset dir="${jboss50.home}/server/${jboss.server.instance}/lib">
<include name="jbossws-jboss50.jar"/>
+ <include name="jaxws-api.jar"/>
+ <include name="jsr181-api.jar"/>
+ <include name="saaj-api.jar"/>
</fileset>
</delete>
+
<delete
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"/>
<!-- Undeploy juddi-service.sar -->
<delete
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
Modified: branches/tdiesler/trunk/integration/sunri/build.xml
===================================================================
--- branches/tdiesler/trunk/integration/sunri/build.xml 2007-07-16 20:42:35 UTC (rev
3899)
+++ branches/tdiesler/trunk/integration/sunri/build.xml 2007-07-16 20:45:09 UTC (rev
3900)
@@ -116,7 +116,6 @@
<jar jarfile="${sunri.output.lib.dir}/jbossws-sunri.jar"
manifest="${sunri.output.etc.dir}/default.mf">
<fileset dir="${sunri.output.classes.dir}">
<exclude name="org/jboss/wsf/stack/sunri/sunri/tools/**"/>
- <include name="org/jboss/wsf/stack/sunri50/**"/>
<include name="org/jboss/wsf/stack/sunri/injection/**"/>
<include name="org/jboss/wsf/stack/sunri/client/**"/>
<include name="org/jboss/wsf/stack/sunri/metadata/**"/>
@@ -153,11 +152,22 @@
<target name="jars-jboss50" depends="jars-common"
if="jboss50.home">
+ <!-- Concat jbossws-beans.xml -->
+ <concat
destfile="${sunri.output.lib.dir}/jbossws-sunri50/jbossws-beans.xml">
+ <header trimleading="yes">
+ <deployment xmlns="urn:jboss:bean-deployer:2.0">
+ </header>
+ <fileset file="${sunri.resources.dir}/jbossws-sunri-config.xml"/>
+ <footer trimleading="yes">
+ </deployment>
+ </footer>
+ </concat>
+
<!-- Build jbossws-sunri50.sar -->
<jar jarfile="${sunri.output.lib.dir}/jbossws-sunri50.sar"
manifest="${sunri.output.etc.dir}/default.mf">
- <!-- [JBAS-4379] MC beans deployed twice because of jacc service
+ <!--
<fileset dir="${sunri.output.lib.dir}">
- <include name="jbossws-context.war"/>
+ <include name="jbossws-context.war"/>
</fileset>
-->
<fileset dir="${spi.dir}/thirdparty">
@@ -179,23 +189,14 @@
<include name="stax-ex.jar"/>
<include name="streambuffer.jar"/>
</fileset>
- <metainf
dir="${sunri.resources.dir}/jbossws-sunri50.sar/META-INF">
+ <fileset dir="${sunri.output.lib.dir}">
+ <include name="jbossws-sunri.jar"/>
+ </fileset>
+ <metainf dir="${sunri.output.lib.dir}/jbossws-sunri50">
<include name="jbossws-beans.xml"/>
</metainf>
</jar>
- <!-- Build jbossws-sunri50-deployer -->
- <zip zipfile="${sunri.output.lib.dir}/jbossws-sunri50-deployer.zip">
- <fileset dir="${int.jboss50.dir}/output/lib">
- <include name="jbossws-jboss50.jar"/>
- </fileset>
- <fileset dir="${sunri.output.lib.dir}">
- <include name="jbossws-sunri.jar"/>
- </fileset>
- <fileset dir="${sunri.resources.dir}/jbossws-sunri50.deployer">
- <include name="META-INF/jbossws-deployer-beans.xml"/>
- </fileset>
- </zip>
</target>
<target name="jars-jboss42" depends="jars-common"
if="jboss42.home">
Modified:
branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java 2007-07-16
20:45:09 UTC (rev 3900)
@@ -23,11 +23,14 @@
//$Id: SunJaxwsDeployer.java 3802 2007-07-05 16:44:32Z thomas.diesler(a)jboss.com $
+import java.util.HashMap;
+import java.util.Map;
+
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.SOAPBinding;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoint;
import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoints;
@@ -43,29 +46,44 @@
@Override
public void create(Deployment dep)
{
- DDEndpoints dd = new DDEndpoints();
- for (Endpoint ep : dep.getService().getEndpoints())
+
+ DDEndpoints dd = dep.getContext().getAttachment(DDEndpoints.class);
+ if (dd == null)
{
- String epName = ep.getShortName();
- String targetBean = ep.getTargetBeanName();
- String urlPattern = ep.getURLPattern();
+ dd = new DDEndpoints();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String epName = ep.getShortName();
+ String targetBean = ep.getTargetBeanName();
+ String urlPattern = ep.getURLPattern();
- DDEndpoint ddep = new DDEndpoint(epName, targetBean, urlPattern);
+ DDEndpoint ddep = new DDEndpoint(epName, targetBean, urlPattern);
+
+ Class beanClass = ep.getTargetBeanClass();
+ BindingType anBindingType =
(BindingType)beanClass.getAnnotation(BindingType.class);
+ if (anBindingType != null && anBindingType.value().length() > 0)
+ {
+ String binding = anBindingType.value();
+ ddep.setBinding(binding);
+ if (binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) ||
binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING))
+ ddep.setEnableMTOM(true);
+ }
+
+ log.info("Add " + ddep);
+ dd.addEndpoint(ddep);
+ }
- Class beanClass = ep.getTargetBeanClass();
- BindingType anBindingType =
(BindingType)beanClass.getAnnotation(BindingType.class);
- if (anBindingType != null && anBindingType.value().length() > 0)
+ dep.getContext().addAttachment(DDEndpoints.class, dd);
+
+ String propKey = "SERVICE_ENDPOINT_CONTEXT_PARAMS";
+ Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
+ if (contextParams == null)
{
- String binding = anBindingType.value();
- ddep.setBinding(binding);
- if (binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) ||
binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING))
- ddep.setEnableMTOM(true);
+ contextParams = new HashMap<String, String>();
+ dep.getContext().setProperty(propKey, contextParams);
}
-
- log.info("Add " + ddep);
- dd.addEndpoint(ddep);
+ contextParams.put(WSServletContextListenerJBWS.PARAM_SUN_JAXWS_URL,
dd.createFileURL().toExternalForm());
}
- dep.getContext().addAttachment(DDEndpoints.class, dd);
}
@Override
Added:
branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
===================================================================
--- branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
(rev 0)
+++
branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml 2007-07-16
20:45:09 UTC (rev 3900)
@@ -0,0 +1,107 @@
+
+ <!-- An abstraction of server configuration aspects. -->
+ <bean name="WSServerConfig"
class="org.jboss.wsf.spi.management.BasicServerConfig">
+ <!--
+ The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
+ element which points to the location of the endpoint. JBoss supports rewriting of
that SOAP address.
+
+ If the content of <soap:address> is a valid URL, JBossWS will not rewrite
it unless 'modifySOAPAddress' is true.
+ If the content of <soap:address> is not a valid URL, JBossWS will rewrite
it using the attribute values given below.
+
+ If 'webServiceHost' is not set, JBossWS uses requesters protocol host and
port when rewriting the <soap:address>.
+ -->
+ <property
name="webServiceHost">${jboss.bind.address}</property>
+ <property name="modifySOAPAddress">true</property>
+
+ <!--
+ Set these properties to explicitly define the ports that will be used for rewriting
the SOAP address.
+ Otherwise the ports will be identified by querying the list of installed
connectors.
+ If multiple connectors are found the port of the first connector is used.
+ <property name="webServiceSecurePort">8443</property>
+ <property name="webServicePort">8080</property>
+ -->
+ </bean>
+
+ <!-- The registry for web service endpoints -->
+ <bean name="WSEndpointRegistry"
class="org.jboss.wsf.stack.sunri.ManagedEndpointRegistry"/>
+
+ <!-- Bind Service objects in client environment context -->
+ <bean name="WSServiceRefHandler"
class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+ <property name="jaxrpcBinder"><inject
bean="WSServiceRefBinderJAXRPC"/></property>
+ <property name="jaxwsBinder"><inject
bean="WSServiceRefBinderJAXWS"/></property>
+ </bean>
+
+ <!-- JBoss_4_2_0_GA uses this hardcoded bean name -->
+ <bean name="ServiceRefHandler"
class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+ <property name="jaxrpcBinder"><inject
bean="WSServiceRefBinderJAXRPC"/></property>
+ <property name="jaxwsBinder"><inject
bean="WSServiceRefBinderJAXWS"/></property>
+ </bean>
+ <bean name="WSServiceRefBinderJAXRPC"
class="org.jboss.wsf.stack.sunri.client.DummyServiceRefBinderJAXRPC"/>
+ <bean name="WSServiceRefBinderJAXWS"
class="org.jboss.wsf.stack.sunri.client.ServiceRefBinderJAXWS"/>
+
+ <!-- Logging redirector -->
+ <bean name="JDKLogRedirector"
class="org.jboss.wsf.stack.sunri.log.JDKLogRedirector">
+ <property name="namespaces">
+ <list class="java.util.LinkedList"
elementClass="java.lang.String">
+ <value>javax.enterprise.resource.webservices.jaxws</value>
+ <value>com.sun</value>
+ </list>
+ </property>
+ <property name="levelMapping">
+ <map keyClass="java.lang.String"
valueClass="java.lang.String">
+
<entry><key>INFO</key><value>info</value></entry>
+
<entry><key>SEVERE</key><value>error</value></entry>
+
<entry><key>WARNING</key><value>warn</value></entry>
+
<entry><key>FINE</key><value>debug</value></entry>
+
<entry><key>FINER</key><value>trace</value></entry>
+
<entry><key>FINEST</key><value>trace</value></entry>
+ </map>
+ </property>
+ <property name="defaultLevel">debug</property>
+ </bean>
+
+ <!--
+ The stack specific deployment aspects
+ -->
+ <bean name="WSMetroContextPropertiesDeploymentAspect"
class="org.jboss.wsf.spi.deployment.ContextPropertiesDeploymentAspect">
+ <property name="provides">ContextProperties</property>
+ <property name="contextProperties">
+ <map keyClass="java.lang.String"
valueClass="java.lang.String">
+
<entry><key>SERVICE_ENDPOINT_LISTENER</key><value>org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</value></entry>
+
<entry><key>SERVICE_ENDPOINT_SERVLET</key><value>org.jboss.wsf.spi.invocation.EndpointServlet</value></entry>
+ </map>
+ </property>
+ </bean>
+
+ <bean name="WSMetroEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <property name="requires">ContainerEndpointHandler</property>
+ <property name="provides">StackEndpointHandler</property>
+ <property
name="requestHandler">org.jboss.wsf.stack.sunri.RequestHandlerImpl</property>
+ <property
name="lifecycleHandler">org.jboss.wsf.stack.sunri.LifecycleHandlerImpl</property>
+ </bean>
+
+ <bean name="WSMetroDescriptorDeploymentAspect"
class="org.jboss.wsf.stack.sunri.SunJaxwsDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">StackGeneratedDescriptor</property>
+ </bean>
+
+ <!-- Deployment aspect installers -->
+ <bean name="WSMetroDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSMetroContextPropertiesDeploymentAspect"/>
+ <inject bean="WSMetroDescriptorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+ <bean name="WSMetroMainDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSMainDeploymentAspectManager"/></property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSMetroDescriptorDeploymentAspect"/>
+ <inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
Modified: branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml 2007-07-16
20:42:35 UTC (rev 3899)
+++ branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml 2007-07-16
20:45:09 UTC (rev 3900)
@@ -18,6 +18,9 @@
<property name="tests.resources.dir"
value="${tests.dir}/resources"/>
<!-- Define excludesfile -->
+ <condition property="excludesfile"
value="${int.xfire.dir}/src/test/resources/test-excludes-${jbossws.integration.target}.txt">
+ <available
file="${int.xfire.dir}/src/test/resources/test-excludes-${jbossws.integration.target}.txt"/>
+ </condition>
<property name="excludesfile"
value="${int.xfire.dir}/src/test/resources/test-excludes.txt"/>
<!-- ================================================================== -->
Modified: branches/tdiesler/trunk/integration/xfire/ant-import/macros-deploy-xfire.xml
===================================================================
---
branches/tdiesler/trunk/integration/xfire/ant-import/macros-deploy-xfire.xml 2007-07-16
20:42:35 UTC (rev 3899)
+++
branches/tdiesler/trunk/integration/xfire/ant-import/macros-deploy-xfire.xml 2007-07-16
20:45:09 UTC (rev 3900)
@@ -50,7 +50,7 @@
</fileset>
</copy>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
- <unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"
src="(a){stacklibs}/jbossws-xfire50-deployer.zip"/>
+ <unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"
src="(a){jbosslibs}/jbossws-jboss50-deployer.zip"/>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"/>
<unjar
dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"
src="(a){stacklibs}/jbossws-xfire50.sar"/>
<copy
tofile="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war"
file="(a){stacklibs}/jbossws-context.war" overwrite="true"/>