JBossWS SVN: r4127 - /.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-02 23:40:23 -0400 (Thu, 02 Aug 2007)
New Revision: 4127
Added:
framework/
Log:
create framework
17 years, 4 months
JBossWS SVN: r4126 - in trunk/jbossws-core/src: test/java/org/jboss/test/ws/jaxrpc/jbws1653 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-08-02 18:39:33 -0400 (Thu, 02 Aug 2007)
New Revision: 4126
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java
Log:
JBWS-1771 - Post-handler-chain not invoked for 'Standard Client' configuration with DII client.
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-08-02 22:06:49 UTC (rev 4125)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-08-02 22:39:33 UTC (rev 4126)
@@ -410,7 +410,7 @@
// JBoss-4.0.x does not support <stub-properties>
if (initCallProperties(call, seiClass.getName()) > 0)
log.info("Deprecated use of <call-properties> on JAXRPC Stub. Use <stub-properties>");
-
+
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass, Stub.class, StubExt.class }, handler);
@@ -444,10 +444,12 @@
private int initCallProperties(CallImpl call, String seiName)
{
+ setupHandlerChain(call.getEndpointMetaData());
+
// nothing to do
if (usrMetaData == null)
return 0;
-
+
int propCount = 0;
// General properties
@@ -471,7 +473,7 @@
}
}
}
-
+
return propCount;
}
@@ -520,11 +522,11 @@
log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
handlerInfos.add(info);
}
-
+
// register the handlers with the client engine
if (handlerInfos.size() > 0)
registerHandlerChain(portName, handlerInfos, handlerRoles);
-
+
epMetaData.setHandlersInitialized(true);
}
}
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java 2007-08-02 22:06:49 UTC (rev 4125)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java 2007-08-02 22:39:33 UTC (rev 4126)
@@ -156,7 +156,7 @@
public void testCustomConfigConfiguredDII() throws Exception
{
- if (true)
+ if (false)
{
System.out.println("FIXME: [JBWS-1771] Post-handler-chain not invoked for \"Standard Client\" configuration with DII client");
return;
17 years, 4 months
JBossWS SVN: r4125 - in branches/jbossws-2.0/jbossws-core/src: test/java/org/jboss/test/ws/jaxrpc/jbws1653 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-08-02 18:06:49 -0400 (Thu, 02 Aug 2007)
New Revision: 4125
Modified:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java
Log:
JBWS-1771 - Post-handler-chain not invoked for 'Standard Client' configuration with DII client.
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-08-02 21:23:20 UTC (rev 4124)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-08-02 22:06:49 UTC (rev 4125)
@@ -44,6 +44,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.StubExt;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -53,7 +54,6 @@
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
@@ -410,7 +410,7 @@
// JBoss-4.0.x does not support <stub-properties>
if (initCallProperties(call, seiClass.getName()) > 0)
log.info("Deprecated use of <call-properties> on JAXRPC Stub. Use <stub-properties>");
-
+
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass, Stub.class, StubExt.class }, handler);
@@ -444,10 +444,12 @@
private int initCallProperties(CallImpl call, String seiName)
{
+ setupHandlerChain(call.getEndpointMetaData());
+
// nothing to do
if (usrMetaData == null)
return 0;
-
+
int propCount = 0;
// General properties
@@ -471,7 +473,7 @@
}
}
}
-
+
return propCount;
}
@@ -520,11 +522,11 @@
log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
handlerInfos.add(info);
}
-
+
// register the handlers with the client engine
if (handlerInfos.size() > 0)
registerHandlerChain(portName, handlerInfos, handlerRoles);
-
+
epMetaData.setHandlersInitialized(true);
}
}
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java 2007-08-02 21:23:20 UTC (rev 4124)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java 2007-08-02 22:06:49 UTC (rev 4125)
@@ -156,7 +156,7 @@
public void testCustomConfigConfiguredDII() throws Exception
{
- if (true)
+ if (false)
{
System.out.println("FIXME: [JBWS-1771] Post-handler-chain not invoked for \"Standard Client\" configuration with DII client");
return;
17 years, 4 months
JBossWS SVN: r4124 - trunk/build/eclipse.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-02 17:23:20 -0400 (Thu, 02 Aug 2007)
New Revision: 4124
Modified:
trunk/build/eclipse/jbossws.userlibraries
Log:
update jboss40 jars
Modified: trunk/build/eclipse/jbossws.userlibraries
===================================================================
--- trunk/build/eclipse/jbossws.userlibraries 2007-08-02 20:50:16 UTC (rev 4123)
+++ trunk/build/eclipse/jbossws.userlibraries 2007-08-02 21:23:20 UTC (rev 4124)
@@ -1,32 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<eclipse-userlibraries version="2">
<library name="jboss-4.0.x" systemlibrary="false">
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-common.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-jmx.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-system.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/lib/jboss.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3x.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-bean.deployer/jboss-dependency.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-bean.deployer/jboss-microcontainer.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/lib/jboss-common.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/lib/jboss-jmx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/lib/jboss-system.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/lib/jboss.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/lib/jboss-j2ee.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3x.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/jboss-bean.deployer/jboss-dependency.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/deploy/jboss-bean.deployer/jboss-microcontainer.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/lib/jboss-xml-binding.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/lib/javax.servlet.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_0_5_GA/build/output/jboss-4.0.5.GA-ejb3/server/default/lib/jbosssx.jar"/>
</library>
<library name="jboss-4.2.x" systemlibrary="false">
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/lib/jboss-jmx.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/lib/jboss-system.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/lib/jboss.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/lib/jboss-ejb3x.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/lib/jboss-common.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/lib/jboss-j2ee.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/deploy/jboss-bean.deployer/jboss-dependency.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/deploy/jboss-bean.deployer/jboss-microcontainer.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/lib/jboss-xml-binding.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/lib/servlet-api.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/lib/jbosssx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/lib/jboss-jmx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/lib/jboss-system.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/lib/jboss.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/lib/jboss-ejb3x.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/lib/jboss-common.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/lib/jboss-j2ee.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/deploy/jboss-bean.deployer/jboss-dependency.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/deploy/jboss-bean.deployer/jboss-microcontainer.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/lib/jboss-xml-binding.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/lib/servlet-api.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA/server/default/lib/jbosssx.jar"/>
</library>
<library name="jboss-5.0.x" systemlibrary="false">
<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-aop-jdk50.jar"/>
17 years, 4 months
JBossWS SVN: r4123 - container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-02 16:50:16 -0400 (Thu, 02 Aug 2007)
New Revision: 4123
Modified:
container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.ws.core.server.HttpServer
container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory
Log:
Use jboss40
Modified: container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.ws.core.server.HttpServer
===================================================================
--- container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.ws.core.server.HttpServer 2007-08-02 20:46:09 UTC (rev 4122)
+++ container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.ws.core.server.HttpServer 2007-08-02 20:50:16 UTC (rev 4123)
@@ -1 +1 @@
-org.jboss.ws.integration.jboss42.JBossHttpServer
\ No newline at end of file
+org.jboss.ws.integration.jboss40.JBossHttpServer
\ No newline at end of file
Modified: container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory
===================================================================
--- container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory 2007-08-02 20:46:09 UTC (rev 4122)
+++ container/jboss40/trunk/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory 2007-08-02 20:50:16 UTC (rev 4123)
@@ -1 +1 @@
-org.jboss.wsf.container.jboss42.SecurityAdapterFactoryImpl
\ No newline at end of file
+org.jboss.wsf.container.jboss40.SecurityAdapterFactoryImpl
\ No newline at end of file
17 years, 4 months
JBossWS SVN: r4122 - container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-02 16:46:09 -0400 (Thu, 02 Aug 2007)
New Revision: 4122
Modified:
container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF/jboss-service-no-ejb3.xml
container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF/jboss-service.xml
Log:
Use jboss40
Modified: container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF/jboss-service-no-ejb3.xml
===================================================================
--- container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF/jboss-service-no-ejb3.xml 2007-08-02 20:42:11 UTC (rev 4121)
+++ container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF/jboss-service-no-ejb3.xml 2007-08-02 20:46:09 UTC (rev 4122)
@@ -14,7 +14,7 @@
<!--
A deployer service for JSE endpoints.
-->
- <mbean name="jboss.ws:service=DeployerInterceptorJSE" code="org.jboss.wsf.container.jboss42.DeployerInterceptorJSE">
+ <mbean name="jboss.ws:service=DeployerInterceptorJSE" code="org.jboss.wsf.container.jboss40.DeployerInterceptorJSE">
<depends-list optional-attribute-name="Interceptables">
<depends-list-element>jboss.web:service=WebServer</depends-list-element>
</depends-list>
@@ -23,7 +23,7 @@
<!--
A deployer service for EJB2.1 endpoints.
-->
- <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.wsf.container.jboss42.DeployerInterceptorEJB21">
+ <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.wsf.container.jboss40.DeployerInterceptorEJB21">
<depends-list optional-attribute-name="Interceptables">
<depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
</depends-list>
Modified: container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF/jboss-service.xml
===================================================================
--- container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF/jboss-service.xml 2007-08-02 20:42:11 UTC (rev 4121)
+++ container/jboss40/trunk/src/main/resources/jbossws-jboss40.sar/META-INF/jboss-service.xml 2007-08-02 20:46:09 UTC (rev 4122)
@@ -14,7 +14,7 @@
<!--
A deployer service for JSE endpoints.
-->
- <mbean name="jboss.ws:service=DeployerInterceptorJSE" code="org.jboss.wsf.container.jboss42.DeployerInterceptorJSE">
+ <mbean name="jboss.ws:service=DeployerInterceptorJSE" code="org.jboss.wsf.container.jboss40.DeployerInterceptorJSE">
<depends-list optional-attribute-name="Interceptables">
<depends-list-element>jboss.web:service=WebServer</depends-list-element>
</depends-list>
@@ -23,7 +23,7 @@
<!--
A deployer service for EJB2.1 endpoints.
-->
- <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.wsf.container.jboss42.DeployerInterceptorEJB21">
+ <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.wsf.container.jboss40.DeployerInterceptorEJB21">
<depends-list optional-attribute-name="Interceptables">
<depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
</depends-list>
@@ -32,7 +32,7 @@
<!--
A deployer service for EJB3 endpoints.
-->
- <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.wsf.container.jboss42.DeployerInterceptorEJB3">
+ <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.wsf.container.jboss40.DeployerInterceptorEJB3">
<depends-list optional-attribute-name="Interceptables">
<depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
</depends-list>
17 years, 4 months
JBossWS SVN: r4121 - in trunk: integration/sunri and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-02 16:42:11 -0400 (Thu, 02 Aug 2007)
New Revision: 4121
Modified:
trunk/build/ant-import/build-testsuite.xml
trunk/integration/sunri/ant-import/build-thirdparty.xml
trunk/integration/sunri/ant-import/macros-deploy-sunri.xml
trunk/integration/sunri/build.xml
trunk/integration/xfire/ant-import/build-thirdparty.xml
trunk/integration/xfire/ant-import/macros-deploy-xfire.xml
trunk/integration/xfire/build.xml
trunk/jbossws-core/ant-import/build-thirdparty.xml
trunk/jbossws-core/ant-import/macros-deploy-native.xml
trunk/jbossws-core/build.xml
trunk/testsuite/ant-import/build-jars-jaxws.xml
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java
Log:
Externalize container/jboss4x
Modified: trunk/build/ant-import/build-testsuite.xml
===================================================================
--- trunk/build/ant-import/build-testsuite.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/build/ant-import/build-testsuite.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -378,7 +378,7 @@
<!-- Run samples test cases -->
<target name="tests-smoke" depends="tests-init" description="Run samples unit tests">
<antcall target="tests-run-internal">
- <param name="include.wildcard" value="org/jboss/test/ws/*/samples/**/*TestCase.class org/jboss/test/ws/*/smoke/**/*TestCase.class"/>
+ <param name="include.wildcard" value="org/jboss/test/ws/jaxws/samples/**/*TestCase.class org/jboss/test/ws/*/smoke/**/*TestCase.class"/>
<param name="exclude.wildcard" value="org/jboss/test/ws/*/samples/jaxr/**"/>
<!--
According to our commit policy, haltonfailure MUST be be true for tests-samples.
Modified: trunk/integration/sunri/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/sunri/ant-import/build-thirdparty.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/integration/sunri/ant-import/build-thirdparty.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -46,6 +46,7 @@
<get src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar" dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss42.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42-resources.zip" dest="${thirdparty.dir}/jbossws-jboss42-resources.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50.jar" dest="${thirdparty.dir}/jbossws-jboss50.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50-deployer.zip" dest="${thirdparty.dir}/jbossws-jboss50-deployer.zip" 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"/>
Modified: trunk/integration/sunri/ant-import/macros-deploy-sunri.xml
===================================================================
--- trunk/integration/sunri/ant-import/macros-deploy-sunri.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/integration/sunri/ant-import/macros-deploy-sunri.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -113,19 +113,16 @@
<macrodef name="macro-deploy-sunri42">
<attribute name="wsflibs"/>
- <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="@{jbosslibs}">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
<fileset dir="@{stacklibs}">
<include name="jbossws-sunri-client.jar"/>
</fileset>
<fileset dir="@{thirdpartylibs}">
+ <include name="jbossws-jboss42.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jaxb-xjc.jar"/>
@@ -146,7 +143,7 @@
</fileset>
</copy>
<copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
- <fileset dir="@{jbosslibs}">
+ <fileset dir="@{thirdpartylibs}">
<include name="jbossws-jboss42.jar"/>
</fileset>
</copy>
Modified: trunk/integration/sunri/build.xml
===================================================================
--- trunk/integration/sunri/build.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/integration/sunri/build.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -193,13 +193,15 @@
<target name="jars-jboss42" depends="jars-common" if="jboss42.home">
+ <unzip dest="${sunri.output.dir}/resources" src="${thirdparty.dir}/jbossws-jboss42-resources.zip"/>
+
<!-- Concat jboss-beans.xml -->
<concat destfile="${sunri.output.lib.dir}/jbossws-sunri42/jbossws.beans/META-INF/jboss-beans.xml">
<header trimleading="yes">
<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">
</header>
<fileset file="${sunri.resources.dir}/jbossws-sunri-config.xml"/>
- <fileset file="${int.jboss42.dir}/src/main/resources/jbossws-jboss42-config.xml"/>
+ <fileset file="${sunri.output.dir}/resources/jbossws-jboss42-config.xml"/>
<footer trimleading="yes">
</deployment>
</footer>
@@ -238,7 +240,7 @@
<fileset dir="${sunri.output.lib.dir}/jbossws-sunri42">
<include name="jbossws.beans/**"/>
</fileset>
- <metainf dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
+ <metainf dir="${sunri.output.dir}/resources/jbossws-jboss42.sar/META-INF">
<include name="jboss-service.xml"/>
</metainf>
</jar>
Modified: trunk/integration/xfire/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/xfire/ant-import/build-thirdparty.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/integration/xfire/ant-import/build-thirdparty.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -61,6 +61,7 @@
<get src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar" dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss42.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42-resources.zip" dest="${thirdparty.dir}/jbossws-jboss42-resources.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50.jar" dest="${thirdparty.dir}/jbossws-jboss50.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50-deployer.zip" dest="${thirdparty.dir}/jbossws-jboss50-deployer.zip" 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"/>
Modified: trunk/integration/xfire/ant-import/macros-deploy-xfire.xml
===================================================================
--- trunk/integration/xfire/ant-import/macros-deploy-xfire.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/integration/xfire/ant-import/macros-deploy-xfire.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -97,7 +97,6 @@
<macrodef name="macro-deploy-xfire42">
<attribute name="wsflibs"/>
- <attribute name="jbosslibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
<sequential>
@@ -108,10 +107,8 @@
<fileset dir="@{wsflibs}">
<include name="jbossws-framework.jar"/>
</fileset>
- <fileset dir="@{jbosslibs}">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
<fileset dir="@{thirdpartylibs}">
+ <include name="jbossws-jboss42.jar"/>
<include name="jbossws-spi.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
@@ -130,7 +127,7 @@
<!--SERVER JARS -->
<copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
- <fileset dir="@{jbosslibs}">
+ <fileset dir="@{thirdpartylibs}">
<include name="jbossws-jboss42.jar"/>
</fileset>
</copy>
Modified: trunk/integration/xfire/build.xml
===================================================================
--- trunk/integration/xfire/build.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/integration/xfire/build.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -184,13 +184,15 @@
<target name="jars-jboss42" depends="jars-common" if="jboss42.home">
+ <unzip dest="${xfire.output.dir}/resources" src="${thirdparty.dir}/jbossws-jboss42-resources.zip"/>
+
<!-- Concat jboss-beans.xml -->
<concat destfile="${xfire.output.lib.dir}/jbossws-xfire42/jbossws.beans/META-INF/jboss-beans.xml">
<header trimleading="yes">
<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">
</header>
<fileset file="${xfire.resources.dir}/jbossws-xfire-config.xml"/>
- <fileset file="${int.jboss42.dir}/src/main/resources/jbossws-jboss42-config.xml"/>
+ <fileset file="${xfire.output.dir}/resources/jbossws-jboss42-config.xml"/>
<footer trimleading="yes">
</deployment>
</footer>
@@ -231,7 +233,7 @@
<fileset dir="${xfire.output.lib.dir}/jbossws-xfire42">
<include name="jbossws.beans/**"/>
</fileset>
- <metainf dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
+ <metainf dir="${xfire.output.dir}/resources/jbossws-jboss42.sar/META-INF">
<include name="jboss-service.xml"/>
</metainf>
</jar>
Modified: trunk/jbossws-core/ant-import/build-thirdparty.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -70,7 +70,9 @@
<get src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar" dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss40/${jbossws-jboss40}/lib/jbossws-jboss40.jar" dest="${thirdparty.dir}/jbossws-jboss40.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-jboss40/${jbossws-jboss40}/lib/jbossws-jboss40-resources.zip" dest="${thirdparty.dir}/jbossws-jboss40-resources.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss42.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42-resources.zip" dest="${thirdparty.dir}/jbossws-jboss42-resources.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50.jar" dest="${thirdparty.dir}/jbossws-jboss50.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50-deployer.zip" dest="${thirdparty.dir}/jbossws-jboss50-deployer.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
Modified: trunk/jbossws-core/ant-import/macros-deploy-native.xml
===================================================================
--- trunk/jbossws-core/ant-import/macros-deploy-native.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/jbossws-core/ant-import/macros-deploy-native.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -124,7 +124,6 @@
<macrodef name="macro-deploy-native42">
<attribute name="wsflibs"/>
- <attribute name="jbosslibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
<sequential>
@@ -136,9 +135,6 @@
<!-- CLIENT JARS -->
<copy todir="${jboss42.home}/client" overwrite="true">
- <fileset dir="@{jbosslibs}">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
<fileset dir="@{stacklibs}">
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
@@ -146,6 +142,7 @@
<include name="jbossws-client.jar"/>
</fileset>
<fileset dir="@{thirdpartylibs}">
+ <include name="jbossws-jboss42.jar"/>
<include name="policy.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
@@ -160,7 +157,7 @@
<!-- SERVER JARS -->
<copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
- <fileset dir="@{jbosslibs}">
+ <fileset dir="@{thirdpartylibs}">
<include name="jbossws-jboss42.jar"/>
</fileset>
</copy>
@@ -229,7 +226,6 @@
<macrodef name="macro-deploy-native40">
<attribute name="wsflibs"/>
- <attribute name="jbosslibs"/>
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
<sequential>
@@ -247,9 +243,6 @@
<!-- CLIENT JARS -->
<copy todir="${jboss40.home}/client" overwrite="true">
- <fileset dir="@{jbosslibs}">
- <include name="jbossws-jboss40.jar"/>
- </fileset>
<fileset dir="@{stacklibs}">
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
@@ -257,6 +250,7 @@
<include name="jbossws-client.jar"/>
</fileset>
<fileset dir="@{thirdpartylibs}">
+ <include name="jbossws-jboss40.jar"/>
<include name="policy.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
@@ -274,15 +268,13 @@
<!-- SERVER JARS -->
<copy todir="${jboss40.home}/server/${jboss.server.instance}/lib" overwrite="true">
- <fileset dir="@{jbosslibs}">
- <include name="jbossws-jboss40.jar"/>
- </fileset>
<fileset dir="@{stacklibs}">
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
</fileset>
<fileset dir="@{thirdpartylibs}">
+ <include name="jbossws-jboss40.jar"/>
<include name="wsdl4j.jar"/>
</fileset>
Modified: trunk/jbossws-core/build.xml
===================================================================
--- trunk/jbossws-core/build.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/jbossws-core/build.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -246,13 +246,15 @@
<target name="jars-jboss42" depends="jars-common" if="jboss42.home">
+ <unzip dest="${core.output.dir}/resources" src="${thirdparty.dir}/jbossws-jboss42-resources.zip"/>
+
<!-- Concat jboss-beans.xml -->
<concat destfile="${core.output.lib.dir}/jbossws-native42/jbossws.beans/META-INF/jboss-beans.xml">
<header trimleading="yes">
<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">
</header>
<fileset file="${core.resources.dir}/jbossws-native-config.xml"/>
- <fileset file="${int.jboss42.dir}/src/main/resources/jbossws-jboss42-config.xml"/>
+ <fileset file="${core.output.dir}/resources/jbossws-jboss42-config.xml"/>
<footer trimleading="yes">
</deployment>
</footer>
@@ -283,7 +285,7 @@
<fileset dir="${core.output.lib.dir}/jbossws-native42">
<include name="jbossws.beans/**"/>
</fileset>
- <metainf dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
+ <metainf dir="${core.output.dir}/resources/jbossws-jboss42.sar/META-INF">
<include name="jboss-service.xml"/>
</metainf>
<metainf dir="${core.dir}/src/main/resources/standard-config">
@@ -294,13 +296,15 @@
<target name="jars-jboss40" depends="jars-common" if="jboss40.home">
+ <unzip dest="${core.output.dir}/resources" src="${thirdparty.dir}/jbossws-jboss40-resources.zip"/>
+
<!-- Concat jboss-beans.xml -->
<concat destfile="${core.output.lib.dir}/jbossws-native40/jbossws.beans/META-INF/jboss-beans.xml">
<header trimleading="yes">
<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">
</header>
<fileset file="${core.resources.dir}/jbossws-native-config.xml"/>
- <fileset file="${int.jboss40.dir}/src/main/resources/jbossws-jboss40-config.xml"/>
+ <fileset file="${core.output.dir}/resources/jbossws-jboss40-config.xml"/>
<footer trimleading="yes">
</deployment>
</footer>
@@ -328,7 +332,9 @@
<fileset dir="${core.output.lib.dir}/jbossws-native40">
<include name="jbossws.beans/**"/>
</fileset>
- <metainf dir="${int.jboss40.dir}/src/main/resources/jbossws-jboss40.sar/META-INF"/>
+ <metainf dir="${core.output.dir}/resources/jbossws-jboss40.sar/META-INF">
+ <include name="jboss-service.xml"/>
+ </metainf>
<metainf dir="${core.dir}/src/main/resources/standard-config">
<include name="standard-*-config.xml"/>
</metainf>
Modified: trunk/testsuite/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-08-02 20:42:11 UTC (rev 4121)
@@ -202,15 +202,15 @@
</metainf>
</jar>
- <!-- jaxws-serviceref -->
- <war warfile="${tests.output.dir}/libs/jaxws-serviceref.war" webxml="${tests.output.dir}/resources/jaxws/samples/serviceref/WEB-INF/web.xml">
+ <!-- jaxws-samples-serviceref -->
+ <war warfile="${tests.output.dir}/libs/jaxws-samples-serviceref.war" webxml="${tests.output.dir}/resources/jaxws/samples/serviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointImpl.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpoint.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.class"/>
</classes>
</war>
- <jar destfile="${tests.output.dir}/libs/jaxws-serviceref-client.jar">
+ <jar destfile="${tests.output.dir}/libs/jaxws-samples-serviceref-client.jar">
<fileset dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/samples/serviceref/ApplicationClient.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.class"/>
@@ -222,7 +222,7 @@
<include name="wsdl/**"/>
</metainf>
</jar>
- <war destfile="${tests.output.dir}/libs/jaxws-serviceref-servlet-client.war" webxml="${tests.output.dir}/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml">
+ <war destfile="${tests.output.dir}/libs/jaxws-samples-serviceref-servlet-client.war" webxml="${tests.output.dir}/resources/jaxws/samples/serviceref/servlet-client/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/samples/serviceref/ServletClient.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.class"/>
@@ -235,7 +235,7 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
- <jar destfile="${tests.output.dir}/libs/jaxws-serviceref-ejb-client.jar">
+ <jar destfile="${tests.output.dir}/libs/jaxws-samples-serviceref-ejb-client.jar">
<fileset dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/samples/serviceref/EJBClient.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/EJBRemote.class"/>
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java 2007-08-02 20:42:11 UTC (rev 4121)
@@ -43,13 +43,13 @@
*/
public class ServiceRefClientTestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-serviceref";
public static Test suite()
{
- String archives = "jaxws-serviceref.war";
+ String archives = "jaxws-samples-serviceref.war";
if (new JBossWSTestHelper().isTargetJBoss50())
- archives += ",jaxws-serviceref-client.jar";
+ archives += ",jaxws-samples-serviceref-client.jar";
return new JBossWSTestSetup(ServiceRefClientTestCase.class, archives);
}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java 2007-08-02 20:42:11 UTC (rev 4121)
@@ -41,13 +41,13 @@
*/
public class ServiceRefEJBTestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-serviceref";
public static Test suite()
{
- String archives = "jaxws-serviceref.war";
+ String archives = "jaxws-samples-serviceref.war";
if (new JBossWSTestHelper().isTargetJBoss50())
- archives += ",jaxws-serviceref-ejb-client.jar";
+ archives += ",jaxws-samples-serviceref-ejb-client.jar";
return new JBossWSTestSetup(ServiceRefEJBTestCase.class, archives);
}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java 2007-08-02 20:42:11 UTC (rev 4121)
@@ -42,13 +42,13 @@
*/
public class ServiceRefServletTestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-serviceref";
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-serviceref";
public static Test suite()
{
- String archives = "jaxws-serviceref.war";
+ String archives = "jaxws-samples-serviceref.war";
if (new JBossWSTestHelper().isTargetJBoss50())
- archives += ",jaxws-serviceref-servlet-client.war";
+ archives += ",jaxws-samples-serviceref-servlet-client.war";
return new JBossWSTestSetup(ServiceRefServletTestCase.class, archives);
}
Modified: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java 2007-08-02 20:19:44 UTC (rev 4120)
+++ trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/TestEndpointService.java 2007-08-02 20:42:11 UTC (rev 4121)
@@ -21,7 +21,7 @@
* JAX-WS Version: 2.0
*
*/
-@WebServiceClient(name = "TestEndpointService", targetNamespace = "http://serviceref.samples.jaxws.ws.test.jboss.org/", wsdlLocation = "http://tddell:8080/jaxws-serviceref?wsdl")
+@WebServiceClient(name = "TestEndpointService", targetNamespace = "http://serviceref.samples.jaxws.ws.test.jboss.org/", wsdlLocation = "http://tddell:8080/jaxws-samples-serviceref?wsdl")
public class TestEndpointService
extends Service
{
@@ -31,7 +31,7 @@
static {
URL url = null;
try {
- url = new URL("http://tddell:8080/jaxws-serviceref?wsdl");
+ url = new URL("http://tddell:8080/jaxws-samples-serviceref?wsdl");
} catch (MalformedURLException e) {
e.printStackTrace();
}
17 years, 4 months
JBossWS SVN: r4120 - in container: jboss40/trunk/ant-import and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-02 16:19:44 -0400 (Thu, 02 Aug 2007)
New Revision: 4120
Modified:
container/jboss40/trunk/ant-import/build-release.xml
container/jboss40/trunk/build.xml
container/jboss42/trunk/ant-import/build-release.xml
container/jboss42/trunk/build.xml
Log:
Add resources.zip
Modified: container/jboss40/trunk/ant-import/build-release.xml
===================================================================
--- container/jboss40/trunk/ant-import/build-release.xml 2007-08-02 18:40:08 UTC (rev 4119)
+++ container/jboss40/trunk/ant-import/build-release.xml 2007-08-02 20:19:44 UTC (rev 4120)
@@ -24,6 +24,7 @@
<fileset dir="${jbws40.dir}/output/lib">
<include name="jbossws-jboss40.jar"/>
<include name="jbossws-jboss40-src.zip"/>
+ <include name="jbossws-jboss40-resources.zip"/>
</fileset>
</copy>
<copy tofile="${jboss.repository.dir}/jbossws-jboss40/${repository.id}/component-info.xml" file="${jbws40.etc.dir}/component-info.xml" filtering="true" overwrite="true">
Modified: container/jboss40/trunk/build.xml
===================================================================
--- container/jboss40/trunk/build.xml 2007-08-02 18:40:08 UTC (rev 4119)
+++ container/jboss40/trunk/build.xml 2007-08-02 20:19:44 UTC (rev 4120)
@@ -107,7 +107,12 @@
<metainf dir="${jbws40.resources.dir}/jbossws-jboss40.jar/META-INF"/>
</jar>
- <!-- Build jbossws40-src.zip -->
+ <!-- Build jbossws-jboss40-resources.zip -->
+ <zip zipfile="${jbws40.output.lib.dir}/jbossws-jboss40-resources.zip" >
+ <fileset dir="${jbws40.resources.dir}"/>
+ </zip>
+
+ <!-- Build jbossws-jboss40-src.zip -->
<zip zipfile="${jbws40.output.lib.dir}/jbossws-jboss40-src.zip" >
<fileset dir="${jbws40.java.dir}"/>
</zip>
Modified: container/jboss42/trunk/ant-import/build-release.xml
===================================================================
--- container/jboss42/trunk/ant-import/build-release.xml 2007-08-02 18:40:08 UTC (rev 4119)
+++ container/jboss42/trunk/ant-import/build-release.xml 2007-08-02 20:19:44 UTC (rev 4120)
@@ -24,6 +24,7 @@
<fileset dir="${jbws42.dir}/output/lib">
<include name="jbossws-jboss42.jar"/>
<include name="jbossws-jboss42-src.zip"/>
+ <include name="jbossws-jboss42-resources.zip"/>
</fileset>
</copy>
<copy tofile="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/component-info.xml" file="${jbws42.etc.dir}/component-info.xml" filtering="true" overwrite="true">
Modified: container/jboss42/trunk/build.xml
===================================================================
--- container/jboss42/trunk/build.xml 2007-08-02 18:40:08 UTC (rev 4119)
+++ container/jboss42/trunk/build.xml 2007-08-02 20:19:44 UTC (rev 4120)
@@ -108,7 +108,12 @@
<metainf dir="${jbws42.resources.dir}/jbossws-jboss42.jar/META-INF"/>
</jar>
- <!-- Build jbossws42-src.zip -->
+ <!-- Build jbossws-jboss42-resources.zip -->
+ <zip zipfile="${jbws42.output.lib.dir}/jbossws-jboss42-resources.zip" >
+ <fileset dir="${jbws42.resources.dir}"/>
+ </zip>
+
+ <!-- Build jbossws-jboss42-src.zip -->
<zip zipfile="${jbws42.output.lib.dir}/jbossws-jboss42-src.zip" >
<fileset dir="${jbws42.java.dir}"/>
</zip>
17 years, 4 months
JBossWS SVN: r4119 - in trunk: build/ant-import and 19 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-02 14:40:08 -0400 (Thu, 02 Aug 2007)
New Revision: 4119
Removed:
trunk/integration/jboss40/
trunk/integration/jboss42/
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ResourceLoaderAdapter.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLLoaderAdapter.java
Modified:
trunk/build/ant-import/build-release.xml
trunk/build/ant-import/build-setup.xml
trunk/build/build.xml
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
trunk/integration/sunri/ant-import/build-bin-dist.xml
trunk/integration/sunri/ant-import/build-deploy.xml
trunk/integration/sunri/ant-import/build-thirdparty.xml
trunk/integration/sunri/build.xml
trunk/integration/sunri/version.properties
trunk/integration/xfire/ant-import/build-bin-dist.xml
trunk/integration/xfire/ant-import/build-deploy.xml
trunk/integration/xfire/ant-import/build-thirdparty.xml
trunk/integration/xfire/build.xml
trunk/integration/xfire/version.properties
trunk/jbossws-core/ant-import/build-bin-dist.xml
trunk/jbossws-core/ant-import/build-deploy.xml
trunk/jbossws-core/ant-import/build-thirdparty.xml
trunk/jbossws-core/build.xml
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java
trunk/jbossws-core/version.properties
Log:
partial commit. pls use jboss50 integration
Modified: trunk/build/ant-import/build-release.xml
===================================================================
--- trunk/build/ant-import/build-release.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/build/ant-import/build-release.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -38,10 +38,6 @@
<target name="release-to-repository" depends="prepare" description="Release to local repository">
<ant antfile="${framework.dir}/build.xml" target="release" inheritall="false"/>
<ant antfile="${core.dir}/build.xml" target="release" inheritall="false"/>
- <ant antfile="${int.jboss50.dir}/build.xml" target="release" inheritall="false"/>
- <ant antfile="${int.jboss42.dir}/build.xml" target="release" inheritall="false"/>
- <ant antfile="${int.jboss40.dir}/build.xml" target="release" inheritall="false"/>
- <ant antfile="${int.native.dir}/build.xml" target="release" inheritall="false"/>
<ant antfile="${int.sunri.dir}/build.xml" target="release" inheritall="false"/>
<ant antfile="${int.xfire.dir}/build.xml" target="release" inheritall="false"/>
</target>
Modified: trunk/build/ant-import/build-setup.xml
===================================================================
--- trunk/build/ant-import/build-setup.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/build/ant-import/build-setup.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -21,8 +21,6 @@
<property name="framework.dir" value="${basedir}/integration/spi"/>
<property name="core.dir" value="${basedir}/jbossws-core"/>
<property name="testsuite.dir" value="${basedir}/testsuite"/>
- <property name="int.jboss42.dir" value="${basedir}/integration/jboss42"/>
- <property name="int.jboss40.dir" value="${basedir}/integration/jboss40"/>
<property name="int.sunri.dir" value="${basedir}/integration/sunri"/>
<property name="int.xfire.dir" value="${basedir}/integration/xfire"/>
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/build/build.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -125,8 +125,6 @@
<delete dir="${build.dir}/output"/>
<ant antfile="${framework.dir}/build.xml" target="clean" inheritall="false"/>
<ant antfile="${core.dir}/build.xml" target="clean" inheritall="false"/>
- <ant antfile="${int.jboss42.dir}/build.xml" target="clean" inheritall="false"/>
- <ant antfile="${int.jboss40.dir}/build.xml" target="clean" inheritall="false"/>
<ant antfile="${testsuite.dir}/build.xml" target="clean" inheritall="false"/>
<ant antfile="${int.sunri.dir}/build.xml" target="clean" inheritall="false"/>
<ant antfile="${int.xfire.dir}/build.xml" target="clean" inheritall="false"/>
@@ -137,8 +135,6 @@
<ant antfile="${framework.dir}/build.xml" target="clobber" inheritall="false"/>
<ant antfile="${core.dir}/build.xml" target="clobber" inheritall="false"/>
<ant antfile="${testsuite.dir}/build.xml" target="clobber" inheritall="false"/>
- <ant antfile="${int.jboss42.dir}/build.xml" target="clobber" inheritall="false"/>
- <ant antfile="${int.jboss40.dir}/build.xml" target="clobber" inheritall="false"/>
<ant antfile="${int.sunri.dir}/build.xml" target="clobber" inheritall="false"/>
<ant antfile="${int.xfire.dir}/build.xml" target="clobber" inheritall="false"/>
</target>
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -23,6 +23,7 @@
//$Id: EndpointAddressDeploymentAspect.java 4018 2007-07-27 06:31:03Z thomas.diesler(a)jboss.com $
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ResourceLoaderAdapter.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ResourceLoaderAdapter.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ResourceLoaderAdapter.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -1,118 +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.wsf.framework.deployment;
-
-// $Id: ResourceLoaderAdapter.java 3137 2007-05-18 13:41:57Z thomas.diesler(a)jboss.com $
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-
-
-/**
- * The default file adapter loads resources through an associated classloader.
- * If no classload is set, the the thread context classloader will be used.
- *
- * @author Heiko.Braun(a)jboss.org
- * @since 25.01.2007
- */
-public class ResourceLoaderAdapter implements UnifiedVirtualFile
-{
- private URL resourceURL;
- private ClassLoader loader;
-
- public ResourceLoaderAdapter()
- {
- this(Thread.currentThread().getContextClassLoader());
- }
-
- public ResourceLoaderAdapter(ClassLoader loader)
- {
- this.loader = loader;
- }
-
- private ResourceLoaderAdapter(ClassLoader loader, URL resourceURL)
- {
- this.resourceURL = resourceURL;
- this.loader = loader;
- }
-
- public UnifiedVirtualFile findChild(String resourcePath) throws IOException
- {
- URL resourceURL = null;
- if (resourcePath != null)
- {
- // Try the child as URL
- try
- {
- resourceURL = new URL(resourcePath);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try the filename as File
- if (resourceURL == null)
- {
- try
- {
- File file = new File(resourcePath);
- if (file.exists())
- resourceURL = file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- // Try the filename as Resource
- if (resourceURL == null)
- {
- try
- {
- resourceURL = loader.getResource(resourcePath);
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
- }
-
- if (resourceURL == null)
- throw new IOException("Cannot get URL for: " + resourcePath);
-
- return new ResourceLoaderAdapter(loader, resourceURL);
- }
-
- public URL toURL()
- {
- if (null == this.resourceURL)
- throw new IllegalStateException("UnifiedVirtualFile not initialized");
- return resourceURL;
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLLoaderAdapter.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLLoaderAdapter.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLLoaderAdapter.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -1,127 +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.wsf.framework.deployment;
-
-// $Id: URLLoaderAdapter.java 3830 2007-07-09 17:01:33Z heiko.braun(a)jboss.com $
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-
-
-/**
- * Load resources through a URLClassLoader.<br>
- * NOTE: The associated classloader doesn't do parent delegation.
- *
- *
- * @author Heiko.Braun(a)jboss.org
- * @since 25.01.2007
- */
-public class URLLoaderAdapter implements UnifiedVirtualFile
-{
- private URL rootURL;
- private URL resourceURL;
- private transient URLClassLoader loader;
-
- public URLLoaderAdapter(URL rootURL)
- {
- this.rootURL = rootURL;
- }
-
- private URLLoaderAdapter(URL rootURL, URLClassLoader loader, URL resourceURL)
- {
- this.rootURL = rootURL;
- this.resourceURL = resourceURL;
- this.loader = loader;
- }
-
- public UnifiedVirtualFile findChild(String resourcePath) throws IOException
- {
- URL resourceURL = null;
- if (resourcePath != null)
- {
- // Try the child as URL
- try
- {
- resourceURL = new URL(resourcePath);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try the filename as File
- if (resourceURL == null)
- {
- try
- {
- File file = new File(resourcePath);
- if (file.exists())
- resourceURL = file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- // Try the filename as Resource
- if (resourceURL == null)
- {
- try
- {
- resourceURL = getResourceLoader().getResource(resourcePath);
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
- }
-
- if (resourceURL == null)
- throw new IOException("Cannot get URL for: " + resourcePath);
-
- return new URLLoaderAdapter(rootURL, loader, resourceURL);
- }
-
- public URL toURL()
- {
- if (resourceURL != null)
- return resourceURL;
- else
- return rootURL;
- }
-
- private URLClassLoader getResourceLoader()
- {
- if (loader == null)
- {
- loader = new URLClassLoader(new URL[] { rootURL });
- }
- return loader;
- }
-}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/serviceref/DefaultServiceRefHandler.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -32,7 +32,7 @@
import javax.naming.NamingException;
import org.jboss.logging.Logger;
-import org.jboss.wsf.framework.deployment.URLLoaderAdapter;
+import org.jboss.wsf.common.URLLoaderAdapter;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.WSFException;
Modified: trunk/integration/sunri/ant-import/build-bin-dist.xml
===================================================================
--- trunk/integration/sunri/ant-import/build-bin-dist.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/sunri/ant-import/build-bin-dist.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -19,9 +19,6 @@
<target name="build-bin-dist" depends="jars,javadoc" description="Build the binary distribution">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars" inheritall="false"/>
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars" inheritall="false"/>
-
<property name="bindist.dir" value="${sunri.output.dir}/jbossws-sunri-${version.id}"/>
<property name="bindist.bin.dir" value="${bindist.dir}/bin"/>
<property name="bindist.build.dir" value="${bindist.dir}/build"/>
@@ -103,13 +100,6 @@
<include name="getopt.jar"/>
<include name="wsdl4j.jar"/>
</fileset>
- <fileset dir="${int.jboss42.dir}/output/lib">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
- <fileset dir="${int.jboss50.dir}/output/lib">
- <include name="jbossws-jboss50.jar"/>
- <include name="jbossws-jboss50-deployer.zip"/>
- </fileset>
<fileset dir="${int.sunri.dir}/output/lib">
<include name="jbossws-context.war"/>
<include name="jbossws-sunri42.sar"/>
Modified: trunk/integration/sunri/ant-import/build-deploy.xml
===================================================================
--- trunk/integration/sunri/ant-import/build-deploy.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/sunri/ant-import/build-deploy.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -47,7 +47,6 @@
<ant antfile="${int.xfire.dir}/build.xml" target="undeploy-jboss42" inheritall="false"/>
<macro-deploy-sunri42
wsflibs="${framework.dir}/output/lib"
- jbosslibs="${int.jboss42.dir}/output/lib"
stacklibs="${int.sunri.dir}/output/lib"
thirdpartylibs="${int.sunri.dir}/thirdparty"/>
Modified: trunk/integration/sunri/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/sunri/ant-import/build-thirdparty.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/sunri/ant-import/build-thirdparty.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -45,6 +45,7 @@
<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}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar" dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss42.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50.jar" dest="${thirdparty.dir}/jbossws-jboss50.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50-deployer.zip" dest="${thirdparty.dir}/jbossws-jboss50-deployer.zip" 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"/>
@@ -95,7 +96,6 @@
<!-- The compile classpath for jboss50 integration -->
<path id="sunri50.integration.classpath">
<path refid="sunri.integration.classpath"/>
- <pathelement location="${int.jboss50.dir}/output/lib/jbossws-jboss50.jar"/>
<pathelement location="${jboss50.server.lib}/jboss.jar"/>
</path>
Modified: trunk/integration/sunri/build.xml
===================================================================
--- trunk/integration/sunri/build.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/sunri/build.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -193,8 +193,6 @@
<target name="jars-jboss42" depends="jars-common" if="jboss42.home">
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars" inheritall="false"/>
-
<!-- Concat jboss-beans.xml -->
<concat destfile="${sunri.output.lib.dir}/jbossws-sunri42/jbossws.beans/META-INF/jboss-beans.xml">
<header trimleading="yes">
@@ -215,13 +213,11 @@
<fileset dir="${framework.dir}/thirdparty">
<include name="jaxrpc-api.jar"/>
</fileset>
- <fileset dir="${int.jboss42.dir}/output/lib">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
<fileset dir="${sunri.output.lib.dir}">
<include name="jbossws-sunri.jar"/>
</fileset>
<fileset dir="${thirdparty.dir}">
+ <include name="jbossws-jboss42.jar"/>
<include name="FastInfoset.jar"/>
<include name="http.jar"/>
<include name="jaxb-api.jar"/>
@@ -272,11 +268,7 @@
</packageset>
<packageset dir="${framework.dir}/src/main/java">
<include name="org/jboss/wsf/**"/>
- <include name="org/jboss/ws/**"/>
</packageset>
- <packageset dir="${int.jboss50.dir}/src/main/java">
- <include name="org/jboss/wsf/**"/>
- </packageset>
<doctitle><![CDATA[<h1>JBoss Web Service Framework ${version.id} - Stack integration Sun-RI</h1>]]></doctitle>
<tag name="todo" scope="all" description="To do:"/>
Modified: trunk/integration/sunri/version.properties
===================================================================
--- trunk/integration/sunri/version.properties 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/sunri/version.properties 2007-08-02 18:40:08 UTC (rev 4119)
@@ -7,6 +7,7 @@
jbossws-common=2.0.1.CR1
jbossws-spi=2.0.1.CR1
jbossws-jboss50=2.0.1.CR1
+jbossws-jboss42=2.0.1.CR1
jboss-security-spi=2.0.0.Beta
sun-jaxws=2.1.1
Modified: trunk/integration/xfire/ant-import/build-bin-dist.xml
===================================================================
--- trunk/integration/xfire/ant-import/build-bin-dist.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/xfire/ant-import/build-bin-dist.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -19,9 +19,6 @@
<target name="build-bin-dist" depends="jars,javadoc" description="Build the binary distribution">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars" inheritall="false"/>
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars" inheritall="false"/>
-
<property name="bindist.dir" value="${xfire.output.dir}/jbossws-xfire-${version.id}"/>
<property name="bindist.bin.dir" value="${bindist.dir}/bin"/>
<property name="bindist.build.dir" value="${bindist.dir}/build"/>
@@ -104,13 +101,6 @@
<include name="getopt.jar"/>
<include name="wsdl4j.jar"/>
</fileset>
- <fileset dir="${int.jboss42.dir}/output/lib">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
- <fileset dir="${int.jboss50.dir}/output/lib">
- <include name="jbossws-jboss50.jar"/>
- <include name="jbossws-jboss50-deployer.zip"/>
- </fileset>
<fileset dir="${int.xfire.dir}/output/lib">
<include name="jbossws-context.war"/>
<include name="jbossws-xfire42.sar"/>
Modified: trunk/integration/xfire/ant-import/build-deploy.xml
===================================================================
--- trunk/integration/xfire/ant-import/build-deploy.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/xfire/ant-import/build-deploy.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -47,7 +47,6 @@
<ant antfile="${int.sunri.dir}/build.xml" target="undeploy-jboss42" inheritall="false"/>
<macro-deploy-xfire42
wsflibs="${framework.dir}/output/lib"
- jbosslibs="${int.jboss42.dir}/output/lib"
stacklibs="${int.xfire.dir}/output/lib"
thirdpartylibs="${int.xfire.dir}/thirdparty"/>
Modified: trunk/integration/xfire/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/xfire/ant-import/build-thirdparty.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/xfire/ant-import/build-thirdparty.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -60,6 +60,7 @@
<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}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar" dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss42.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50.jar" dest="${thirdparty.dir}/jbossws-jboss50.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50-deployer.zip" dest="${thirdparty.dir}/jbossws-jboss50-deployer.zip" 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"/>
Modified: trunk/integration/xfire/build.xml
===================================================================
--- trunk/integration/xfire/build.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/xfire/build.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -184,8 +184,6 @@
<target name="jars-jboss42" depends="jars-common" if="jboss42.home">
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars" inheritall="false"/>
-
<!-- Concat jboss-beans.xml -->
<concat destfile="${xfire.output.lib.dir}/jbossws-xfire42/jbossws.beans/META-INF/jboss-beans.xml">
<header trimleading="yes">
@@ -206,13 +204,11 @@
<fileset dir="${framework.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="jbossws-jboss42.jar"/>
<include name="cxf-incubator.jar"/>
<include name="geronimo-ws-metadata.jar"/>
<include name="jaxb-api.jar"/>
@@ -266,9 +262,6 @@
<include name="org/jboss/wsf/**"/>
<include name="org/jboss/ws/**"/>
</packageset>
- <packageset dir="${int.jboss50.dir}/src/main/java">
- <include name="org/jboss/wsf/**"/>
- </packageset>
<doctitle><![CDATA[<h1>JBoss Web Service Framework ${version.id} - Stack integration XFire</h1>]]></doctitle>
<tag name="todo" scope="all" description="To do:"/>
<!--group title="Native SOAP stack" packages="org.jboss.ws,org.jboss.ws.core*, org.jboss.ws.metadata*, org.jboss.ws.extensions*, org.jboss.ws.tools*, org.jboss.ws.annotation*, org.jboss.ws.jaxrpc*, org.jboss.ws.soap*"/-->
Modified: trunk/integration/xfire/version.properties
===================================================================
--- trunk/integration/xfire/version.properties 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/integration/xfire/version.properties 2007-08-02 18:40:08 UTC (rev 4119)
@@ -7,6 +7,7 @@
jbossws-common=2.0.1.CR1
jbossws-spi=2.0.1.CR1
jbossws-jboss50=2.0.1.CR1
+jbossws-jboss42=2.0.1.CR1
apache-cxf=2.0
apache-xml-commons=1.2
Modified: trunk/jbossws-core/ant-import/build-bin-dist.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-bin-dist.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/ant-import/build-bin-dist.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -113,16 +113,6 @@
<include name="jbossws-framework.jar"/>
<include name="jbossws-framework-scripts.zip"/>
</fileset>
- <fileset dir="${int.jboss50.dir}/output/lib">
- <include name="jbossws-jboss50.jar"/>
- <include name="jbossws-jboss50-deployer.zip"/>
- </fileset>
- <fileset dir="${int.jboss42.dir}/output/lib">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
- <fileset dir="${int.jboss40.dir}/output/lib">
- <include name="jbossws-jboss40.jar"/>
- </fileset>
<fileset dir="${core.dir}/output/lib">
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
@@ -138,6 +128,10 @@
<include name="jbossws-native50.sar"/>
</fileset>
<fileset dir="${core.dir}/thirdparty">
+ <include name="jbossws-jboss50.jar"/>
+ <include name="jbossws-jboss50-deployer.zip"/>
+ <include name="jbossws-jboss42.jar"/>
+ <include name="jbossws-jboss40.jar"/>
<include name="juddi-service.sar"/>
<include name="policy.jar"/>
<include name="getopt.jar"/>
Modified: trunk/jbossws-core/ant-import/build-deploy.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-deploy.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/ant-import/build-deploy.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -62,7 +62,6 @@
<ant antfile="${int.xfire.dir}/build.xml" target="undeploy-jboss42" inheritall="false"/>
<macro-deploy-native42
wsflibs="${framework.dir}/output/lib"
- jbosslibs="${int.jboss42.dir}/output/lib"
stacklibs="${core.dir}/output/lib"
thirdpartylibs="${core.dir}/thirdparty"/>
<macro-deploy-wsf
@@ -99,7 +98,6 @@
<target name="deploy-jboss40-ejb3">
<macro-deploy-native40
wsflibs="${framework.dir}/output/lib"
- jbosslibs="${int.jboss40.dir}/output/lib"
stacklibs="${core.dir}/output/lib"
thirdpartylibs="${core.dir}/thirdparty"/>
<macro-deploy-wsf
Modified: trunk/jbossws-core/ant-import/build-thirdparty.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -69,6 +69,8 @@
<get src="${jboss.repository}/jboss/jboss-vfs/${jboss-vfs}/lib/jboss-vfs-sources.jar" dest="${thirdparty.dir}/jboss-vfs-sources.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar" dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-jboss40/${jbossws-jboss40}/lib/jbossws-jboss40.jar" dest="${thirdparty.dir}/jbossws-jboss40.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss42.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50.jar" dest="${thirdparty.dir}/jbossws-jboss50.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss50/${jbossws-jboss50}/lib/jbossws-jboss50-deployer.zip" dest="${thirdparty.dir}/jbossws-jboss50-deployer.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
Modified: trunk/jbossws-core/build.xml
===================================================================
--- trunk/jbossws-core/build.xml 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/build.xml 2007-08-02 18:40:08 UTC (rev 4119)
@@ -246,8 +246,6 @@
<target name="jars-jboss42" depends="jars-common" if="jboss42.home">
- <ant antfile="${int.jboss42.dir}/build.xml" target="jars" inheritall="false"/>
-
<!-- Concat jboss-beans.xml -->
<concat destfile="${core.output.lib.dir}/jbossws-native42/jbossws.beans/META-INF/jboss-beans.xml">
<header trimleading="yes">
@@ -272,10 +270,8 @@
<include name="jboss-saaj.jar"/>
<include name="jbossws-core.jar"/>
</fileset>
- <fileset dir="${int.jboss42.dir}/output/lib">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
<fileset dir="${core.dir}/thirdparty">
+ <include name="jbossws-jboss42.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="policy.jar"/>
@@ -298,8 +294,6 @@
<target name="jars-jboss40" depends="jars-common" if="jboss40.home">
- <ant antfile="${int.jboss40.dir}/build.xml" target="jars" inheritall="false"/>
-
<!-- Concat jboss-beans.xml -->
<concat destfile="${core.output.lib.dir}/jbossws-native40/jbossws.beans/META-INF/jboss-beans.xml">
<header trimleading="yes">
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -63,7 +63,7 @@
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -53,7 +53,7 @@
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -65,7 +65,7 @@
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -46,7 +46,7 @@
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -51,7 +51,7 @@
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -33,7 +33,7 @@
import org.jboss.ws.metadata.config.jaxrpc.ConfigRootJAXRPC;
import org.jboss.ws.metadata.config.jaxws.ConfigRootJAXWS;
import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -39,7 +39,7 @@
import org.jboss.ws.core.soap.Use;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.wsf.common.JavaUtils;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.w3c.dom.Element;
/**
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -30,7 +30,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -37,7 +37,7 @@
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.Configuration.OperationConfig;
-import org.jboss.wsf.framework.deployment.ResourceLoaderAdapter;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
/**
* Builder class that builds the Tools Meta Data
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java 2007-08-02 18:40:08 UTC (rev 4119)
@@ -43,7 +43,7 @@
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
-import org.jboss.wsf.framework.deployment.URLLoaderAdapter;
+import org.jboss.wsf.common.URLLoaderAdapter;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.test.JBossWSTest;
Modified: trunk/jbossws-core/version.properties
===================================================================
--- trunk/jbossws-core/version.properties 2007-08-02 17:08:25 UTC (rev 4118)
+++ trunk/jbossws-core/version.properties 2007-08-02 18:40:08 UTC (rev 4119)
@@ -9,6 +9,8 @@
jbossws-common=2.0.1.CR1
jbossws-spi=2.0.1.CR1
jbossws-jboss50=2.0.1.CR1
+jbossws-jboss42=2.0.1.CR1
+jbossws-jboss40=2.0.1.CR1
# Thirdparty library versions
apache-collections=3.1
17 years, 4 months
JBossWS SVN: r4118 - in container/jboss40/trunk: ant-import and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-02 13:08:25 -0400 (Thu, 02 Aug 2007)
New Revision: 4118
Added:
container/jboss40/trunk/ant-import/build-setup.xml
container/jboss40/trunk/src/main/etc/default.mf
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHook.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHookEJB.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHookJSE.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractInvocationHandler.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ArchiveDeployerHook.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ContainerMetaDataAdapter.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ContainerMetaDataDeploymentAspect.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandler.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandlerJAXRPC.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandlerJAXWS.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultWebAppDesciptorModifierImpl.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerHook.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptor.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB21.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB21MBean.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB3.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB3MBean.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorJSE.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorJSEMBean.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorMBean.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeploymentAspectHttpServer.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapter.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB3.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerEJB21.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerMDB21.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookEJB21.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookEJB3.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JSEArchiveMetaDataAdapter.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ModifyWebMetaDataDeploymentAspect.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/RewriteResults.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityAdapterFactoryImpl.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityAdaptorImpl.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityHandlerEJB21.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityHandlerEJB3.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ServiceEndpointInterceptor.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDeployingHttpServer.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDeploymentAspect.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDesciptorModifier.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebXMLRewriterImpl.java
Modified:
container/jboss40/trunk/
container/jboss40/trunk/ant-import/build-release.xml
container/jboss40/trunk/ant-import/build-thirdparty.xml
container/jboss40/trunk/build.xml
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB21.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerEJB3.java
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerFactoryImpl.java
container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml
Log:
Duplicate jboss42 classes
Property changes on: container/jboss40/trunk
___________________________________________________________________
Name: svn:ignore
- output*
thirdparty
version.properties.md5
+ ant.properties
output*
thirdparty
version.properties.md5
Modified: container/jboss40/trunk/ant-import/build-release.xml
===================================================================
--- container/jboss40/trunk/ant-import/build-release.xml 2007-08-02 16:53:25 UTC (rev 4117)
+++ container/jboss40/trunk/ant-import/build-release.xml 2007-08-02 17:08:25 UTC (rev 4118)
@@ -21,14 +21,14 @@
<property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
<mkdir dir="${jboss.repository.dir}/jbossws-jboss40/${repository.id}/lib"/>
<copy todir="${jboss.repository.dir}/jbossws-jboss40/${repository.id}/lib" overwrite="true">
- <fileset dir="${int.jboss40.dir}/output/lib">
+ <fileset dir="${jbws40.dir}/output/lib">
<include name="jbossws-jboss40.jar"/>
<include name="jbossws-jboss40-src.zip"/>
</fileset>
</copy>
<copy tofile="${jboss.repository.dir}/jbossws-jboss40/${repository.id}/component-info.xml" file="${jbws40.etc.dir}/component-info.xml" filtering="true" overwrite="true">
<filterset>
- <filtersfile file="${build.dir}/version.properties"/>
+ <filtersfile file="${jbws40.dir}/version.properties"/>
</filterset>
</copy>
Added: container/jboss40/trunk/ant-import/build-setup.xml
===================================================================
--- container/jboss40/trunk/ant-import/build-setup.xml (rev 0)
+++ container/jboss40/trunk/ant-import/build-setup.xml 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id: build-setup.xml 3576 2007-06-14 09:23:52Z thomas.diesler(a)jboss.com $ -->
+
+<project>
+
+ <!-- ================================================================== -->
+ <!-- Setup -->
+ <!-- ================================================================== -->
+
+ <property name="jbws40.dir" value="${basedir}"/>
+
+ <!-- Check if ant.properties is available -->
+ <available property="ant.properties.available" file="${jbws40.dir}/ant.properties"/>
+ <fail message="Cannot find ant.properties. Did you copy/edit ant.properties.example?" unless="ant.properties.available"/>
+
+ <property file="${jbws40.dir}/ant.properties"/>
+ <property file="${jbws40.dir}/version.properties"/>
+
+ <property name="jboss40.lib" value="${jboss40.home}/lib"/>
+ <property name="jboss40.client" value="${jboss40.home}/client"/>
+ <property name="jboss40.server" value="${jboss40.home}/server/${jboss.server.instance}"/>
+ <property name="jboss40.server.lib" value="${jboss40.server}/lib"/>
+ <property name="jboss40.server.deploy" value="${jboss40.server}/deploy"/>
+
+ <property name="jboss40.available.file" value="${jboss40.client}/jboss-ejb3-client.jar"/>
+ <available property="jboss40.available" file="${jboss40.available.file}"/>
+
+ <!-- JDK Detection -->
+ <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+ <available classname="java.io.Console" property="HAVE_JDK_1.6"/>
+
+ <fail message="JDK1.5 or above is required" unless="HAVE_JDK_1.5"/>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <target name="prepare">
+ <tstamp>
+ <format property="build.id" pattern="yyyyMMddHHmm"/>
+ </tstamp>
+ </target>
+
+</project>
\ No newline at end of file
Modified: container/jboss40/trunk/ant-import/build-thirdparty.xml
===================================================================
--- container/jboss40/trunk/ant-import/build-thirdparty.xml 2007-08-02 16:53:25 UTC (rev 4117)
+++ container/jboss40/trunk/ant-import/build-thirdparty.xml 2007-08-02 17:08:25 UTC (rev 4118)
@@ -17,28 +17,44 @@
<!-- Libraries -->
<!-- ========= -->
- <target name="thirdparty" depends="thirdparty-get,thirdparty-classpath">
+ <target name="thirdparty-init" depends="prepare">
+
+ <property name="thirdparty.dir" value="${jbws40.dir}/thirdparty"/>
+ <checksum file="${jbws40.dir}/version.properties" fileext=".md5" verifyproperty="checksum.ok"/>
+ <condition property="force.thirdparty">
+ <or>
+ <not>
+ <available file="${thirdparty.dir}" type="dir"/>
+ </not>
+ <isfalse value="${checksum.ok}"/>
+ <isset property="force.thirdparty.get"/>
+ </or>
+ </condition>
+ <echo message="checksum.ok = ${checksum.ok}"/>
</target>
- <target name="thirdparty-init" depends="prepare"/>
+ <target name="thirdparty-get" depends="thirdparty-init" if="force.thirdparty" description="Gets the thirdparty libraries">
+
+ <mkdir dir="${thirdparty.dir}"/>
+ <get src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar" dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar" dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jsr181-api.jar" dest="${thirdparty.dir}/jsr181-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/saaj-api.jar" dest="${thirdparty.dir}/saaj-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxrpc/${sun-jaxrpc}/lib/jaxrpc-api.jar" dest="${thirdparty.dir}/jaxrpc-api.jar" usetimestamp="true" verbose="true"/>
+ <checksum file="${jbws40.dir}/version.properties" fileext=".md5"/>
+ </target>
- <!--
- thirdpartry-get
- -->
- <target name="thirdparty-get" depends="thirdparty-init"
- description="Gets the thirdparty libraries"/>
-
<target name="thirdparty-classpath" depends="thirdparty-get">
<!-- The compile classpath for jboss40 integration -->
<path id="jbws40.integration.classpath">
- <pathelement location="${framework.dir}/output/lib/jbossws-framework.jar"/>
- <pathelement location="${framework.dir}/thirdparty/jbossws-common.jar"/>
- <pathelement location="${framework.dir}/thirdparty/jbossws-spi.jar"/>
- <pathelement location="${framework.dir}/thirdparty/jaxws-api.jar"/>
- <pathelement location="${framework.dir}/thirdparty/jaxrpc-api.jar"/>
- <pathelement location="${framework.dir}/thirdparty/jsr181-api.jar"/>
- <pathelement location="${framework.dir}/thirdparty/saaj-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jbossws-common.jar"/>
+ <pathelement location="${thirdparty.dir}/jbossws-spi.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxws-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxrpc-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jsr181-api.jar"/>
+ <pathelement location="${thirdparty.dir}/saaj-api.jar"/>
<pathelement location="${jboss40.lib}/jboss-common.jar"/>
<pathelement location="${jboss40.lib}/jboss-jmx.jar"/>
<pathelement location="${jboss40.lib}/jboss-system.jar"/>
Modified: container/jboss40/trunk/build.xml
===================================================================
--- container/jboss40/trunk/build.xml 2007-08-02 16:53:25 UTC (rev 4117)
+++ container/jboss40/trunk/build.xml 2007-08-02 17:08:25 UTC (rev 4118)
@@ -32,17 +32,11 @@
<property name="jbws40.output.etc.dir" value="${jbws40.output.dir}/etc"/>
<property name="jbws40.output.lib.dir" value="${jbws40.output.dir}/lib"/>
- <property name="jbws42.dir" value="${int.jboss42.dir}"/>
- <property name="jbws42.src.dir" value="${jbws42.dir}/src/main"/>
- <property name="jbws42.etc.dir" value="${jbws42.src.dir}/etc"/>
- <property name="jbws42.java.dir" value="${jbws42.src.dir}/java"/>
- <property name="jbws42.resources.dir" value="${jbws42.src.dir}/resources"/>
-
<!-- ================================================================== -->
<!-- Initialization -->
<!-- ================================================================== -->
- <target name="init" depends="prepare, thirdparty">
+ <target name="init" depends="prepare, thirdparty-get">
<fail message="Not available: ${jboss40.available.file}" unless="jboss40.available"/>
</target>
@@ -66,14 +60,7 @@
<javac srcdir="${jbws40.java.dir}" sourcepath="" destdir="${jbws40.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
<src path="${jbws40.java.dir}"/>
- <src path="${jbws42.java.dir}"/>
- <include name="org/jboss/ws/integration/**"/>
<include name="org/jboss/wsf/container/jboss40/**"/>
- <include name="org/jboss/wsf/container/jboss42/**"/>
- <exclude name="org/jboss/wsf/container/jboss42/jms/**"/>
- <exclude name="org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB21.java"/>
- <exclude name="org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java"/>
- <exclude name="org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java"/>
<classpath refid="jbws40.integration.classpath"/>
</javac>
</target>
@@ -82,7 +69,7 @@
<target name="compile-etc" depends="init">
<mkdir dir="${jbws40.output.etc.dir}"/>
<copy todir="${jbws40.output.etc.dir}" filtering="yes">
- <fileset dir="${build.dir}/etc">
+ <fileset dir="${jbws40.etc.dir}">
<include name="default.mf"/>
</fileset>
<filterset>
@@ -90,7 +77,7 @@
<filter token="java.vm.vendor" value="${java.vm.vendor}"/>
<filter token="build.id" value="${build.id}"/>
<filter token="implementation.version" value="jbossws-${version.id}"/>
- <filtersfile file="${build.dir}/version.properties"/>
+ <filtersfile file="${jbws40.dir}/version.properties"/>
</filterset>
</copy>
</target>
@@ -116,7 +103,6 @@
<fileset dir="${jbws40.output.classes.dir}">
<include name="org/jboss/ws/integration/**"/>
<include name="org/jboss/wsf/container/jboss40/**"/>
- <include name="org/jboss/wsf/container/jboss42/**"/>
</fileset>
<metainf dir="${jbws40.resources.dir}/jbossws-jboss40.jar/META-INF"/>
</jar>
@@ -124,7 +110,6 @@
<!-- Build jbossws40-src.zip -->
<zip zipfile="${jbws40.output.lib.dir}/jbossws-jboss40-src.zip" >
<fileset dir="${jbws40.java.dir}"/>
- <fileset dir="${jbws42.java.dir}"/>
</zip>
</target>
Added: container/jboss40/trunk/src/main/etc/default.mf
===================================================================
--- container/jboss40/trunk/src/main/etc/default.mf (rev 0)
+++ container/jboss40/trunk/src/main/etc/default.mf 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.2
+Created-By: @java.vm.version@ (@java.vm.vendor@)
+Specification-Title: @specification.title@
+Specification-Version: @specification.version@
+Specification-Vendor: @specification.vendor@
+Implementation-Title: @implementation.title@
+Implementation-URL: @implementation.url@
+Implementation-Version: @implementation.version@ (build=(a)build.id@)
+Implementation-Vendor: @implementation.vendor@
+Implementation-Vendor-Id: @implementation.vendor.id@
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHook.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHook.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHook.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,193 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: AbstractDeployerHook.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.*;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import java.util.List;
+
+/**
+ * An abstract web service deployer.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHook implements DeployerHook
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(getClass());
+
+ private DeploymentAspectManager deploymentAspectManager;
+ private DeploymentModelFactory deploymentModelFactory;
+
+ private List<ObjectName> phaseOneInterceptors;
+ private List<ObjectName> phaseTwoInterceptors;
+
+ public DeploymentAspectManager getDeploymentAspectManager()
+ {
+ if(null == deploymentAspectManager)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ deploymentAspectManager = spiProvider.getSPI(DeploymentAspectManagerFactory.class).getDeploymentAspectManager(getDeploymentType());
+ }
+
+ return deploymentAspectManager;
+ }
+
+ public DeploymentModelFactory getDeploymentModelFactory()
+ {
+ if(null == deploymentModelFactory)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+ }
+
+ return deploymentModelFactory;
+ }
+
+ public ArchiveDeployment newDeployment(DeploymentInfo di)
+ {
+ try
+ {
+ DeploymentModelFactory factory = getDeploymentModelFactory();
+ ArchiveDeployment dep = (ArchiveDeployment)factory.newDeployment(di.shortName, di.annotationsCl);
+ if (di.parent != null)
+ {
+ DeploymentInfo parentInfo = di.parent;
+ ArchiveDeployment parentDep = (ArchiveDeployment)factory.newDeployment(parentInfo.shortName, parentInfo.annotationsCl);
+ dep.setParent(parentDep);
+ }
+ return dep;
+ }
+ catch (Exception ex)
+ {
+ throw new WSFDeploymentException("Cannot load spi.deployment.Deployment class", ex);
+ }
+ }
+
+ public Endpoint newEndpoint(String targetBean)
+ {
+ try
+ {
+ return getDeploymentModelFactory().newEndpoint(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new WSFDeploymentException("Cannot load spi.deployment.Endpoint class", ex);
+ }
+ }
+
+ public void setPhaseOneInterceptors(List<ObjectName> phaseOneInterceptors)
+ {
+ this.phaseOneInterceptors = phaseOneInterceptors;
+ }
+
+ public void setPhaseTwoInterceptors(List<ObjectName> phaseTwoInterceptors)
+ {
+ this.phaseTwoInterceptors = phaseTwoInterceptors;
+ }
+
+ /** Return true if this deployment should be ignored
+ */
+ public boolean ignoreDeployment(DeploymentInfo unit)
+ {
+ return false;
+ }
+
+ /** Add the hooks to the interceptors
+ */
+ public void start()
+ {
+
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ try
+ {
+ if (phaseOneInterceptors != null)
+ {
+ for (ObjectName oname : phaseOneInterceptors)
+ {
+ DeployerInterceptorMBean interceptor = (DeployerInterceptorMBean)MBeanProxy.get(DeployerInterceptorMBean.class, oname, server);
+ interceptor.addPhaseOneHook(this);
+ }
+ }
+
+ if (phaseTwoInterceptors != null)
+ {
+ for (ObjectName oname : phaseTwoInterceptors)
+ {
+ DeployerInterceptorMBean interceptor = (DeployerInterceptorMBean)MBeanProxy.get(DeployerInterceptorMBean.class, oname, server);
+ interceptor.addPhaseTwoHook(this);
+ }
+ }
+ }
+ catch (MBeanProxyCreationException e)
+ {
+ throw new WSFDeploymentException(e);
+ }
+ }
+
+ /** Add the hooks to the interceptors
+ */
+ public void stop()
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ try
+ {
+ if (phaseOneInterceptors != null)
+ {
+ for (ObjectName oname : phaseOneInterceptors)
+ {
+ DeployerInterceptorMBean interceptor = (DeployerInterceptorMBean)MBeanProxy.get(DeployerInterceptorMBean.class, oname, server);
+ interceptor.removePhaseOneHook(this);
+ }
+ }
+
+ if (phaseTwoInterceptors != null)
+ {
+ for (ObjectName oname : phaseTwoInterceptors)
+ {
+ DeployerInterceptorMBean interceptor = (DeployerInterceptorMBean)MBeanProxy.get(DeployerInterceptorMBean.class, oname, server);
+ interceptor.removePhaseTwoHook(this);
+ }
+ }
+ }
+ catch (MBeanProxyCreationException e)
+ {
+ throw new WSFDeploymentException(e);
+ }
+ }
+
+ /** Get the deployment type this deployer can handle
+ */
+ public abstract Deployment.DeploymentType getDeploymentType();
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHookEJB.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHookEJB.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHookEJB.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+
+//$Id: AbstractDeployerHookEJB.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+/**
+ * An abstract deployer for EJB Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHookEJB extends ArchiveDeployerHook
+{
+
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHookJSE.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHookJSE.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractDeployerHookJSE.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,63 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+
+//$Id: AbstractDeployerHookJSE.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+/**
+ * An abstract deployer for JSE Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHookJSE extends ArchiveDeployerHook
+{
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ if ((unit.metaData instanceof WebMetaData) == false)
+ return false;
+
+ return true;
+ }
+
+ static class Servlet
+ {
+ String servletName;
+ String servletClass;
+ public Servlet(String servletName, String servletClass)
+ {
+ this.servletName = servletName;
+ this.servletClass = servletClass;
+ }
+ public String getServletClass()
+ {
+ return servletClass;
+ }
+ public String getServletName()
+ {
+ return servletName;
+ }
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractInvocationHandler.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractInvocationHandler.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/AbstractInvocationHandler.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,55 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: InvocationHandlerEJB3.java 4023 2007-07-28 07:14:06Z thomas.diesler(a)jboss.com $
+
+import java.lang.reflect.Method;
+
+import org.jboss.wsf.common.JavaUtils;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractInvocationHandler extends InvocationHandler
+{
+ protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
+ {
+ String methodName = seiMethod.getName();
+ Class[] paramTypes = seiMethod.getParameterTypes();
+ for (int i = 0; i < paramTypes.length; i++)
+ {
+ Class paramType = paramTypes[i];
+ if (JavaUtils.isPrimitive(paramType) == false)
+ {
+ String paramTypeName = paramType.getName();
+ paramType = JavaUtils.loadJavaType(paramTypeName);
+ paramTypes[i] = paramType;
+ }
+ }
+
+ Method implMethod = implClass.getMethod(methodName, paramTypes);
+ return implMethod;
+ }
+}
\ No newline at end of file
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ArchiveDeployerHook.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ArchiveDeployerHook.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ArchiveDeployerHook.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,157 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: ArchiveDeployerHook.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.w3c.dom.Element;
+
+/**
+ * An abstract web service deployer.
+ *
+ * deploy(unit)
+ * if(isWebServiceDeployment)
+ * dep = createDeployment(unit)
+ * deploy(dep)
+ *
+ * undeploy(unit)
+ * dep = getDeployment(unit)
+ * undeploy(dep)
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class ArchiveDeployerHook extends AbstractDeployerHook
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public abstract DeploymentType getDeploymentType();
+
+ /** Depending on the type of deployment, this method should return true
+ * if the deployment contains web service endpoints.
+ */
+ public abstract boolean isWebServiceDeployment(DeploymentInfo unit);
+
+ /** Create the Deployment for a given DeploymentInfo
+ */
+ public abstract Deployment createDeployment(DeploymentInfo unit);
+
+ /** Get the Deployment for a given DeploymentInfo
+ */
+ public Deployment getDeployment(DeploymentInfo unit)
+ {
+ Deployment dep = (Deployment)unit.context.get(Deployment.class);
+ return (dep != null && dep.getType() == getDeploymentType() ? dep : null);
+ }
+
+ public void deploy(DeploymentInfo unit) throws DeploymentException
+ {
+ if (ignoreDeployment(unit))
+ return;
+
+ if (isWebServiceDeployment(unit))
+ {
+ log.debug("deploy: " + unit.shortName);
+ Deployment dep = getDeployment(unit);
+ if (dep == null)
+ {
+ dep = createDeployment(unit);
+ dep.addAttachment(DeploymentInfo.class, unit);
+ }
+
+ getDeploymentAspectManager().deploy(dep);
+ unit.context.put(Deployment.class, dep);
+ }
+ }
+
+ public void undeploy(DeploymentInfo unit)
+ {
+ if (ignoreDeployment(unit))
+ return;
+
+ Deployment dep = getDeployment(unit);
+ if (dep != null)
+ {
+ log.debug("undeploy: " + unit.shortName);
+ getDeploymentAspectManager().undeploy(dep);
+ unit.context.remove(Deployment.class);
+ }
+ }
+
+ /** Unmrashall the webservices.xml if there is one
+ */
+ protected WebservicesMetaData getWebservicesMetaData(DeploymentInfo unit, String wsFile)
+ {
+ WebservicesMetaData wsMetaData = (WebservicesMetaData)unit.context.get(WebservicesMetaData.class);
+ UnifiedVirtualFile vfWebservices = getWebservicesFile(unit, wsFile);
+ if (wsMetaData == null && vfWebservices != null)
+ {
+ try
+ {
+ URL wsURL = vfWebservices.toURL();
+ Element root = DOMUtils.parse(wsURL.openStream());
+ String namespaceURI = root.getNamespaceURI();
+ if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
+ {
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ ObjectModelFactory factory = new WebservicesFactory(wsURL);
+ wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(wsURL.openStream(), factory, null);
+ unit.context.put(WebservicesMetaData.class, wsMetaData);
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new WSFDeploymentException(ex);
+ }
+ }
+ return wsMetaData;
+ }
+
+ private UnifiedVirtualFile getWebservicesFile(DeploymentInfo unit, String wsFile)
+ {
+ try
+ {
+ UnifiedVirtualFile vfsRoot = new ResourceLoaderAdapter(unit.localCl);
+ return (wsFile != null ? vfsRoot.findChild(wsFile) : null);
+ }
+ catch (IOException e)
+ {
+ return null;
+ }
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ContainerMetaDataAdapter.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ContainerMetaDataAdapter.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ContainerMetaDataAdapter.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,116 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: ContainerMetaDataAdapter.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Build container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class ContainerMetaDataAdapter
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ContainerMetaDataAdapter.class);
+
+ private EJBArchiveMetaDataAdapterEJB3 applicationMetaDataAdapterEJB3;
+ private EJBArchiveMetaDataAdapter applicationMetaDataAdapterEJB21;
+ private JSEArchiveMetaDataAdapter webMetaDataAdapter;
+
+ public void setApplicationMetaDataAdapterEJB21(EJBArchiveMetaDataAdapter adapter)
+ {
+ this.applicationMetaDataAdapterEJB21 = adapter;
+ }
+
+ public void setApplicationMetaDataAdapterEJB3(EJBArchiveMetaDataAdapterEJB3 adapter)
+ {
+ this.applicationMetaDataAdapterEJB3 = adapter;
+ }
+
+ public void setWebMetaDataAdapter(JSEArchiveMetaDataAdapter adapter)
+ {
+ this.webMetaDataAdapter = adapter;
+ }
+
+ public void buildContainerMetaData(Deployment dep, DeploymentInfo di)
+ {
+ dep.addAttachment(DeploymentInfo.class, di);
+ dep.setProperty(EJBArchiveMetaDataAdapterEJB3.DEPLOYED_OBJECT, di.deployedObject);
+
+ if (di.metaData instanceof WebMetaData)
+ {
+ JSEArchiveMetaData webMetaData = webMetaDataAdapter.buildUnifiedWebMetaData(dep, di);
+ if (webMetaData != null)
+ dep.addAttachment(JSEArchiveMetaData.class, webMetaData);
+
+ dep.setProperty("org.jboss.ws.webapp.url", getDeploymentURL(di));
+ }
+ else if (dep.getType() == DeploymentType.JAXRPC_EJB3 || dep.getType() == DeploymentType.JAXWS_EJB3)
+ {
+ EJBArchiveMetaData appMetaData = applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep);
+ if (appMetaData != null)
+ dep.addAttachment(EJBArchiveMetaData.class, appMetaData);
+ }
+ else if (di.metaData instanceof ApplicationMetaData)
+ {
+ EJBArchiveMetaData appMetaData = applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, di);
+ if (appMetaData != null)
+ dep.addAttachment(EJBArchiveMetaData.class, appMetaData);
+ }
+ }
+
+ private URL getDeploymentURL(DeploymentInfo di)
+ {
+ URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
+ if ("file".equals(deploymentURL.getProtocol()))
+ {
+ String path = deploymentURL.getPath();
+ if (new File(path).isFile())
+ {
+ try
+ {
+ deploymentURL = new URL("jar:file:" + path + "!/");
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+ }
+ return deploymentURL;
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ContainerMetaDataDeploymentAspect.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ContainerMetaDataDeploymentAspect.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,54 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: UnifiedDeploymentInfoDeployer.java 3407 2007-06-03 16:06:36Z thomas.diesler(a)jboss.com $
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+
+/**
+ * A deployer that builds the UnifiedDeploymentInfo
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ContainerMetaDataDeploymentAspect extends DeploymentAspect
+{
+ private ContainerMetaDataAdapter metaDataAdapter;
+
+ public void setMetaDataAdapter(ContainerMetaDataAdapter adapter)
+ {
+ this.metaDataAdapter = adapter;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ DeploymentInfo di = dep.getAttachment(DeploymentInfo.class);
+ if (di == null)
+ throw new IllegalStateException("Cannot obtain deployment info");
+
+ metaDataAdapter.buildContainerMetaData(dep, di);
+ }
+}
\ No newline at end of file
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandler.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandler.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandler.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,121 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: DefaultInvocationHandlerJAXWS.java 4023 2007-07-28 07:14:06Z thomas.diesler(a)jboss.com $
+
+import java.lang.reflect.Method;
+
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.wsf.common.JavaUtils;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.ResourceInjector;
+import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
+
+/**
+ * Handles invocations on JSE endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class DefaultInvocationHandler extends InvocationHandler
+{
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+ }
+
+ protected Object getTargetBean(Endpoint ep, Invocation epInv)
+ {
+ InvocationContext invCtx = epInv.getInvocationContext();
+ Object targetBean = invCtx.getTargetBean();
+ if (targetBean == null)
+ {
+ try
+ {
+ Class epImpl = ep.getTargetBeanClass();
+ targetBean = epImpl.newInstance();
+ invCtx.setTargetBean(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Canot get target bean instance", ex);
+ }
+ }
+ return targetBean;
+ }
+
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ try
+ {
+ Object targetBean = getTargetBean(ep, epInv);
+
+ InvocationContext invContext = epInv.getInvocationContext();
+ WebServiceContext wsContext = invContext.getAttachment(WebServiceContext.class);
+ if (wsContext != null)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ResourceInjectorFactory factory = spiProvider.getSPI(ResourceInjectorFactory.class);
+ ResourceInjector injector = factory.newResourceInjector();
+ injector.inject(targetBean, wsContext);
+ }
+
+ Method method = getImplMethod(targetBean.getClass(), epInv.getJavaMethod());
+ Object retObj = method.invoke(targetBean, epInv.getArgs());
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+
+ protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
+ {
+ String methodName = seiMethod.getName();
+ Class[] paramTypes = seiMethod.getParameterTypes();
+ for (int i = 0; i < paramTypes.length; i++)
+ {
+ Class paramType = paramTypes[i];
+ if (JavaUtils.isPrimitive(paramType) == false)
+ {
+ String paramTypeName = paramType.getName();
+ paramType = JavaUtils.loadJavaType(paramTypeName);
+ paramTypes[i] = paramType;
+ }
+ }
+
+ Method implMethod = implClass.getMethod(methodName, paramTypes);
+ return implMethod;
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandlerJAXRPC.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandlerJAXRPC.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandlerJAXRPC.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,72 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: DefaultInvocationHandlerJAXRPC.java 3959 2007-07-20 14:44:19Z heiko.braun(a)jboss.com $
+
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.rpc.server.ServletEndpointContext;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
+/**
+ * Handles invocations on JSE endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class DefaultInvocationHandlerJAXRPC extends DefaultInvocationHandler
+{
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ try
+ {
+ Object targetBean = getTargetBean(ep, epInv);
+
+ InvocationContext invContext = epInv.getInvocationContext();
+ if (targetBean instanceof ServiceLifecycle)
+ {
+ ServletEndpointContext sepContext = invContext.getAttachment(ServletEndpointContext.class);
+ if (sepContext != null)
+ ((ServiceLifecycle)targetBean).init(sepContext);
+ }
+
+ try
+ {
+ super.invoke(ep, epInv);
+ }
+ finally
+ {
+ if (targetBean instanceof ServiceLifecycle)
+ {
+ ((ServiceLifecycle)targetBean).destroy();
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandlerJAXWS.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandlerJAXWS.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandlerJAXWS.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,34 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: DefaultInvocationHandlerJAXWS.java 4023 2007-07-28 07:14:06Z thomas.diesler(a)jboss.com $
+
+/**
+ * Handles invocations on JSE endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class DefaultInvocationHandlerJAXWS extends DefaultInvocationHandler
+{
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultWebAppDesciptorModifierImpl.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultWebAppDesciptorModifierImpl.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultWebAppDesciptorModifierImpl.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,164 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.logging.Logger;
+import org.dom4j.Document;
+import org.dom4j.Element;
+
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Modifies web.xml for jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class DefaultWebAppDesciptorModifierImpl implements WebAppDesciptorModifier
+{
+ // logging support
+ private static Logger log = Logger.getLogger(DefaultWebAppDesciptorModifierImpl.class);
+
+ public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
+ {
+ RewriteResults results = new RewriteResults();
+ Element root = webXml.getRootElement();
+
+ String propKey = "org.jboss.ws.webapp.ServletClass";
+ String servletClass = (String)dep.getProperty(propKey);
+ if (servletClass == null)
+ throw new IllegalStateException("Cannot obtain context property: " + propKey);
+
+ propKey = "org.jboss.ws.webapp.ContextParameterMap";
+ Map<String, String> contextParams = (Map<String, String>)dep.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 = "org.jboss.ws.webapp.ServletContextListener";
+ String listenerClass = (String)dep.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();
+ String linkName = servlet.element("servlet-name").getTextTrim();
+
+ // find the servlet-class
+ Element classElement = servlet.element("servlet-class");
+
+ // JSP
+ if (classElement == null)
+ continue;
+
+ String orgServletClassName = classElement.getTextTrim();
+
+ // Get the servlet class
+ Class orgServletClass = null;
+ try
+ {
+ ClassLoader loader = dep.getInitialClassLoader();
+ orgServletClass = loader.loadClass(orgServletClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClassName);
+ }
+
+ String targetBeanName = null;
+
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet))
+ {
+ for (Iterator itParam = servlet.elementIterator("init-param"); itParam.hasNext();)
+ {
+ Element elParam = (Element)itParam.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ String paramValue = elParam.element("param-value").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ {
+ targetBeanName = paramValue;
+ }
+ }
+ }
+ else
+ {
+ // Check if it is a real servlet that we can ignore
+ if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
+ {
+ log.info("Ignore servlet: " + orgServletClassName);
+ continue;
+ }
+ else if (orgServletClassName.endsWith("Servlet"))
+ {
+ log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
+ continue;
+ }
+
+ classElement.setText(servletClass);
+
+ // add additional init params
+ if (orgServletClassName.equals(servletClass) == false)
+ {
+ targetBeanName = orgServletClassName;
+ Element paramElement = servlet.addElement("init-param");
+ paramElement.addElement("param-name").addText(Endpoint.SEPID_DOMAIN_ENDPOINT);
+ paramElement.addElement("param-value").addText(targetBeanName);
+ }
+ }
+
+ if (targetBeanName == null)
+ throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
+
+ // remember the target bean name
+ results.sepTargetMap.put(linkName, targetBeanName);
+ }
+
+ return results;
+ }
+
+ // Return true if the web.xml is already modified
+ private boolean isAlreadyModified(Element servlet)
+ {
+ for (Iterator it = servlet.elementIterator("init-param"); it.hasNext();)
+ {
+ Element elParam = (Element)it.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ return true;
+ }
+ return false;
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerHook.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerHook.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerHook.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,41 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+
+//$Id: DeployerHook.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+
+/**
+ * An interface for all web service deployer hooks
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Apr-2007
+ */
+public interface DeployerHook
+{
+ void deploy(DeploymentInfo unit) throws DeploymentException;
+
+ void undeploy(DeploymentInfo unit);
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptor.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptor.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptor.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,153 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: DeployerInterceptor.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.deployment.SubDeployerInterceptorSupport;
+import org.jboss.mx.server.Invocation;
+import org.jboss.mx.util.MBeanProxy;
+
+/**
+ * A deployer service that manages WS4EE compliant Web Services
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 03-May-2007
+ */
+public abstract class DeployerInterceptor extends SubDeployerInterceptorSupport implements DeployerInterceptorMBean
+{
+ // The main deployer
+ private MainDeployerMBean mainDeployer;
+
+ private List<DeployerHook> phaseOneHooks = new LinkedList<DeployerHook>();
+ private List<DeployerHook> phaseTwoHooks = new LinkedList<DeployerHook>();
+
+ public void addPhaseOneHook(DeployerHook hook)
+ {
+ log.debug("Add phase-one deployer hook: " + hook);
+ phaseOneHooks.add(hook);
+ }
+
+ public void removePhaseOneHook(DeployerHook hook)
+ {
+ log.debug("Remove phase-one deployer hook: " + hook);
+ phaseOneHooks.remove(hook);
+ }
+
+ public void addPhaseTwoHook(DeployerHook hook)
+ {
+ log.debug("Add phase-two deployer hook: " + hook);
+ phaseTwoHooks.add(hook);
+ }
+
+ public void removePhaseTwoHook(DeployerHook hook)
+ {
+ log.debug("Remove phase-two deployer hook: " + hook);
+ phaseTwoHooks.remove(hook);
+ }
+
+ @Override
+ protected final Object create(Invocation invocation, DeploymentInfo unit) throws Throwable
+ {
+ Object retn = invokeNext(invocation);
+
+ for (DeployerHook deployer : phaseOneHooks)
+ deployer.deploy(unit);
+
+ return retn;
+ }
+
+ @Override
+ protected final Object start(Invocation invocation, DeploymentInfo unit) throws Throwable
+ {
+ Object retn = invokeNext(invocation);
+
+ for (DeployerHook deployer : phaseTwoHooks)
+ deployer.deploy(unit);
+
+ return retn;
+ }
+
+ @Override
+ protected final Object stop(Invocation invocation, DeploymentInfo unit) throws Throwable
+ {
+ Object retn = invokeNext(invocation);
+
+ for (DeployerHook deployer : phaseTwoHooks)
+ deployer.undeploy(unit);
+
+ return retn;
+ }
+
+ @Override
+ protected final Object destroy(Invocation invocation, DeploymentInfo unit) throws Throwable
+ {
+ Object retn = invokeNext(invocation);
+
+ for (DeployerHook deployer : phaseOneHooks)
+ deployer.undeploy(unit);
+
+ return retn;
+ }
+
+ /** Create the deployer service
+ */
+ protected void createService() throws Exception
+ {
+ mainDeployer = (MainDeployerMBean)MBeanProxy.get(MainDeployerMBean.class, MainDeployerMBean.OBJECT_NAME, server);
+ super.attach();
+ }
+
+ /** Destroy the deployer service
+ */
+ protected void destroyService()
+ {
+ super.detach();
+ }
+
+ /**
+ * Handle all webservice deployment exceptions.
+ * You can either simply log the problem and keep the EJB/WAR module
+ * alive or undeploy properly.
+ */
+ protected void handleStartupException(DeploymentInfo di, Throwable th)
+ {
+ log.error("Cannot startup webservice for: " + di.shortName, th);
+ mainDeployer.undeploy(di);
+ }
+
+ /**
+ * Handle all webservice deployment exceptions.
+ *
+ * You can either simply logs the problem and keep the EJB/WAR module
+ * alive or undeploy properly.
+ */
+ protected void handleShutdownException(String moduleName, Throwable th)
+ {
+ log.error("Cannot shutdown webservice for: " + moduleName, th);
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB21.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB21.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB21.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,35 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: DeployerInterceptorEJB21.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+/**
+ * A deployer service that manages WS4EE compliant Web-Services for EJB-2.1 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-Jan-2005
+ */
+public class DeployerInterceptorEJB21 extends DeployerInterceptor implements DeployerInterceptorEJB21MBean
+{
+
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB21MBean.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB21MBean.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB21MBean.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,36 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import javax.management.ObjectName;
+
+import org.jboss.wsf.common.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface DeployerInterceptorEJB21MBean extends DeployerInterceptorMBean
+{
+ //default object name
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerEJB21");
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB3.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB3.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB3.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,34 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: DeployerInterceptorEJB3.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+/**
+ * A deployer service that manages WS4EE compliant Web-Services for EJB3 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2005
+ */
+public class DeployerInterceptorEJB3 extends DeployerInterceptor implements DeployerInterceptorEJB3MBean
+{
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB3MBean.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB3MBean.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorEJB3MBean.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,36 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import javax.management.ObjectName;
+
+import org.jboss.wsf.common.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface DeployerInterceptorEJB3MBean extends DeployerInterceptorMBean
+{
+ //default object name
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerEJB3");
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorJSE.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorJSE.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorJSE.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,34 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: DeployerInterceptorJSE.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+/**
+ * A deployer service that manages WS4EE compliant Web Services for WAR
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-Jan-2005
+ */
+public class DeployerInterceptorJSE extends DeployerInterceptor implements DeployerInterceptorJSEMBean
+{
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorJSEMBean.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorJSEMBean.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorJSEMBean.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,36 @@
+/*
+* 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.wsf.container.jboss40;
+
+import javax.management.ObjectName;
+
+import org.jboss.wsf.common.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface DeployerInterceptorJSEMBean extends DeployerInterceptorMBean
+{
+ //default object name
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerJSE");
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorMBean.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorMBean.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeployerInterceptorMBean.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,39 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import org.jboss.deployment.SubDeployerInterceptorMBean;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface DeployerInterceptorMBean extends SubDeployerInterceptorMBean
+{
+ void addPhaseOneHook(DeployerHook deployer);
+
+ void removePhaseOneHook(DeployerHook deployer);
+
+ void addPhaseTwoHook(DeployerHook deployer);
+
+ void removePhaseTwoHook(DeployerHook deployer);
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeploymentAspectHttpServer.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeploymentAspectHttpServer.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DeploymentAspectHttpServer.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,122 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: JBossHttpServer.java 1786 2007-01-04 14:30:04Z thomas.diesler(a)jboss.com $
+
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * A HTTP Server that uses DeploymentAspects
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public class DeploymentAspectHttpServer extends AbstractExtensible implements HttpServer
+{
+ /** Start an instance of this HTTP server */
+ public void start()
+ {
+ // verify required properties
+ }
+
+ /** Create an HTTP context */
+ public HttpContext createContext(String contextRoot)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ HttpContext httpContext = spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+ return httpContext;
+ }
+
+ /** Publish an JAXWS endpoint to the HTTP server */
+ public void publish(HttpContext context, Endpoint endpoint)
+ {
+ Class implClass = getImplementorClass(endpoint);
+
+ try
+ {
+ // Get the deployment model factory
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ DeploymentModelFactory depModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+
+ // Create/Setup the deployment
+ Deployment dep = depModelFactory.newDeployment("endpoint-deployment", implClass.getClassLoader());
+
+ // Create/Setup the service
+ Service service = dep.getService();
+ service.setContextRoot(context.getContextRoot());
+
+ // Create/Setup the endpoint
+ org.jboss.wsf.spi.deployment.Endpoint ep = depModelFactory.newEndpoint(implClass.getName());
+ service.addEndpoint(ep);
+
+ // Deploy using deployment aspects
+ DeploymentAspectManagerFactory depManagerFactory = spiProvider.getSPI(DeploymentAspectManagerFactory.class);
+ DeploymentAspectManager depManager = depManagerFactory.getDeploymentAspectManager("WSDeploymentAspectManagerEndpointAPI");
+ depManager.deploy(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ /** Destroys an JAXWS endpoint on the HTTP server */
+ public void destroy(HttpContext context, Endpoint endpoint)
+ {
+ try
+ {
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ private Class getImplementorClass(Endpoint endpoint)
+ {
+ Object implementor = endpoint.getImplementor();
+ Class implClass = (implementor instanceof Class ? (Class)implementor : implementor.getClass());
+ return implClass;
+ }
+}
\ No newline at end of file
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapter.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapter.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapter.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,89 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: $
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public abstract class EJBArchiveMetaDataAdapter
+{
+ public EJBArchiveMetaData buildUnifiedApplicationMetaData(Deployment dep, DeploymentInfo di)
+ {
+ ApplicationMetaData apmd = (ApplicationMetaData)di.metaData;
+ dep.addAttachment(ApplicationMetaData.class, apmd);
+
+ EJBArchiveMetaData appMetaData = new EJBArchiveMetaData();
+ buildUnifiedBeanMetaData(appMetaData, apmd);
+ appMetaData.setConfigName(apmd.getConfigName());
+ appMetaData.setConfigFile(apmd.getConfigFile());
+ appMetaData.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
+ appMetaData.setSecurityDomain(apmd.getSecurityDomain());
+ appMetaData.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
+ return appMetaData;
+ }
+
+ protected PublishLocationAdapter getPublishLocationAdpater(final ApplicationMetaData apmd)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ return apmd.getWsdlPublishLocationByName(name);
+ }
+ };
+ }
+
+ protected void buildUnifiedBeanMetaData(EJBArchiveMetaData umd, ApplicationMetaData metaData)
+ {
+ List<EJBMetaData> beans = new ArrayList<EJBMetaData>();
+ Iterator it = metaData.getEnterpriseBeans();
+ while (it.hasNext())
+ {
+ BeanMetaData bmd = (BeanMetaData)it.next();
+ EJBMetaData ubmd = buildUnifiedBeanMetaData(bmd);
+ if (ubmd != null)
+ {
+ beans.add(ubmd);
+ }
+ }
+ umd.setEnterpriseBeans(beans);
+ }
+
+ protected abstract EJBMetaData buildUnifiedBeanMetaData(BeanMetaData bmd);
+}
Modified: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB21.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB21.java 2007-08-02 16:53:25 UTC (rev 4117)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB21.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -27,7 +27,6 @@
import org.jboss.metadata.EjbPortComponentMetaData;
import org.jboss.metadata.MessageDrivenMetaData;
import org.jboss.metadata.SessionMetaData;
-import org.jboss.wsf.container.jboss42.EJBArchiveMetaDataAdapter;
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB3.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB3.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB3.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,103 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: EJBArchiveMetaDataAdapterEJB3.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.util.ArrayList;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Apr-2007
+ */
+public class EJBArchiveMetaDataAdapterEJB3
+{
+ // logging support
+ private static Logger log = Logger.getLogger(EJBArchiveMetaDataAdapterEJB3.class);
+
+ public static final String DEPLOYED_OBJECT = "org.jboss.ws.ejb3.deployed.object";
+
+ public EJBArchiveMetaData buildUnifiedApplicationMetaData(Deployment dep)
+ {
+ EJBArchiveMetaData appMetaData = null;
+
+ ObjectName oname = (ObjectName)dep.getProperty(DEPLOYED_OBJECT);
+
+ // jboss.j2ee:service=EJB3,module=some-ejb3.jar
+ if (oname != null && oname.getDomain().equals("jboss.j2ee") && "EJB3".equals(oname.getKeyProperty("service")))
+ {
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(oname);
+
+ ArrayList<EJBMetaData> beans = new ArrayList<EJBMetaData>();
+ for (Object container : ejb3Module.getContainers().values())
+ {
+ if (container instanceof StatelessContainer)
+ {
+ StatelessContainer slc = (StatelessContainer)container;
+ EJBMetaData usmd = new SLSBMetaData();
+ usmd.setEjbName(slc.getEjbName());
+ usmd.setEjbClass(slc.getBeanClassName());
+ beans.add(usmd);
+ }
+ }
+
+ appMetaData = new EJBArchiveMetaData();
+ appMetaData.setEnterpriseBeans(beans);
+ }
+ return appMetaData;
+ }
+
+ static Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
+ {
+ Ejb3ModuleMBean ejb3Module;
+ try
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
+ if (ejb3Module == null)
+ throw new WSFDeploymentException("Cannot obtain EJB3 module: " + objectName);
+
+ return ejb3Module;
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new WSFDeploymentException("Cannot obtain proxy to EJB3 module");
+ }
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerEJB21.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerEJB21.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerEJB21.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,184 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: InvocationHandlerEJB21.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.ejb.EjbModule;
+import org.jboss.ejb.Interceptor;
+import org.jboss.ejb.StatelessSessionContainer;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.invocation.InvocationType;
+import org.jboss.invocation.PayloadKey;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+
+/**
+ * Handles invocations on EJB21 endpoints.
+ * Used with jboss40 and jboss42.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB21 extends InvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(InvocationHandlerEJB21.class);
+
+ private String jndiName;
+ private MBeanServer server;
+ private ObjectName objectName;
+
+ /**
+ * Used from both 40 and 42.
+ * Therefore it's not package protected...
+ */
+ public InvocationHandlerEJB21()
+ {
+ }
+
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+ String ejbName = ep.getShortName();
+ Deployment dep = ep.getService().getDeployment();
+ EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
+ if (beanMetaData == null)
+ throw new WebServiceException("Cannot obtain ejb meta data for: " + ejbName);
+
+ // get the bean's JNDI name
+ jndiName = beanMetaData.getContainerObjectNameJndiName();
+ if (jndiName == null)
+ throw new WebServiceException("Cannot obtain JNDI name for: " + ejbName);
+
+ server = MBeanServerLocator.locateJBoss();
+ objectName = ObjectNameFactory.create("jboss.j2ee:jndiName=" + jndiName + ",service=EJB");
+ if (server.isRegistered(objectName) == false)
+ throw new WebServiceException("Cannot find service endpoint target: " + objectName);
+
+ // Dynamically add the service endpoint interceptor
+ // http://jira.jboss.org/jira/browse/JBWS-758
+ try
+ {
+ EjbModule ejbModule = (EjbModule)server.getAttribute(objectName, "EjbModule");
+ StatelessSessionContainer container = (StatelessSessionContainer)ejbModule.getContainer(ejbName);
+
+ boolean injectionPointFound = false;
+ Interceptor prev = container.getInterceptor();
+ while (prev != null && prev.getNext() != null)
+ {
+ Interceptor next = prev.getNext();
+ if (next.getNext() == null)
+ {
+ log.debug("Inject service endpoint interceptor after: " + prev.getClass().getName());
+ ServiceEndpointInterceptor sepInterceptor = new ServiceEndpointInterceptor();
+ prev.setNext(sepInterceptor);
+ sepInterceptor.setNext(next);
+ injectionPointFound = true;
+ }
+ prev = next;
+ }
+ if (injectionPointFound == false)
+ log.warn("Cannot service endpoint interceptor injection point");
+ }
+ catch (Exception ex)
+ {
+ log.warn("Cannot add service endpoint interceptor", ex);
+ }
+
+ }
+
+ public void invoke(Endpoint ep, Invocation inv) throws Exception
+ {
+ log.debug("Invoke: " + inv.getJavaMethod().getName());
+
+ // invoke on the container
+ try
+ {
+ // setup the invocation
+ org.jboss.invocation.Invocation jbInv = getMBeanInvocation(inv);
+
+ String[] sig = { org.jboss.invocation.Invocation.class.getName() };
+ Object retObj = server.invoke(objectName, "invoke", new Object[] { jbInv }, sig);
+ inv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+
+ private org.jboss.invocation.Invocation getMBeanInvocation(Invocation inv)
+ {
+ // EJB2.1 endpoints will only get an JAXRPC context
+ MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
+ if (msgContext == null)
+ throw new IllegalStateException("Cannot obtain MessageContext");
+
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
+ Principal principal = securityAdaptor.getPrincipal();
+ Object credential = securityAdaptor.getCredential();
+
+ Method method = inv.getJavaMethod();
+ Object[] args = inv.getArgs();
+ org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
+
+ HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
+ if (callback == null)
+ throw new IllegalStateException("Cannot obtain HandlerCallback");
+
+ jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+ jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
+ jbInv.setType(InvocationType.SERVICE_ENDPOINT);
+ jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
+ jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
+
+ return jbInv;
+ }
+}
Modified: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerEJB3.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerEJB3.java 2007-08-02 16:53:25 UTC (rev 4117)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerEJB3.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -31,7 +31,6 @@
import org.jboss.aop.Dispatcher;
import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.wsf.common.ObjectNameFactory;
-import org.jboss.wsf.container.jboss42.AbstractInvocationHandler;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
Modified: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerFactoryImpl.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerFactoryImpl.java 2007-08-02 16:53:25 UTC (rev 4117)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerFactoryImpl.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -21,10 +21,6 @@
*/
package org.jboss.wsf.container.jboss40;
-import org.jboss.wsf.container.jboss42.DefaultInvocationHandlerJAXRPC;
-import org.jboss.wsf.container.jboss42.DefaultInvocationHandlerJAXWS;
-import org.jboss.wsf.container.jboss42.InvocationHandlerEJB21;
-import org.jboss.wsf.container.jboss42.InvocationHandlerMDB21;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
import org.jboss.wsf.spi.invocation.InvocationType;
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerMDB21.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerMDB21.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerMDB21.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,76 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: InvocationHandlerEJB21.java 3524 2007-06-09 17:28:37Z thomas.diesler(a)jboss.com $
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+import java.lang.reflect.Method;
+
+/**
+ * Handles invocations on MDB EJB21 endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerMDB21 extends AbstractInvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(InvocationHandlerMDB21.class);
+
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+
+ }
+
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ log.debug("Invoke: " + epInv.getJavaMethod().getName());
+
+ try
+ {
+ InvocationContext invContext = epInv.getInvocationContext();
+ Object targetBean = invContext.getTargetBean();
+ Class implClass = targetBean.getClass();
+ Method seiMethod = epInv.getJavaMethod();
+ Method implMethod = getImplMethod(implClass, seiMethod);
+
+ Object[] args = epInv.getArgs();
+ Object retObj = implMethod.invoke(targetBean, args);
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookEJB21.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookEJB21.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookEJB21.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,108 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: JAXRPCDeployerHookEJB21.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.wsf.common.URLLoaderAdapter;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC EJB21 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookEJB21 extends AbstractDeployerHookEJB
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXRPC_EJB21;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentInfo di)
+ {
+ ArchiveDeployment dep = newDeployment(di);
+ dep.setRootFile(new URLLoaderAdapter(di.localUrl));
+ dep.setRuntimeClassLoader(di.ucl);
+ dep.setType(getDeploymentType());
+
+ Service service = dep.getService();
+
+ ApplicationMetaData appmd = (ApplicationMetaData)di.metaData;
+ if (appmd == null)
+ throw new IllegalStateException("Deployment unit does not contain application meta data");
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(di, null);
+ if (wsMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+ // Copy the attachments
+ dep.addAttachment(WebservicesMetaData.class, wsMetaData);
+ dep.addAttachment(ApplicationMetaData.class, appmd);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
+ {
+ String ejbLink = pcmd.getEjbLink();
+ if (ejbLink == null)
+ throw new IllegalStateException("ejb-link cannot be null");
+
+ BeanMetaData beanMetaData = appmd.getBeanByEjbName(ejbLink);
+ if (beanMetaData == null)
+ throw new IllegalStateException("Cannot obtain bean meta data for: " + ejbLink);
+
+ String ejbClass = beanMetaData.getEjbClass();
+
+ // Create the endpoint
+ Endpoint ep = newEndpoint(ejbClass);
+ ep.setShortName(ejbLink);
+ service.addEndpoint(ep);
+ }
+ }
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ if ((unit.metaData instanceof ApplicationMetaData) == false)
+ return false;
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "META-INF/webservices.xml");
+ return wsMetaData != null;
+ }
+}
\ No newline at end of file
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,142 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: JAXRPCDeployerHookJSE.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.common.URLLoaderAdapter;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC JSE Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookJSE extends AbstractDeployerHookJSE
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXRPC_JSE;
+ }
+
+ /**
+ * Create an endpoint for every servlet-link in webservices.xml
+ */
+ @Override
+ public Deployment createDeployment(DeploymentInfo di)
+ {
+ ArchiveDeployment dep = newDeployment(di);
+ dep.setRootFile(new URLLoaderAdapter(di.localUrl));
+ dep.setRuntimeClassLoader(null);
+ dep.setType(getDeploymentType());
+
+ Service service = dep.getService();
+
+ WebMetaData webMetaData = (WebMetaData)di.metaData;
+ if (webMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(di, "WEB-INF/webservices.xml");
+ if (wsMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+ // Copy the attachments
+ dep.addAttachment(WebservicesMetaData.class, wsMetaData);
+ dep.addAttachment(WebMetaData.class, webMetaData);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
+ {
+ String servletLink = pcmd.getServletLink();
+ if (servletLink == null)
+ throw new IllegalStateException("servlet-link cannot be null");
+
+ Servlet servlet = getServletForName(webMetaData, servletLink);
+ String servletClass = servlet.getServletClass();
+
+ try
+ {
+ ClassLoader loader = dep.getInitialClassLoader();
+ Class<?> epBean = loader.loadClass(servletClass.trim());
+
+ // If this is a servlet we defer the the bean creation
+ if (javax.servlet.Servlet.class.isAssignableFrom(epBean))
+ servletClass = null;
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + servletClass);
+ }
+
+ // Create the endpoint
+ Endpoint ep = newEndpoint(servletClass);
+ ep.setShortName(servletLink);
+ service.addEndpoint(ep);
+ }
+ }
+
+ return dep;
+ }
+
+ private Servlet getServletForName(WebMetaData wmd, String servletLink)
+ {
+ 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();
+ if (servletLink.equals(servletName))
+ {
+ return new Servlet(servletName, servletClass);
+ }
+ }
+ throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ if (super.isWebServiceDeployment(unit) == false)
+ return false;
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
+ return wsMetaData != null;
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookEJB3.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookEJB3.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookEJB3.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,121 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: JAXWSDeployerHookEJB3.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.wsf.common.URLLoaderAdapter;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+
+/**
+ * A deployer JAXWS EJB3 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXWSDeployerHookEJB3 extends AbstractDeployerHookEJB
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXWS_EJB3;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentInfo di)
+ {
+ ArchiveDeployment dep = newDeployment(di);
+ dep.setRootFile(new URLLoaderAdapter(di.localUrl));
+ dep.setRuntimeClassLoader(di.ucl);
+ dep.setType(getDeploymentType());
+
+ Service service = dep.getService();
+
+ Ejb3ModuleMBean ejb3Module = EJBArchiveMetaDataAdapterEJB3.getEJB3Module(di.deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof EJBContainer)
+ {
+ EJBContainer container = (EJBContainer)manager;
+ if (isWebServiceBean(container))
+ {
+ String ejbName = container.getEjbName();
+ String epBean = container.getBeanClassName();
+
+ // Create the endpoint
+ Endpoint ep = newEndpoint(epBean);
+ ep.setShortName(ejbName);
+ service.addEndpoint(ep);
+ }
+ }
+ }
+
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ boolean isWebserviceDeployment = false;
+
+ // Check if the ejb3 contains annotated endpoints
+ Ejb3ModuleMBean ejb3Module = EJBArchiveMetaDataAdapterEJB3.getEJB3Module(unit.deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof EJBContainer)
+ {
+ EJBContainer container = (EJBContainer)manager;
+ if (isWebServiceBean(container))
+ {
+ isWebserviceDeployment = true;
+ break;
+ }
+ }
+ }
+
+ return isWebserviceDeployment;
+ }
+
+ private boolean isWebServiceBean(EJBContainer container)
+ {
+ boolean isWebServiceBean = false;
+ if (container instanceof StatelessContainer)
+ {
+ boolean isWebService = container.resolveAnnotation(WebService.class) != null;
+ boolean isWebServiceProvider = container.resolveAnnotation(WebServiceProvider.class) != null;
+ isWebServiceBean = isWebService || isWebServiceProvider;
+ }
+ return isWebServiceBean;
+ }
+}
\ No newline at end of file
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,142 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: JAXWSDeployerHookJSE.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.common.URLLoaderAdapter;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+
+/**
+ * A deployer JAXWS JSE Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXWSDeployerHookJSE extends AbstractDeployerHookJSE
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXWS_JSE;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentInfo di)
+ {
+ ArchiveDeployment dep = newDeployment(di);
+ dep.setRootFile(new URLLoaderAdapter(di.localUrl));
+ dep.setRuntimeClassLoader(null);
+ dep.setType(getDeploymentType());
+
+ Service service = dep.getService();
+
+ WebMetaData webMetaData = (WebMetaData)di.metaData;
+ if (webMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+ // Copy the attachments
+ dep.addAttachment(WebMetaData.class, webMetaData);
+
+ List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl);
+ for (Servlet servlet : servlets)
+ {
+ String servletName = servlet.getServletName();
+ String servletClass = servlet.getServletClass();
+
+ // Create the endpoint
+ Endpoint ep = newEndpoint(servletClass);
+ ep.setShortName(servletName);
+ service.addEndpoint(ep);
+ }
+
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ if (super.isWebServiceDeployment(unit) == false)
+ return false;
+
+ boolean isWebServiceDeployment = false;
+ try
+ {
+ WebMetaData webMetaData = (WebMetaData)unit.metaData;
+ List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
+ isWebServiceDeployment = servlets.size() > 0;
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot process web deployment", ex);
+ }
+
+ return isWebServiceDeployment;
+ }
+
+ private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader)
+ {
+ List<Servlet> servlets = new ArrayList<Servlet>();
+ Iterator it = webMetaData.getServletClassMap().entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Entry)it.next();
+ String servletName = (String)entry.getKey();
+ String servletClassName = (String)entry.getValue();
+
+ // Skip JSPs
+ if (servletClassName == null || servletClassName.length() == 0)
+ continue;
+
+ try
+ {
+ Class<?> servletClass = loader.loadClass(servletClassName.trim());
+ boolean isWebService = servletClass.isAnnotationPresent(WebService.class);
+ boolean isWebServiceProvider = servletClass.isAnnotationPresent(WebServiceProvider.class);
+ if (isWebService || isWebServiceProvider)
+ servlets.add(new Servlet(servletName, servletClassName));
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + servletClassName);
+ continue;
+ }
+ }
+ return servlets;
+ }
+}
\ No newline at end of file
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JSEArchiveMetaDataAdapter.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JSEArchiveMetaDataAdapter.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JSEArchiveMetaDataAdapter.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,143 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: JSEArchiveMetaDataAdapter.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.J2eeApplicationMetaData;
+import org.jboss.deployment.J2eeModuleMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.WebSecurityMetaData;
+import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData.PublishLocationAdapter;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
+
+/**
+ * Build container independent web meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class JSEArchiveMetaDataAdapter
+{
+ public JSEArchiveMetaData buildUnifiedWebMetaData(Deployment dep, DeploymentInfo di)
+ {
+ String contextRoot = null;
+
+ WebMetaData wmd = (WebMetaData)di.metaData;
+ dep.addAttachment(WebMetaData.class, wmd);
+
+ if (di.parent != null)
+ {
+ J2eeApplicationMetaData appmd = (J2eeApplicationMetaData)di.parent.metaData;
+ Iterator it = appmd.getModules();
+ while (it.hasNext())
+ {
+ J2eeModuleMetaData module = (J2eeModuleMetaData)it.next();
+ if (module.getFileName().equals(dep.getSimpleName()))
+ contextRoot = module.getWebContext();
+ }
+ }
+
+ if (contextRoot == null)
+ contextRoot = wmd.getContextRoot();
+
+ JSEArchiveMetaData webMetaData = new JSEArchiveMetaData();
+ webMetaData.setContextRoot(contextRoot);
+ webMetaData.setServletMappings(wmd.getServletMappings());
+ webMetaData.setServletClassNames(getServletClassMap(wmd));
+ webMetaData.setConfigName(wmd.getConfigName());
+ webMetaData.setConfigFile(wmd.getConfigFile());
+ webMetaData.setSecurityDomain(wmd.getSecurityDomain());
+ webMetaData.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
+ webMetaData.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
+
+ return webMetaData;
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ return wmd.getWsdlPublishLocationByName(name);
+ }
+ };
+ }
+
+ private List<JSESecurityMetaData> getSecurityMetaData(final Iterator securityConstraints)
+ {
+ ArrayList<JSESecurityMetaData> unifiedsecurityMetaData = new ArrayList<JSESecurityMetaData>();
+
+ while (securityConstraints.hasNext())
+ {
+ WebSecurityMetaData securityMetaData = (WebSecurityMetaData)securityConstraints.next();
+
+ JSESecurityMetaData current = new JSESecurityMetaData();
+ unifiedsecurityMetaData.add(current);
+
+ current.setTransportGuarantee(securityMetaData.getTransportGuarantee());
+
+ HashMap resources = securityMetaData.getWebResources();
+ for (Object webResourceObj : resources.values())
+ {
+ WebResourceCollection webResource = (WebResourceCollection)webResourceObj;
+ JSEResourceCollection currentResource = current.addWebResource(webResource.getName());
+ for (String currentPattern : webResource.getUrlPatterns())
+ {
+ currentResource.addPattern(currentPattern);
+ }
+ }
+
+ }
+
+ return unifiedsecurityMetaData;
+ }
+
+ private 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;
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ModifyWebMetaDataDeploymentAspect.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ModifyWebMetaDataDeploymentAspect.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,64 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: ModifyWebMetaDataDeployer.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * A deployer that modifies the web.xml meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ModifyWebMetaDataDeploymentAspect extends DeploymentAspect
+{
+ private WebXMLRewriterImpl webXMLRewriter;
+
+ public void setWebXMLRewriter(WebXMLRewriterImpl serviceEndpointPublisher)
+ {
+ this.webXMLRewriter = serviceEndpointPublisher;
+ }
+
+ public void create(Deployment dep)
+ {
+ RewriteResults results = webXMLRewriter.rewriteWebXml(dep);
+
+ // The endpoint may not have a target bean when
+ // <servlet-class> originally contained a javax.servlet.Servlet
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ if (ep.getTargetBeanName() == null)
+ {
+ String servletName = ep.getShortName();
+ String beanClassName = results.sepTargetMap.get(servletName);
+ if (beanClassName == null)
+ throw new IllegalStateException("Cannot obtain target bean for: " + servletName);
+
+ ep.setTargetBeanName(beanClassName);
+ }
+ }
+ }
+}
\ No newline at end of file
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/RewriteResults.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/RewriteResults.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/RewriteResults.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,38 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import java.net.URL;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 19, 2007
+ */
+public class RewriteResults
+{
+ // The URL to the rewritten web.xml
+ public URL webXML;
+ // Maps the servlet name to the target bean
+ public Map<String, String> sepTargetMap = new HashMap<String, String>();
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityAdapterFactoryImpl.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityAdapterFactoryImpl.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityAdapterFactoryImpl.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 24, 2007
+ */
+public class SecurityAdapterFactoryImpl extends SecurityAdaptorFactory
+{
+ public SecurityAdaptor newSecurityAdapter()
+ {
+ return new SecurityAdaptorImpl();
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityAdaptorImpl.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityAdaptorImpl.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityAdaptorImpl.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,62 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: SecurityAdaptorImpl.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.security.Principal;
+
+import org.jboss.security.SecurityAssociation;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+
+/**
+ * A JBoss specific SecurityAssociationAdaptor
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class SecurityAdaptorImpl implements SecurityAdaptor
+{
+ SecurityAdaptorImpl()
+ {
+ }
+
+ public Principal getPrincipal()
+ {
+ return SecurityAssociation.getPrincipal();
+ }
+
+ public void setPrincipal(Principal pricipal)
+ {
+ SecurityAssociation.setPrincipal(pricipal);
+ }
+
+ public Object getCredential()
+ {
+ return SecurityAssociation.getCredential();
+ }
+
+ public void setCredential(Object credential)
+ {
+ SecurityAssociation.setCredential(credential);
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityHandlerEJB21.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityHandlerEJB21.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityHandlerEJB21.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,78 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: SecurityHandlerEJB21.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.dom4j.Element;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.AssemblyDescriptorMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.SecurityHandler;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class SecurityHandlerEJB21 implements SecurityHandler
+{
+ public void addSecurityDomain(Element jbossWeb, Deployment dep)
+ {
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ if (appMetaData == null)
+ throw new IllegalStateException("Cannot obtain application meta data");
+
+ String securityDomain = appMetaData.getSecurityDomain();
+ if (securityDomain != null)
+ {
+ if (securityDomain.startsWith("java:/jaas/") == false)
+ securityDomain = "java:/jaas/" + securityDomain;
+
+ jbossWeb.addElement("security-domain").addText(securityDomain);
+ }
+ }
+
+ public void addSecurityRoles(Element webApp, Deployment dep)
+ {
+ // Fix: http://jira.jboss.org/jira/browse/JBWS-309
+ ApplicationMetaData applMetaData = dep.getAttachment(ApplicationMetaData.class);
+ AssemblyDescriptorMetaData assemblyDescriptor = applMetaData.getAssemblyDescriptor();
+ if (assemblyDescriptor != null)
+ {
+ Map securityRoles = assemblyDescriptor.getSecurityRoles();
+ if (securityRoles != null)
+ {
+ Iterator it = securityRoles.keySet().iterator();
+ while (it.hasNext())
+ {
+ webApp.addElement("security-role").addElement("role-name").addText((String)it.next());
+ }
+ }
+ }
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityHandlerEJB3.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityHandlerEJB3.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/SecurityHandlerEJB3.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,121 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: SecurityHandlerEJB3.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import javax.annotation.security.RolesAllowed;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.dom4j.Element;
+import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.SecurityHandler;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class SecurityHandlerEJB3 implements SecurityHandler
+{
+ public void addSecurityDomain(Element jbossWeb, Deployment dep)
+ {
+ String securityDomain = null;
+
+ ObjectName deployedObject = (ObjectName)dep.getProperty(EJBArchiveMetaDataAdapterEJB3.DEPLOYED_OBJECT);
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof StatelessContainer)
+ {
+ StatelessContainer container = (StatelessContainer)manager;
+
+ SecurityDomain anSecurityDomain = (SecurityDomain)container.resolveAnnotation(SecurityDomain.class);
+ if (anSecurityDomain != null)
+ {
+ if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
+ throw new IllegalStateException("Multiple security domains not supported");
+
+ securityDomain = anSecurityDomain.value();
+ }
+ }
+ }
+
+ if (securityDomain != null)
+ {
+ if (securityDomain.startsWith("java:/jaas/") == false)
+ securityDomain = "java:/jaas/" + securityDomain;
+
+ jbossWeb.addElement("security-domain").addText(securityDomain);
+ }
+ }
+
+ public void addSecurityRoles(Element webApp, Deployment dep)
+ {
+ // The container objects below provide access to all of the ejb metadata
+ ObjectName deployedObject = (ObjectName)dep.getProperty(EJBArchiveMetaDataAdapterEJB3.DEPLOYED_OBJECT);
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof StatelessContainer)
+ {
+ StatelessContainer container = (StatelessContainer)manager;
+
+ RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
+ if (anRolesAllowed != null)
+ {
+ for (String role : anRolesAllowed.value())
+ {
+ webApp.addElement("security-role").addElement("role-name").addText(role);
+ }
+ }
+ }
+ }
+ }
+
+ private Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
+ {
+ Ejb3ModuleMBean ejb3Module;
+ try
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
+ if (ejb3Module == null)
+ throw new WSFDeploymentException("Cannot obtain EJB3 module: " + objectName);
+
+ return ejb3Module;
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new WSFDeploymentException("Cannot obtain proxy to EJB3 module");
+ }
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ServiceEndpointInterceptor.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ServiceEndpointInterceptor.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/ServiceEndpointInterceptor.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,126 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: ServiceEndpointInterceptor.java 4116 2007-08-02 16:39:02Z thomas.diesler(a)jboss.com $
+
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+
+import org.jboss.ejb.plugins.AbstractInterceptor;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+
+/**
+ * This Interceptor does the ws4ee handler processing.
+ *
+ * According to the ws4ee spec the handler logic must be invoked after the container
+ * applied method level security to the invocation.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-Sep-2005
+ */
+public class ServiceEndpointInterceptor extends AbstractInterceptor
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServiceEndpointInterceptor.class);
+
+ // Interceptor implementation --------------------------------------
+
+ /** Before and after we call the service endpoint bean, we process the handler chains.
+ */
+ public Object invoke(final org.jboss.invocation.Invocation jbInv) throws Exception
+ {
+ // If no msgContext, it's not for us
+ SOAPMessageContext msgContext = (SOAPMessageContext)jbInv.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+ if (msgContext == null)
+ {
+ return getNext().invoke(jbInv);
+ }
+
+ // Get the endpoint invocation
+ Invocation wsInv = (Invocation)jbInv.getValue(Invocation.class.getName());
+
+ // Get the handler callback
+ HandlerCallback callback = (HandlerCallback)jbInv.getValue(HandlerCallback.class.getName());
+
+ // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
+ if (callback != null && wsInv != null)
+ {
+ try
+ {
+ // call the request handlers
+ boolean handlersPass = callback.callRequestHandlerChain(wsInv, HandlerType.ENDPOINT);
+ handlersPass = handlersPass && callback.callRequestHandlerChain(wsInv, HandlerType.POST);
+
+ // Call the next interceptor in the chain
+ if (handlersPass)
+ {
+ // The SOAPContentElements stored in the EndpointInvocation might have changed after
+ // handler processing. Get the updated request payload. This should be a noop if request
+ // handlers did not modify the incomming SOAP message.
+ Object[] reqParams = wsInv.getArgs();
+ jbInv.setArguments(reqParams);
+ Object resObj = getNext().invoke(jbInv);
+
+ // Setting the message to null should trigger binding of the response message
+ msgContext.setMessage(null);
+ wsInv.setReturnValue(resObj);
+ }
+
+ // call the response handlers
+ handlersPass = callback.callResponseHandlerChain(wsInv, HandlerType.POST);
+ handlersPass = handlersPass && callback.callResponseHandlerChain(wsInv, HandlerType.ENDPOINT);
+
+ // update the return value after response handler processing
+ Object resObj = wsInv.getReturnValue();
+
+ return resObj;
+ }
+ catch (Exception ex)
+ {
+ try
+ {
+ // call the fault handlers
+ boolean handlersPass = callback.callFaultHandlerChain(wsInv, HandlerType.POST, ex);
+ handlersPass = handlersPass && callback.callFaultHandlerChain(wsInv, HandlerType.ENDPOINT, ex);
+ }
+ catch (Exception subEx)
+ {
+ log.warn("Cannot process handlerChain.handleFault, ignoring: ", subEx);
+ }
+ throw ex;
+ }
+ finally
+ {
+ // do nothing
+ }
+ }
+ else
+ {
+ log.warn("Handler callback not available");
+ return getNext().invoke(jbInv);
+ }
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDeployingHttpServer.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDeployingHttpServer.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDeployingHttpServer.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,236 @@
+/*
+ * 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.wsf.container.jboss40;
+
+//$Id: JBossHttpServer.java 1786 2007-01-04 14:30:04Z thomas.diesler(a)jboss.com $
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Map;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.w3c.dom.Element;
+
+/**
+ * A Tomcat HTTP Server
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public class WebAppDeployingHttpServer extends AbstractExtensible implements HttpServer
+{
+ private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+ // The MBeanServer
+ private MBeanServer mbeanServer;
+
+ public MBeanServer getMbeanServer()
+ {
+ return mbeanServer;
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+
+ /** Start an instance of this HTTP server */
+ public void start()
+ {
+ // verify required properties
+ }
+
+ /** Create an HTTP context */
+ public HttpContext createContext(String contextRoot)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ HttpContext httpContext = spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+ return httpContext;
+ }
+
+ /** Publish an JAXWS endpoint to the HTTP server */
+ public void publish(HttpContext context, Endpoint endpoint)
+ {
+ Class implClass = getImplementorClass(endpoint);
+ String implName = implClass.getName();
+
+ try
+ {
+ Element webDoc = createWebAppDescriptor(context, endpoint);
+ Element jbossDoc = createJBossWebAppDescriptor(context, endpoint);
+
+ File tmpWar = null;
+ try
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ File tmpDir = new File(serverConfig.getServerTempDir().getCanonicalPath() + "/jbossws");
+ tmpDir.mkdirs();
+
+ String deploymentName = implName.substring(implName.lastIndexOf(".") + 1);
+ tmpWar = File.createTempFile(deploymentName, ".war", tmpDir);
+ tmpWar.delete();
+ File webInf = new File(tmpWar, "WEB-INF");
+ webInf.mkdirs();
+
+ File webXml = new File(webInf, "web.xml");
+ FileWriter fw = new FileWriter(webXml);
+ new DOMWriter(fw).setPrettyprint(true).print(webDoc);
+ fw.close();
+
+ File jbossWebXml = new File(webInf, "jboss-web.xml");
+ fw = new FileWriter(jbossWebXml);
+ new DOMWriter(fw).setPrettyprint(true).print(jbossDoc);
+ fw.close();
+ }
+ catch (IOException e)
+ {
+ throw new WebServiceException("Failed to create webservice war", e);
+ }
+
+ Map<String, Object> epProps = endpoint.getProperties();
+ epProps.put("jbossws-endpoint-war-url", tmpWar);
+
+ URL tmpURL = tmpWar.toURL();
+ getMbeanServer().invoke(new ObjectName(MAIN_DEPLOYER), "deploy", new Object[] { tmpURL }, new String[] { "java.net.URL" });
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ /** Destroys an JAXWS endpoint on the HTTP server */
+ public void destroy(HttpContext context, Endpoint endpoint)
+ {
+ Map<String, Object> epProps = endpoint.getProperties();
+ File tmpWar = (File)epProps.get("jbossws-endpoint-war-url");
+ if (tmpWar == null)
+ throw new IllegalStateException("Cannot find endpoint war property");
+
+ try
+ {
+ URL tmpURL = tmpWar.toURL();
+ getMbeanServer().invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] { tmpURL }, new String[] { "java.net.URL" });
+
+ tmpWar.delete();
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ private Class getImplementorClass(Endpoint endpoint)
+ {
+ Object implementor = endpoint.getImplementor();
+ Class implClass = (implementor instanceof Class ? (Class)implementor : implementor.getClass());
+ return implClass;
+ }
+
+ private Element createWebAppDescriptor(HttpContext context, Endpoint endpoint)
+ {
+ Class implClass = getImplementorClass(endpoint);
+ String implName = implClass.getName();
+
+ Element webApp = DOMUtils.createElement("web-app");
+
+ /*
+ <servlet>
+ <servlet-name>
+ <servlet-class>
+ </servlet>
+ */
+ Element servlet = (Element)webApp.appendChild(DOMUtils.createElement("servlet"));
+ Element servletName = (Element)servlet.appendChild(DOMUtils.createElement("servlet-name"));
+ servletName.appendChild(DOMUtils.createTextNode("JAXWSEndpoint"));
+ Element servletClass = (Element)servlet.appendChild(DOMUtils.createElement("servlet-class"));
+ servletClass.appendChild(DOMUtils.createTextNode(implName));
+
+ /*
+ <servlet-mapping>
+ <servlet-name>
+ <url-pattern>
+ </servlet-mapping>
+ */
+ Element servletMapping = (Element)webApp.appendChild(DOMUtils.createElement("servlet-mapping"));
+ servletName = (Element)servletMapping.appendChild(DOMUtils.createElement("servlet-name"));
+ servletName.appendChild(DOMUtils.createTextNode("JAXWSEndpoint"));
+ Element urlPatternElement = (Element)servletMapping.appendChild(DOMUtils.createElement("url-pattern"));
+
+ String urlPattern = "/*";
+ urlPatternElement.appendChild(DOMUtils.createTextNode(urlPattern));
+
+ // Add security-constraint in generated web.xml for Endpoint API
+ // FIXME: JBWS-1069
+
+ return webApp;
+ }
+
+ private Element createJBossWebAppDescriptor(HttpContext context, Endpoint endpoint)
+ {
+ /* Create a jboss-web
+ <jboss-web>
+ <security-domain>java:/jaas/cts</security-domain>
+ <context-root>/ws/ejbN/</context-root>
+ </jboss-web>
+ */
+ Element jbossWeb = DOMUtils.createElement("jboss-web");
+
+ // Get the context root for this deployment
+ String contextRoot = context.getContextRoot();
+ if (contextRoot == null)
+ throw new WebServiceException("Cannot obtain context root");
+
+ Element root = (Element)jbossWeb.appendChild(DOMUtils.createElement("context-root"));
+ root.appendChild(DOMUtils.createTextNode(contextRoot));
+
+ // Add security-constraint in generated web.xml for Endpoint API
+ // FIXME: JBWS-1069
+
+ return jbossWeb;
+ }
+}
\ No newline at end of file
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDeploymentAspect.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDeploymentAspect.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDeploymentAspect.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,110 @@
+/*
+ * 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.wsf.container.jboss40;
+
+// $Id: WebAppDeployerDeployer.java 3183 2007-05-22 13:06:13Z thomas.diesler(a)jboss.com $
+
+import java.net.URL;
+
+import javax.management.MBeanServer;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+
+/**
+ * Publish the HTTP service endpoint to Tomcat
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class WebAppDeploymentAspect extends DeploymentAspect
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(WebAppDeploymentAspect.class);
+
+ private WebXMLRewriterImpl webXMLRewriter;
+
+ public void setWebXMLRewriter(WebXMLRewriterImpl serviceEndpointPublisher)
+ {
+ this.webXMLRewriter = serviceEndpointPublisher;
+ }
+
+ public void create(Deployment dep)
+ {
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
+ if (warURL == null)
+ throw new IllegalStateException("Cannot obtain webapp URL");
+
+ log.debug("publishServiceEndpoint: " + warURL);
+ try
+ {
+ webXMLRewriter.rewriteWebXml(dep);
+
+ DeploymentInfo auxdi = new DeploymentInfo(warURL, null, MBeanServerLocator.locateJBoss());
+
+ // Preserve the repository config
+ DeploymentInfo di = dep.getAttachment(DeploymentInfo.class);
+ if (di != null)
+ auxdi.repositoryConfig = di.getTopRepositoryConfig();
+
+ getMainDeployer().deploy(auxdi);
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ public void destroy(Deployment dep)
+ {
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
+ if (warURL == null)
+ {
+ log.error("Cannot obtain warURL");
+ return;
+ }
+
+ log.debug("destroyServiceEndpoint: " + warURL);
+ try
+ {
+ getMainDeployer().undeploy(warURL);
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ private MainDeployerMBean getMainDeployer() throws MBeanProxyCreationException
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ MainDeployerMBean mainDeployer = (MainDeployerMBean)MBeanProxy.get(MainDeployerMBean.class, MainDeployerMBean.OBJECT_NAME, server);
+ return mainDeployer;
+ }
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDesciptorModifier.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDesciptorModifier.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebAppDesciptorModifier.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,40 @@
+/*
+ * 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.wsf.container.jboss40;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.dom4j.Document;
+
+/**
+ * Modifies the web app according to the stack requirements.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public interface WebAppDesciptorModifier
+{
+ final String SERVLET_CONTEXT_LISTENER = "org.jboss.ws.webapp.ServletContextListener";
+ final String CONTEXT_PARAMETER_MAP = "org.jboss.ws.webapp.ContextParameterMap";
+ final String SERVLET_CLASS = "org.jboss.ws.webapp.ServletClass";
+
+ RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException;
+}
Added: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebXMLRewriterImpl.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebXMLRewriterImpl.java (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/WebXMLRewriterImpl.java 2007-08-02 17:08:25 UTC (rev 4118)
@@ -0,0 +1,121 @@
+/*
+ * 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.wsf.container.jboss40;
+
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.common.IOUtils;
+
+import javax.xml.ws.WebServiceException;
+import java.net.URL;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.FileOutputStream;
+
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
+import org.dom4j.Document;
+
+/**
+ * The rewriter for web.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public class WebXMLRewriterImpl
+{
+ private WebAppDesciptorModifier desciptorModifier;
+
+ public WebXMLRewriterImpl()
+ {
+ this.desciptorModifier = new DefaultWebAppDesciptorModifierImpl();
+ }
+
+ public WebAppDesciptorModifier getDesciptorModifier()
+ {
+ return desciptorModifier;
+ }
+
+ public void setDesciptorModifier(WebAppDesciptorModifier desciptorModifier)
+ {
+ this.desciptorModifier = desciptorModifier;
+ }
+
+ public RewriteResults rewriteWebXml(Deployment dep)
+ {
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
+ File warFile = new File(warURL.getFile());
+ if (warFile.isDirectory() == false)
+ throw new WebServiceException("Expected a war directory: " + warURL);
+
+ File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
+ if (webXML.isFile() == false)
+ throw new WebServiceException("Cannot find web.xml: " + webXML);
+
+ try
+ {
+ // After redeployment there might be a stale copy of the original web.xml.org, we delete it
+ File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
+ orgWebXML.delete();
+
+ // Rename the web.xml
+ if (webXML.renameTo(orgWebXML) == false)
+ throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
+
+ FileInputStream stream = new FileInputStream(orgWebXML);
+ return rewriteWebXml(stream, webXML, dep);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+
+ private RewriteResults rewriteWebXml(InputStream source, File destFile, Deployment dep) throws Exception
+ {
+ if (destFile == null)
+ {
+ destFile = File.createTempFile("jbossws-alt-web", "xml", IOUtils.createTempDirectory());
+ destFile.deleteOnExit();
+ }
+
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(source);
+
+ RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
+ results.webXML = destFile.toURL();
+
+ FileOutputStream fos = new FileOutputStream(destFile);
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ XMLWriter writer = new XMLWriter(fos, format);
+ writer.write(document);
+ writer.close();
+
+ return results;
+ }
+}
Modified: container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml
===================================================================
--- container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml 2007-08-02 16:53:25 UTC (rev 4117)
+++ container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml 2007-08-02 17:08:25 UTC (rev 4118)
@@ -8,7 +8,7 @@
<bean name="WSMBeanServerLocator" class="org.jboss.wsf.framework.management.MBeanServerLocator"/>
<!-- The HTTPServer used by the JAXWS Endpoint API -->
- <bean name="WSHTTPServer" class="org.jboss.wsf.container.jboss42.WebAppDeployingHttpServer">
+ <bean name="WSHTTPServer" class="org.jboss.wsf.container.jboss40.WebAppDeployingHttpServer">
<property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
</bean>
@@ -47,28 +47,28 @@
<!--
Register DeployerHooks with JBoss deployers
-->
- <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.wsf.container.jboss42.JAXRPCDeployerHookJSE">
+ <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.wsf.container.jboss40.JAXRPCDeployerHookJSE">
<property name="phaseOneInterceptors">
<list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
<value>jboss.ws:service=DeployerInterceptorJSE</value>
</list>
</property>
</bean>
- <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss42.JAXRPCDeployerHookEJB21">
+ <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss40.JAXRPCDeployerHookEJB21">
<property name="phaseTwoInterceptors">
<list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
<value>jboss.ws:service=DeployerInterceptorEJB21</value>
</list>
</property>
</bean>
- <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.wsf.container.jboss42.JAXWSDeployerHookJSE">
+ <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.wsf.container.jboss40.JAXWSDeployerHookJSE">
<property name="phaseOneInterceptors">
<list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
<value>jboss.ws:service=DeployerInterceptorJSE</value>
</list>
</property>
</bean>
- <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss42.JAXWSDeployerHookEJB3">
+ <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss40.JAXWSDeployerHookEJB3">
<property name="phaseTwoInterceptors">
<list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
<value>jboss.ws:service=DeployerInterceptorEJB3</value>
@@ -92,7 +92,7 @@
<!--
The container deployment aspects
-->
- <bean name="WSContainerMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss42.ContainerMetaDataDeploymentAspect">
+ <bean name="WSContainerMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss40.ContainerMetaDataDeploymentAspect">
<property name="provides">ContainerMetaData, VFSRoot</property>
<property name="metaDataAdapter"><inject bean="WSContainerMetaDataAdapter"/></property>
</bean>
@@ -134,7 +134,7 @@
<property name="provides">RegisteredEndpoint</property>
</bean>
- <bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss42.ModifyWebMetaDataDeploymentAspect">
+ <bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss40.ModifyWebMetaDataDeploymentAspect">
<property name="requires">ContextProperties, ContainerMetaData</property>
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
</bean>
@@ -144,7 +144,7 @@
<property name="provides">URLPattern</property>
</bean>
- <bean name="WSWebAppDeploymentAspect" class="org.jboss.wsf.container.jboss42.WebAppDeploymentAspect">
+ <bean name="WSWebAppDeploymentAspect" class="org.jboss.wsf.container.jboss40.WebAppDeploymentAspect">
<property name="requires">WebMetaData, ContextProperties</property>
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
</bean>
@@ -158,19 +158,19 @@
<!-- Deployment aspect helper beans -->
<bean name="WSApplicationMetaDataAdapterEJB21" class="org.jboss.wsf.container.jboss40.EJBArchiveMetaDataAdapterEJB21"/>
- <bean name="WSApplicationMetaDataAdapterEJB3" class="org.jboss.wsf.container.jboss42.EJBArchiveMetaDataAdapterEJB3"/>
- <bean name="WSContainerMetaDataAdapter" class="org.jboss.wsf.container.jboss42.ContainerMetaDataAdapter">
+ <bean name="WSApplicationMetaDataAdapterEJB3" class="org.jboss.wsf.container.jboss40.EJBArchiveMetaDataAdapterEJB3"/>
+ <bean name="WSContainerMetaDataAdapter" class="org.jboss.wsf.container.jboss40.ContainerMetaDataAdapter">
<property name="applicationMetaDataAdapterEJB21"><inject bean="WSApplicationMetaDataAdapterEJB21"/></property>
<property name="applicationMetaDataAdapterEJB3"><inject bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject bean="WSWebMetaDataAdapter"/></property>
</bean>
<bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.EndpointMetricsImpl"/>
- <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
- <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
+ <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss40.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss40.SecurityHandlerEJB3"/>
<bean name="WSServiceRefMetaDataAdapter" class="org.jboss.wsf.container.jboss40.ServiceRefMetaDataAdapter"/>
- <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss42.DefaultWebAppDesciptorModifierImpl"/>
- <bean name="WSWebMetaDataAdapter" class="org.jboss.wsf.container.jboss42.JSEArchiveMetaDataAdapter"/>
- <bean name="WSWebXMLRewriter" class="org.jboss.wsf.container.jboss42.WebXMLRewriterImpl">
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss40.DefaultWebAppDesciptorModifierImpl"/>
+ <bean name="WSWebMetaDataAdapter" class="org.jboss.wsf.container.jboss40.JSEArchiveMetaDataAdapter"/>
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.container.jboss40.WebXMLRewriterImpl">
<property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
</bean>
17 years, 4 months