Author: thomas.diesler(a)jboss.com
Date: 2007-05-25 07:52:14 -0400 (Fri, 25 May 2007)
New Revision: 3251
Modified:
trunk/build/version.properties
trunk/integration/native/ant-import/build-deploy.xml
trunk/integration/native/build.xml
trunk/integration/sunri/ant-import/build-deploy.xml
trunk/integration/sunri/build.xml
trunk/integration/xfire/.classpath
trunk/integration/xfire/ant-import/build-deploy.xml
trunk/integration/xfire/ant-import/build-thirdparty.xml
trunk/integration/xfire/ant-import/macros-deploy-xfire.xml
trunk/integration/xfire/build.xml
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletExt.java
trunk/jbossws-core/version.properties
Log:
Start XFire bjoss42 support
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-05-25 10:28:07 UTC (rev 3250)
+++ trunk/build/version.properties 2007-05-25 11:52:14 UTC (rev 3251)
@@ -22,6 +22,7 @@
jboss-jbossxb=2.0.0.CR2
jboss-microcontainer=2.0.0.Beta3
junit=3.8.1
+stax-api=1.0
sun-jaf=1.1
sun-jaxb=2.1.3
sun-jaxrpc=1.1
Modified: trunk/integration/native/ant-import/build-deploy.xml
===================================================================
--- trunk/integration/native/ant-import/build-deploy.xml 2007-05-25 10:28:07 UTC (rev
3250)
+++ trunk/integration/native/ant-import/build-deploy.xml 2007-05-25 11:52:14 UTC (rev
3251)
@@ -21,7 +21,6 @@
<!-- Deploy to jboss50 -->
<target name="deploy-jboss50"
depends="jars-native50,undeploy-jboss50" description="Deploy jbossws to
jboss50">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
<ant antfile="${int.sunri.dir}/build.xml"
target="undeploy-jboss50" inheritall="false"/>
<ant antfile="${int.xfire.dir}/build.xml"
target="undeploy-jboss50" inheritall="false"/>
<macro-deploy-native50
@@ -39,7 +38,8 @@
<!-- Deploy to jboss42 -->
<target name="deploy-jboss42"
depends="jars-native42,undeploy-jboss42" description="Deploy jbossws to
jboss42">
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
+ <ant antfile="${int.sunri.dir}/build.xml"
target="undeploy-jboss42" inheritall="false"/>
+ <ant antfile="${int.xfire.dir}/build.xml"
target="undeploy-jboss42" inheritall="false"/>
<macro-deploy-native42
spilibs="${spi.dir}/output/lib"
jbosslibs="${int.jboss42.dir}/output/lib"
Modified: trunk/integration/native/build.xml
===================================================================
--- trunk/integration/native/build.xml 2007-05-25 10:28:07 UTC (rev 3250)
+++ trunk/integration/native/build.xml 2007-05-25 11:52:14 UTC (rev 3251)
@@ -91,14 +91,12 @@
<target name="jars"
depends="compile,jars-native42,jars-native50" description="Builds all jar
files.">
</target>
- <!--
- | Build all jar files.
- -->
<target name="jars-native50" depends="compile"
if="jboss50.home">
- <mkdir dir="${native.output.lib.dir}"/>
+ <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
<!-- Build jbossws-context.war -->
+ <mkdir dir="${native.output.lib.dir}"/>
<war warfile="${native.output.lib.dir}/jbossws-context.war"
webxml="${native.resources.dir}/jbossws-context.war/WEB-INF/web.xml">
<fileset dir="${native.resources.dir}/jbossws-context.war">
<include name="index.html"/>
@@ -142,14 +140,12 @@
</target>
- <!--
- | Build all jar files.
- -->
<target name="jars-native42" depends="compile"
if="jboss42.home">
- <mkdir dir="${native.output.lib.dir}"/>
+ <ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
<!-- Build jbossws-native42.sar -->
+ <mkdir dir="${native.output.lib.dir}"/>
<jar jarfile="${native.output.lib.dir}/jbossws-native42.sar"
manifest="${native.output.etc.dir}/default.mf">
<fileset dir="${native.output.lib.dir}">
<include name="jbossws-context.war"/>
Modified: trunk/integration/sunri/ant-import/build-deploy.xml
===================================================================
--- trunk/integration/sunri/ant-import/build-deploy.xml 2007-05-25 10:28:07 UTC (rev
3250)
+++ trunk/integration/sunri/ant-import/build-deploy.xml 2007-05-25 11:52:14 UTC (rev
3251)
@@ -21,9 +21,8 @@
<!-- Deploy to jboss50 -->
<target name="deploy-jboss50"
depends="jars-jboss50,undeploy-jboss50" description="Deploy jbossws/sunri
to jboss50">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
- <ant antfile="${int.native.dir}/build.xml"
target="undeploy-jboss50" inheritall="false"/>
- <ant antfile="${int.xfire.dir}/build.xml"
target="undeploy-jboss50" inheritall="false"/>
+ <ant antfile="${int.sunri.dir}/build.xml"
target="undeploy-jboss42" inheritall="false"/>
+ <ant antfile="${int.xfire.dir}/build.xml"
target="undeploy-jboss42" inheritall="false"/>
<macro-deploy-sunri50
spilibs="${spi.dir}/output/lib"
jbosslibs="${int.jboss50.dir}/output/lib"
@@ -38,7 +37,6 @@
<!-- Deploy to jboss42 -->
<target name="deploy-jboss42"
depends="jars-jboss42,undeploy-jboss42" description="Deploy jbossws/sunri
to jboss42">
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
<ant antfile="${int.native.dir}/build.xml"
target="undeploy-jboss42" inheritall="false"/>
<ant antfile="${int.xfire.dir}/build.xml"
target="undeploy-jboss42" inheritall="false"/>
<macro-deploy-sunri42
Modified: trunk/integration/sunri/build.xml
===================================================================
--- trunk/integration/sunri/build.xml 2007-05-25 10:28:07 UTC (rev 3250)
+++ trunk/integration/sunri/build.xml 2007-05-25 11:52:14 UTC (rev 3251)
@@ -40,8 +40,7 @@
<!-- ================================================================== -->
<target name="init" depends="prepare,thirdparty">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
+ <ant antfile="${spi.dir}/build.xml" target="main"
inheritall="false"/>
</target>
<!-- ================================================================== -->
@@ -128,6 +127,8 @@
<target name="jars-jboss50" depends="jars-common"
if="jboss50.home">
+ <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
+
<!-- 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
@@ -175,6 +176,8 @@
<target name="jars-jboss42" depends="jars-common"
if="jboss42.home">
+ <ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
+
<!-- Build jbossws-sunri42.sar -->
<jar jarfile="${sunri.output.lib.dir}/jbossws-sunri42.sar"
manifest="${sunri.output.etc.dir}/default.mf">
<fileset dir="${sunri.output.lib.dir}">
Modified: trunk/integration/xfire/.classpath
===================================================================
--- trunk/integration/xfire/.classpath 2007-05-25 10:28:07 UTC (rev 3250)
+++ trunk/integration/xfire/.classpath 2007-05-25 11:52:14 UTC (rev 3251)
@@ -13,5 +13,6 @@
<classpathentry kind="lib" path="thirdparty/jaxws-api.jar"/>
<classpathentry kind="lib"
path="thirdparty/xfire-jsr181-api.jar"/>
<classpathentry kind="lib"
path="/integration-spi/thirdparty/jboss-common-core.jar"/>
+ <classpathentry kind="lib" path="thirdparty/spring.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/integration/xfire/ant-import/build-deploy.xml
===================================================================
--- trunk/integration/xfire/ant-import/build-deploy.xml 2007-05-25 10:28:07 UTC (rev
3250)
+++ trunk/integration/xfire/ant-import/build-deploy.xml 2007-05-25 11:52:14 UTC (rev
3251)
@@ -21,7 +21,6 @@
<!-- Deploy to jboss50 -->
<target name="deploy-jboss50"
depends="jars-jboss50,undeploy-jboss50" description="Deploy jbossws/xfire
to jboss50">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
<ant antfile="${int.native.dir}/build.xml"
target="undeploy-jboss50" inheritall="false"/>
<ant antfile="${int.sunri.dir}/build.xml"
target="undeploy-jboss50" inheritall="false"/>
<macro-deploy-xfire50
@@ -38,21 +37,18 @@
<!-- Deploy to jboss42 -->
<target name="deploy-jboss42"
depends="jars-jboss42,undeploy-jboss42" description="Deploy jbossws/xfire
to jboss42">
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
<ant antfile="${int.native.dir}/build.xml"
target="undeploy-jboss42" inheritall="false"/>
<ant antfile="${int.sunri.dir}/build.xml"
target="undeploy-jboss42" inheritall="false"/>
- <!--
<macro-deploy-xfire42
spilibs="${spi.dir}/output/lib"
jbosslibs="${int.jboss42.dir}/output/lib"
stacklibs="${int.xfire.dir}/output/lib"
thirdpartylibs="${int.xfire.dir}/thirdparty"/>
- -->
</target>
<!-- Remove from jboss42 -->
<target name="undeploy-jboss42" depends="prepare"
description="Remove jbossws/xfire from jboss42">
- <!--macro-undeploy-xfire42/-->
+ <macro-undeploy-xfire42/>
</target>
</project>
Modified: trunk/integration/xfire/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/xfire/ant-import/build-thirdparty.xml 2007-05-25 10:28:07 UTC (rev
3250)
+++ trunk/integration/xfire/ant-import/build-thirdparty.xml 2007-05-25 11:52:14 UTC (rev
3251)
@@ -45,6 +45,7 @@
<get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar"
dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j-src.jar"
dest="${thirdparty.dir}/wsdl4j-src.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jaxr/${jboss-jaxr}/lib/juddi-service.sar"
dest="${thirdparty.dir}/juddi-service.sar" usetimestamp="true"
verbose="true"/>
+ <get src="${jboss.repository}/stax-api/${stax-api}/lib/stax-api.jar"
dest="${thirdparty.dir}/stax-api.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-api.jar"
dest="${thirdparty.dir}/jaxb-api.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-impl.jar"
dest="${thirdparty.dir}/jaxb-impl.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-xjc.jar"
dest="${thirdparty.dir}/jaxb-xjc.jar" usetimestamp="true"
verbose="true"/>
@@ -90,6 +91,7 @@
<pathelement
location="${jboss50.server.deployers}/ejb3.deployer/jboss-ejb3x.jar"/>
<pathelement location="${thirdparty.dir}/jaxws-api.jar"/>
<pathelement location="${thirdparty.dir}/servlet-api.jar"/>
+ <pathelement location="${thirdparty.dir}/spring.jar"/>
<pathelement location="${thirdparty.dir}/xfire-all.jar"/>
<pathelement location="${thirdparty.dir}/xfire-jsr181-api.jar"/>
</path>
Modified: trunk/integration/xfire/ant-import/macros-deploy-xfire.xml
===================================================================
--- trunk/integration/xfire/ant-import/macros-deploy-xfire.xml 2007-05-25 10:28:07 UTC
(rev 3250)
+++ trunk/integration/xfire/ant-import/macros-deploy-xfire.xml 2007-05-25 11:52:14 UTC
(rev 3251)
@@ -14,9 +14,10 @@
<project>
<!-- ================================================================== -->
- <!-- Deployment JBoss50 -->
+ <!-- Deployment -->
<!-- ================================================================== -->
+ <!-- Deploy to jboss50 -->
<macrodef name="macro-deploy-xfire50">
<attribute name="spilibs"/>
<attribute name="jbosslibs"/>
@@ -59,7 +60,7 @@
</sequential>
</macrodef>
- <!-- Remove jbossws/xfire from jboss50 -->
+ <!-- Undeploy from jboss50 -->
<macrodef name="macro-undeploy-xfire50">
<sequential>
<delete>
@@ -76,4 +77,60 @@
</sequential>
</macrodef>
+ <macrodef name="macro-deploy-xfire42">
+ <attribute name="spilibs"/>
+ <attribute name="jbosslibs"/>
+ <attribute name="stacklibs"/>
+ <attribute name="thirdpartylibs"/>
+ <sequential>
+ <fail message="Not available: ${jboss42.available.file}"
unless="jboss42.available"/>
+ <copy todir="${jboss42.home}/client" overwrite="true">
+ <fileset dir="@{thirdpartylibs}">
+ <include name="jaxb-api.jar"/>
+ <include name="jaxb-impl.jar"/>
+ <include name="jaxb-xjc.jar"/>
+ </fileset>
+ <fileset dir="@{spilibs}">
+ <include name="jbossws-spi.jar"/>
+ </fileset>
+ <fileset dir="@{jbosslibs}">
+ <include name="jbossws-jboss42.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="${jboss42.home}/lib" overwrite="true">
+ <fileset dir="@{thirdpartylibs}">
+ <include name="jaxb-api.jar"/>
+ <include name="jaxb-impl.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="${jboss42.home}/server/${jboss.server.instance}/lib"
overwrite="true">
+ <fileset dir="@{spilibs}">
+ <include name="jbossws-spi.jar"/>
+ </fileset>
+ <fileset dir="@{jbosslibs}">
+ <include name="jbossws-jboss42.jar"/>
+ </fileset>
+ </copy>
+ <mkdir
dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"/>
+ <unjar
dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"
src="(a){stacklibs}/jbossws-xfire42.sar"/>
+ </sequential>
+ </macrodef>
+
+ <!-- Remove jbossws/xfire from jboss42 -->
+ <macrodef name="macro-undeploy-xfire42">
+ <sequential>
+ <delete>
+ <fileset dir="${jboss42.home}/client">
+ <include name="jbossws-spi.jar"/>
+ <include name="jbossws-jboss42.jar"/>
+ </fileset>
+ <fileset
dir="${jboss42.home}/server/${jboss.server.instance}/lib">
+ <include name="jbossws-spi.jar"/>
+ <include name="jbossws-jboss42.jar"/>
+ </fileset>
+ </delete>
+ <delete
dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"/>
+ </sequential>
+ </macrodef>
+
</project>
Modified: trunk/integration/xfire/build.xml
===================================================================
--- trunk/integration/xfire/build.xml 2007-05-25 10:28:07 UTC (rev 3250)
+++ trunk/integration/xfire/build.xml 2007-05-25 11:52:14 UTC (rev 3251)
@@ -40,8 +40,7 @@
<!-- ================================================================== -->
<target name="init" depends="prepare,thirdparty">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
+ <ant antfile="${spi.dir}/build.xml" target="main"
inheritall="false"/>
</target>
<!-- ================================================================== -->
@@ -128,6 +127,8 @@
<target name="jars-jboss50" depends="jars-common"
if="jboss50.home">
+ <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
+
<!-- Build jbosswsri.sar -->
<jar jarfile="${xfire.output.lib.dir}/jbossws-xfire50.sar"
manifest="${xfire.output.etc.dir}/default.mf">
<!-- [JBAS-4379] MC beans deployed twice because of jacc service
@@ -171,8 +172,43 @@
<target name="jars-jboss42" depends="jars-common"
if="jboss42.home">
+ <ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
+
<!-- Build jbossws-xfire42.sar -->
<jar jarfile="${xfire.output.lib.dir}/jbossws-xfire42.sar"
manifest="${xfire.output.etc.dir}/default.mf">
+ <fileset dir="${xfire.output.lib.dir}">
+ <include name="jbossws-context.war"/>
+ </fileset>
+ <fileset dir="${spi.dir}/thirdparty">
+ <include name="jaxrpc-api.jar"/>
+ </fileset>
+ <fileset dir="${int.jboss42.dir}/output/lib">
+ <include name="jbossws-jboss42.jar"/>
+ </fileset>
+ <fileset dir="${xfire.output.lib.dir}">
+ <include name="jbossws-xfire.jar"/>
+ </fileset>
+ <fileset dir="${thirdparty.dir}">
+ <include name="jaxb-api.jar"/>
+ <include name="jaxb-impl.jar"/>
+ <include name="jaxws-api.jar"/>
+ <include name="jdom.jar"/>
+ <include name="wsdl4j.jar"/>
+ <include name="saaj-api.jar"/>
+ <include name="saaj-impl.jar"/>
+ <include name="spring.jar"/>
+ <include name="stax-api.jar"/>
+ <include name="xbean.jar"/>
+ <include name="xbean-spring.jar"/>
+ <include name="xfire-all.jar"/>
+ <include name="xfire-jsr181-api.jar"/>
+ </fileset>
+ <fileset dir="${xfire.resources.dir}/jbossws-xfire42.sar">
+ <include name="jbossws.beans/**"/>
+ </fileset>
+ <metainf
dir="${xfire.resources.dir}/jbossws-xfire42.sar/META-INF">
+ <include name="jboss-service.xml"/>
+ </metainf>
</jar>
</target>
Modified:
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletExt.java
===================================================================
---
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletExt.java 2007-05-25
10:28:07 UTC (rev 3250)
+++
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireConfigurableServletExt.java 2007-05-25
11:52:14 UTC (rev 3251)
@@ -35,14 +35,20 @@
import javax.xml.ws.WebServiceException;
import org.codehaus.xfire.XFire;
+import org.codehaus.xfire.XFireException;
+import org.codehaus.xfire.spring.XFireConfigLoader;
import org.codehaus.xfire.transport.http.XFireConfigurableServlet;
import org.codehaus.xfire.transport.http.XFireServletController;
+import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointAssociation;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
import org.jboss.wsf.spi.utils.ObjectNameFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.GenericWebApplicationContext;
/**
* An extension to the XFire servlet
@@ -56,6 +62,8 @@
private final static String CONFIG_FILE =
"/WEB-INF/classes/META-INF/xfire/services.xml";
+ private static Logger log = Logger.getLogger(XFireConfigurableServletExt.class);
+
protected Endpoint endpoint;
protected EndpointRegistry epRegistry;
@@ -66,7 +74,7 @@
// Init the Endpoint
epRegistry = EndpointRegistryFactory.getEndpointRegistry();
String contextPath = servletConfig.getServletContext().getContextPath();
- initServiceEndpoint(contextPath);
+ endpoint = initServiceEndpoint(contextPath);
endpoint.addAttachment(XFireServletController.class, controller);
}
@@ -97,6 +105,34 @@
return xfire;
}
+ public XFire loadConfig(String configPath) throws XFireException
+ {
+ XFireConfigLoader loader = new XFireConfigLoader();
+ //loader.setBasedir(getWebappBase());
+ //log.debug("Loading configuration files relative to " +
loader.getBasedir().getAbsolutePath());
+
+ ServletContext servletCtx = getServletContext();
+ ApplicationContext parent = (ApplicationContext)
servletCtx.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
+
+ if (parent == null)
+ {
+ GenericWebApplicationContext webCtx = new GenericWebApplicationContextX();
+ webCtx.setServletContext(getServletContext());
+ webCtx.refresh();
+ parent = webCtx;
+ }
+
+ ApplicationContext newCtx = loader.loadContext(configPath, parent);
+
if(servletCtx.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE)
== null)
+ {
+
servletCtx.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
newCtx);
+ }
+
+ XFire xfire = (XFire) newCtx.getBean("xfire");
+ xfire.setProperty(XFire.XFIRE_HOME, getWebappBase().getAbsolutePath());
+ return xfire;
+ }
+
public XFireServletController createController() throws ServletException
{
return new XFireServletControllerExt(xfire, getServletContext());
@@ -118,11 +154,12 @@
/** Initialize the service endpoint
*/
- protected void initServiceEndpoint(String contextPath)
+ protected Endpoint initServiceEndpoint(String contextPath)
{
if (contextPath.startsWith("/"))
contextPath = contextPath.substring(1);
+ Endpoint endpoint = null;
String servletName = getServletName();
for (ObjectName sepId : epRegistry.getEndpoints())
{
@@ -141,5 +178,7 @@
+ Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
throw new WebServiceException("Cannot obtain endpoint for: " +
oname);
}
+
+ return endpoint;
}
}
Modified: trunk/jbossws-core/version.properties
===================================================================
--- trunk/jbossws-core/version.properties 2007-05-25 10:28:07 UTC (rev 3250)
+++ trunk/jbossws-core/version.properties 2007-05-25 11:52:14 UTC (rev 3251)
@@ -7,7 +7,6 @@
javassist=3.5.0.CR1
jbossws-wsconsume-impl=2.0.0
jbpm-bpel=1.1.0.Beta5
-stax-api=1.0
# Thirdparty library versions
apache-ant=1.6.5