[jboss-cvs] JBossAS SVN: r62942 - in projects: jbws-jboss42 and 60 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 9 07:11:25 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-05-09 07:11:25 -0400 (Wed, 09 May 2007)
New Revision: 62942

Added:
   projects/jbws-jboss42/
   projects/jbws-jboss42/trunk/
   projects/jbws-jboss42/trunk/.classpath
   projects/jbws-jboss42/trunk/.project
   projects/jbws-jboss42/trunk/ant.properties.example
   projects/jbws-jboss42/trunk/build.xml
   projects/jbws-jboss42/trunk/src/
   projects/jbws-jboss42/trunk/src/main/
   projects/jbws-jboss42/trunk/src/main/etc/
   projects/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt
   projects/jbws-jboss42/trunk/src/main/etc/ant-import/
   projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml
   projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml
   projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml
   projects/jbws-jboss42/trunk/src/main/etc/component-info.xml
   projects/jbws-jboss42/trunk/src/main/etc/default.mf
   projects/jbws-jboss42/trunk/src/main/java/
   projects/jbws-jboss42/trunk/src/main/java/org/
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java
   projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java
   projects/jbws-jboss42/trunk/src/main/resources/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.core.server.HttpServer
   projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.beans/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.sar/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/index.html
   projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/styles.css
   projects/jbws-jboss42/trunk/version.properties
   projects/jbws-jboss50/
   projects/jbws-jboss50/trunk/
   projects/jbws-jboss50/trunk/.classpath
   projects/jbws-jboss50/trunk/.project
   projects/jbws-jboss50/trunk/ant.properties.example
   projects/jbws-jboss50/trunk/build.xml
   projects/jbws-jboss50/trunk/src/
   projects/jbws-jboss50/trunk/src/main/
   projects/jbws-jboss50/trunk/src/main/etc/
   projects/jbws-jboss50/trunk/src/main/etc/JBossORG-EULA.txt
   projects/jbws-jboss50/trunk/src/main/etc/ant-import/
   projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml
   projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml
   projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-thirdparty.xml
   projects/jbws-jboss50/trunk/src/main/etc/component-info.xml
   projects/jbws-jboss50/trunk/src/main/etc/default.mf
   projects/jbws-jboss50/trunk/src/main/java/
   projects/jbws-jboss50/trunk/src/main/java/org/
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/DeployerHook.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerJSE.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceMainDeployer.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHook.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookEJB.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookJSE.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ArchiveDeployerHook.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/MainDeployerHook.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/SecurityAssociationAdaptorFactoryImpl.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointInterceptor.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/VirtualFileAdaptor.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java
   projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java
   projects/jbws-jboss50/trunk/src/main/resources/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.ws.core.server.HttpServer
   projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.deployer/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.deployer/META-INF/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.sar/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/index.html
   projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/styles.css
   projects/jbws-jboss50/trunk/version.properties
   projects/spi/
   projects/spi/trunk/
   projects/spi/trunk/.classpath
   projects/spi/trunk/.project
   projects/spi/trunk/ant.properties.example
   projects/spi/trunk/build.xml
   projects/spi/trunk/src/
   projects/spi/trunk/src/main/
   projects/spi/trunk/src/main/etc/
   projects/spi/trunk/src/main/etc/JBossORG-EULA.txt
   projects/spi/trunk/src/main/etc/ant-import/
   projects/spi/trunk/src/main/etc/ant-import/build-release.xml
   projects/spi/trunk/src/main/etc/ant-import/build-thirdparty.xml
   projects/spi/trunk/src/main/etc/component-info.xml
   projects/spi/trunk/src/main/etc/default.mf
   projects/spi/trunk/src/main/java/
   projects/spi/trunk/src/main/java/org/
   projects/spi/trunk/src/main/java/org/jboss/
   projects/spi/trunk/src/main/java/org/jboss/ws/
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/Endpoint.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/KernelLocator.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/Service.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefElement.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployer.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManager.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployment.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContext.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/EndpointRegistryDeployer.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/WSDeploymentException.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationContext.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationHandler.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigFactory.java
   projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java
   projects/spi/trunk/version.properties
Log:
Import wsintegration

Added: projects/jbws-jboss42/trunk/.classpath
===================================================================
--- projects/jbws-jboss42/trunk/.classpath	                        (rev 0)
+++ projects/jbws-jboss42/trunk/.classpath	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-4.2.x"/>
+	<classpathentry kind="output" path="output-eclipse"/>
+</classpath>

Added: projects/jbws-jboss42/trunk/.project
===================================================================
--- projects/jbws-jboss42/trunk/.project	                        (rev 0)
+++ projects/jbws-jboss42/trunk/.project	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jbws-jboss42</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: projects/jbws-jboss42/trunk/ant.properties.example
===================================================================
--- projects/jbws-jboss42/trunk/ant.properties.example	                        (rev 0)
+++ projects/jbws-jboss42/trunk/ant.properties.example	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,26 @@
+#
+# A sample ant properties file
+#
+# $Id: ant.properties.example 2870 2007-04-15 14:54:22Z thomas.diesler at jboss.com $
+
+# JBoss Home
+#jboss42.home=/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA
+
+# The JBoss server instance
+jboss.server.instance=default
+
+# JBoss Repository
+#jboss.repository=file:/home/tdiesler/svn/jboss.local.repository
+jboss.repository=http://repository.jboss.org
+
+# JBossWS Release
+jboss.local.repository=/home/tdiesler/svn/jboss.local.repository
+
+# Force thirdparty HTTP get
+#force.thirdparty.get=true
+
+# Java Compiler options
+javac.debug=yes
+javac.deprecation=yes
+javac.fail.onerror=yes
+javac.verbose=no

Added: projects/jbws-jboss42/trunk/build.xml
===================================================================
--- projects/jbws-jboss42/trunk/build.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/build.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,208 @@
+<?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$ -->
+
+<project default="main"  basedir="." name="JBossWS-JBoss42">
+  
+  <import file="${basedir}/src/main/etc/ant-import/build-deploy.xml"/>
+  <import file="${basedir}/src/main/etc/ant-import/build-release.xml"/>
+  <import file="${basedir}/src/main/etc/ant-import/build-thirdparty.xml"/>
+  
+  <!-- ================================================================== -->
+  <!-- Setup                                                              -->
+  <!-- ================================================================== -->
+  
+  <property file="${basedir}/ant.properties"/>
+  <property file="${basedir}/version.properties"/>
+  <property environment="env"/>
+  
+  <property name="jboss42.lib" value="${jboss42.home}/lib"/>
+  <property name="jboss42.client" value="${jboss42.home}/client"/>
+  <property name="jboss42.server" value="${jboss42.home}/server/${jboss.server.instance}"/>
+  <property name="jboss42.server.lib" value="${jboss42.server}/lib"/>
+  <property name="jboss42.server.deploy" value="${jboss42.server}/deploy"/>
+  <property name="jboss42.thirdparty" value="${jboss42.home}/../../../thirdparty"/>
+  
+  <property name="jboss42.dir" value="${basedir}"/>
+  <property name="jboss42.src.dir" value="${jboss42.dir}/src/main"/>
+  <property name="jboss42.etc.dir" value="${jboss42.src.dir}/etc"/>
+  <property name="jboss42.java.dir" value="${jboss42.src.dir}/java"/>
+  <property name="jboss42.resources.dir" value="${jboss42.src.dir}/resources"/>
+  <property name="jboss42.output.dir" value="${jboss42.dir}/output"/>
+  <property name="jboss42.output.classes.dir" value="${jboss42.output.dir}/classes"/>
+  <property name="jboss42.output.etc.dir" value="${jboss42.output.dir}/etc"/>
+  <property name="jboss42.output.lib.dir" value="${jboss42.output.dir}/lib"/>
+
+  <property name="thirdparty.dir" value="${basedir}/thirdparty"/>
+	
+  <property name="jboss42.available.file" value="${jboss42.client}/jboss-client.jar"/>
+  <available property="jboss42.available" file="${jboss42.available.file}"/>
+	
+  <!-- ================================================================== -->
+  <!-- Initialization                                                     -->
+  <!-- ================================================================== -->
+  
+  <target name="prepare">
+    
+    <mkdir dir="${jboss42.output.dir}"/>
+    
+    <checksum file="${basedir}/version.properties" fileext=".md5" verifyproperty="checksum.ok"/>
+    <checksum file="${basedir}/version.properties" fileext=".md5"/>
+    
+    <condition property="force.thirdparty.get">
+      <or>
+        <not>
+          <available file="${thirdparty.dir}" type="dir"/>
+        </not>
+        <isfalse value="${checksum.ok}"/>
+      </or>
+    </condition>
+    
+    <tstamp>
+      <format property="build.id" pattern="yyyyMMddHHmm"/>
+    </tstamp>
+	  
+  </target>
+	
+  <target name="jboss42-init" depends="prepare, thirdparty">
+    <fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
+    <available file="${jboss42.client}/jboss-ejb3-client.jar" property="jboss42.ejb3.available"/>
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Compile                                                            -->
+  <!-- ================================================================== -->
+  
+  <!--
+  | Compile everything.
+  |
+  | This target should depend on other compile-* targets for each
+  | different type of compile that needs to be performed, short of
+  | documentation compiles.
+  -->
+  
+  <target name="jboss42-compile" depends="jboss42-compile-classes,jboss42-compile-etc" description="Compile all source files."/>
+  
+  <!-- Compile integration java sources -->
+  <target name="jboss42-compile-classes" depends="jboss42-init">
+    <mkdir dir="${jboss42.output.classes.dir}"/>
+    <javac srcdir="${jboss42.java.dir}" sourcepath="" destdir="${jboss42.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
+      deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
+      <include name="org/jboss/ws/integration/jboss42/**"/>
+      <classpath refid="jboss42.integration.classpath"/>
+    </javac>
+  </target>
+  
+  <!-- Compile etc files (manifests and such) -->
+  <target name="jboss42-compile-etc" depends="jboss42-init">
+    <mkdir dir="${jboss42.output.etc.dir}"/>
+    <copy todir="${jboss42.output.etc.dir}" filtering="yes" overwrite="yes">
+      <fileset dir="${jboss42.etc.dir}">
+        <include name="component-info.xml"/>
+        <include name="default.mf"/>
+  	  </fileset>
+      <filterset>
+        <filter token="java.vm.version" value="${java.vm.version}"/>
+        <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="${basedir}/version.properties"/>
+      </filterset>
+    </copy>
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Archives                                                           -->
+  <!-- ================================================================== -->
+  
+  <!--
+  | Build all jar files.
+  -->
+  <target name="jboss42-jars"  depends="jboss42-compile,jboss42-module-jars" description="Builds all jar files.">
+  </target>
+  
+  <!--
+  |  Build all jar files.
+  -->
+  <target name="jboss42-module-jars" depends="jboss42-init">
+    
+    <!-- Build jbossws-jboss42.jar -->
+    <mkdir dir="${jboss42.output.lib.dir}"/>
+    <jar jarfile="${jboss42.output.lib.dir}/jbossws-jboss42.jar" manifest="${jboss42.output.etc.dir}/default.mf">
+      <fileset dir="${jboss42.output.classes.dir}">
+        <include name="org/jboss/ws/integration/jboss42/**"/>
+      </fileset>
+      <metainf dir="${jboss42.resources.dir}/jbossws-jboss42.jar/META-INF"/>
+    </jar>
+    
+    <!-- Build jbossws-context.war -->
+    <war warfile="${jboss42.output.lib.dir}/jbossws-context.war" webxml="${jboss42.resources.dir}/jbossws.war/WEB-INF/web.xml">
+      <fileset dir="${jboss42.resources.dir}/jbossws.war">
+        <include name="index.html"/>
+        <include name="styles.css"/>
+      </fileset>
+      <webinf dir="${jboss42.resources.dir}/jbossws.war/WEB-INF">
+        <include name="jboss-web.xml"/>
+      </webinf>
+    </war>
+    
+    <!-- Build jbossws42.sar -->
+    <jar jarfile="${jboss42.output.lib.dir}/jbossws42.sar" manifest="${jboss42.output.etc.dir}/default.mf">
+      <fileset dir="${jboss42.output.lib.dir}">
+        <include name="jbossws-jboss42.jar"/>
+        <include name="jbossws-context.war"/>
+      </fileset>
+      <fileset dir="${thirdparty.dir}">
+        <include name="jaxb-api.jar"/>
+        <include name="jaxb-impl.jar"/>
+        <include name="policy.jar"/>
+        <include name="stax-api.jar"/>
+        <include name="wsdl4j.jar"/>
+        <include name="xmlsec.jar"/>
+        <include name="jboss-jaxws.jar"/>
+        <include name="jbossws-core.jar"/>
+        <include name="jbossws-spi.jar"/>
+      </fileset>
+      <fileset dir="${jboss42.resources.dir}">
+        <include name="jbossws.beans/META-INF/jboss-beans.xml"/>
+      </fileset>
+      <metainf dir="${thirdparty.dir}/jbossws-resources">
+        <include name="standard-*-config.xml"/>
+      </metainf>
+      <metainf dir="${jboss42.resources.dir}/jbossws.sar/META-INF">
+        <include name="jboss-service.xml"/>
+      </metainf>
+    </jar>
+    
+    <!-- Build jbossws42-src.zip -->
+    <zip zipfile="${jboss42.output.lib.dir}/jbossws42-src.zip" >
+      <fileset dir="${jboss42.java.dir}"/>
+    </zip>
+    
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Miscellaneous                                                       -->
+  <!-- ================================================================== -->
+  
+  <target name="clean" depends="prepare" description="Cleans up most generated files.">
+    <delete dir="${jboss42.output.dir}"/>
+  </target>
+  
+  <target name="main" description="Executes the default target (most)." depends="most"/>
+  
+  <target name="most" description="Builds almost everything." depends="jboss42-jars"/>
+  
+  <target name="all" description="Create a distribution zip file" depends="main">
+  </target>
+  
+</project>


Property changes on: projects/jbws-jboss42/trunk/build.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt
===================================================================
--- projects/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,107 @@
+LICENSE AGREEMENT
+JBOSS(r)
+
+This License Agreement governs the use of the Software Packages and any updates to the Software 
+Packages, regardless of the delivery mechanism.  Each Software Package is a collective work 
+under U.S. Copyright Law.  Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to 
+the user ("Client") a license to the applicable collective work(s) pursuant to the 
+GNU Lesser General Public License v. 2.1 except for the following Software Packages: 
+(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to the 
+GNU General Public License v.2; 
+
+(b) JBoss Rules, which is licensed pursuant to the Apache  License v.2.0;
+
+(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is licensed under the 
+(open source) Sleepycat License (if Client does not wish to use the open source version of this database, 
+it may purchase a license from Sleepycat Software); 
+
+and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public License v.1, 
+and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to enter various 
+royalty-free patent licenses.  
+
+Each of the foregoing licenses is available at http://www.opensource.org/licenses/index.php.
+
+1.  The Software.  "Software Packages" refer to the various software modules that are created and made available 
+for distribution by the JBoss.org open source community at http://www.jboss.org.   Each of the Software Packages 
+may be comprised of hundreds of software components.  The end user license agreement for each component is located in 
+the component's source code.  With the exception of certain image files identified in Section 2 below, 
+the license terms for the components permit Client to copy, modify, and redistribute the component, 
+in both source code and binary code forms.  This agreement does not limit Client's rights under, 
+or grant Client rights that supersede, the license terms of any particular component.
+
+2.  Intellectual Property Rights.  The Software Packages are owned by Red Hat and others and are protected under copyright 
+and other laws.  Title to the Software Packages and any component, or to any copy, modification, or merged portion shall 
+remain with the aforementioned, subject to the applicable license.  The "JBoss" trademark, "Red Hat" trademark, the 
+individual Software Package trademarks, and the "Shadowman" logo are registered trademarks of Red Hat and its affiliates 
+in the U.S. and other countries.  This agreement permits Client to distribute unmodified copies of the Software Packages 
+using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the condition that Client follows Red Hat's 
+trademark guidelines for those trademarks located at http://www.redhat.com/about/corporate/trademark/.  Client must abide by 
+these trademark guidelines when distributing the Software Packages, regardless of whether the Software Packages have been modified. 
+If Client modifies the Software Packages, then Client must replace all Red Hat trademarks and logos identified at 
+http://www.jboss.com/company/logos, unless a separate agreement with Red Hat is executed or other permission granted.  
+Merely deleting the files containing the Red Hat trademarks may corrupt the Software Packages.  
+
+3.  Limited Warranty.  Except as specifically stated in this Paragraph 3 or a license for a particular 
+component, to the maximum extent permitted under applicable law, the Software Packages and the 
+components are provided and licensed "as is" without warranty of any kind, expressed or implied, 
+including the implied warranties of merchantability, non-infringement or fitness for a particular purpose.  
+Red Hat warrants that the media on which Software Packages may be furnished will be free from defects in 
+materials and manufacture under normal use for a period of 30 days from the date of delivery to Client.  
+Red Hat does not warrant that the functions contained in the Software Packages will meet Client's requirements 
+or that the operation of the Software Packages will be entirely error free or appear precisely as described 
+in the accompanying documentation. This warranty extends only to the party that purchases the Services 
+pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor. 
+
+4.  Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, the remedies 
+described below are accepted by Client as its only remedies.  Red Hat's entire liability, and Client's 
+exclusive remedies, shall be: If the Software media is defective, Client may return it within 30 days of 
+delivery along with a copy of Client's payment receipt and Red Hat, at its option, will replace it or 
+refund the money paid by Client for the Software.  To the maximum extent permitted by applicable law, 
+Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential 
+damages, including lost profits or lost savings arising out of the use or inability to use the Software, 
+even if Red Hat or such dealer has been advised of the possibility of such damages.  In no event shall 
+Red Hat's liability under this agreement exceed the amount that Client paid to Red Hat under this 
+Agreement during the twelve months preceding the action.
+
+5.  Export Control.  As required by U.S. law, Client represents and warrants that it: 
+(a) understands that the Software Packages are subject to export controls under the 
+U.S. Commerce Department's Export Administration Regulations ("EAR"); 
+
+(b) is not located in a prohibited destination country under the EAR or U.S. sanctions regulations 
+(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria); 
+
+(c) will not export, re-export, or transfer the Software Packages to any prohibited destination, entity, 
+or individual without the necessary export license(s) or authorizations(s) from the U.S. Government; 
+
+(d) will not use or transfer the Software Packages for use in any sensitive nuclear, chemical or 
+biological weapons, or missile technology end-uses unless authorized by the U.S. Government by 
+regulation or specific license; 
+
+(e) understands and agrees that if it is in the United States and exports or transfers the Software 
+Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit semi-annual 
+reports to the Commerce Department's Bureau of Industry & Security (BIS), which include the name and 
+address (including country) of each transferee; 
+
+and (f) understands that countries other than the United States may restrict the import, use, or 
+export of encryption products and that it shall be solely responsible for compliance with any such 
+import, use, or export restrictions.
+
+6.  Third Party Programs. Red Hat may distribute third party software programs with the Software Packages 
+that are not part of the Software Packages and which Client must install separately.  These third party 
+programs are subject to their own license terms.  The license terms either accompany the programs or 
+can be viewed at http://www.redhat.com/licenses/.  If Client does not agree to abide by the applicable 
+license terms for such programs, then Client may not install them.  If Client wishes to install the programs 
+on more than one system or transfer the programs to another party, then Client must contact the licensor 
+of the programs.
+
+7.  General.  If any provision of this agreement is held to be unenforceable, that shall not affect the 
+enforceability of the remaining provisions.  This License Agreement shall be governed by the laws of the 
+State of North Carolina and of the United States, without regard to any conflict of laws provisions, 
+except that the United Nations Convention on the International Sale of Goods shall not apply.
+
+Copyright 2006 Red Hat, Inc.  All rights reserved.  
+"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.  
+All other trademarks are the property of their respective owners. 
+
+	Page 1 of 1	18 October 2006
+


Property changes on: projects/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml
===================================================================
--- projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,56 @@
+<?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$ -->
+
+<project name="JBossWS-Deploy">
+
+  <!-- ================================================================== -->
+  <!-- Deployment  JBoss42                                                -->
+  <!-- ================================================================== -->
+  
+  <!-- Deploy jbossws to jboss42 -->
+  <target name="deploy-jboss42" depends="jboss42-jars" description="Deploy jbossws">
+
+    <fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
+
+    <copy todir="${jboss42.home}/bin" overwrite="true">
+      <fileset dir="${thirdparty.dir}/jbossws-resources">
+        <include name="*.bat"/>
+        <include name="*.sh"/>
+      </fileset>
+    </copy>
+    <copy todir="${jboss42.home}/client" overwrite="true">
+      <fileset dir="${thirdparty.dir}">
+        <include name="jboss-jaxrpc.jar"/>
+        <include name="jboss-jaxws.jar"/>
+        <include name="jboss-saaj.jar"/>
+        <include name="jbossws-client.jar"/>
+        <include name="jaxb-api.jar"/>
+        <include name="jaxb-impl.jar"/>
+        <include name="jaxb-xjc.jar"/>
+        <include name="wsdl4j.jar"/>
+        <include name="jbossws-wsconsume-impl.jar"/>
+      </fileset>
+    </copy>
+    <copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
+      <fileset dir="${thirdparty.dir}">
+        <include name="jboss-jaxrpc.jar"/>
+        <include name="jboss-jaxws.jar"/>
+        <include name="jboss-saaj.jar"/>
+      </fileset>
+    </copy>
+    <delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+    <mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+    <unjar dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss42.output.lib.dir}/jbossws42.sar"/>
+  </target>
+    
+</project>


Property changes on: projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml
===================================================================
--- projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,38 @@
+<?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$ -->
+
+<project default="release" name="JBossWS Release">
+
+  <!-- Release to jboss.local.repository -->
+  <target name="release" depends="jboss42-jars" 
+    description="Release to jboss.local.repository">
+
+    <!-- jboss/jbossws-jboss42 -->
+    <property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
+    <mkdir dir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib"/>
+    <copy todir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib" overwrite="true">
+      <fileset dir="${jboss42.output.lib.dir}">
+        <include name="jbossws-jboss42.jar"/>
+        <include name="jbossws42.sar"/>
+        <include name="jbossws42-src.zip"/>
+      </fileset>
+    </copy>
+    <copy tofile="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/component-info.xml" file="${jboss42.etc.dir}/component-info.xml" filtering="true" overwrite="true">
+      <filterset>
+        <filtersfile file="${basedir}/version.properties"/>
+      </filterset>
+    </copy>
+    
+  </target>
+
+</project>


Property changes on: projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml
===================================================================
--- projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,105 @@
+<?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$ -->
+
+<project default="thirdparty" name="JBossWS-Thirdparty">
+
+  <!-- ========= -->
+  <!-- Libraries -->
+  <!-- ========= -->
+
+  <target name="thirdparty" depends="thirdparty-get,thirdparty-classpath">
+  </target>
+  
+  <target name="thirdparty-get" if="force.thirdparty.get" 
+    description="Gets the thirdparty libraries">
+
+    <mkdir dir="${thirdparty.dir}"/>
+    <get src="${jboss.repository}/apache-xmlsec/${apache-xmlsec}/lib/xmlsec.jar" dest="${thirdparty.dir}/xmlsec.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j-src.jar" dest="${thirdparty.dir}/wsdl4j-src.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar" dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar" dest="${thirdparty.dir}/jboss-common-core-sources.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar" dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar" dest="${thirdparty.dir}/jboss-logging-spi.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jaxr/${jboss-jaxr}/lib/juddi-service.sar" dest="${thirdparty.dir}/juddi-service.sar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-client.jar" dest="${thirdparty.dir}/jbossws-client.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-core.jar" dest="${thirdparty.dir}/jbossws-core.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-resources.zip" dest="${thirdparty.dir}/jbossws-resources.zip" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-saaj.jar" dest="${thirdparty.dir}/jboss-saaj.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-jaxrpc.jar" dest="${thirdparty.dir}/jboss-jaxrpc.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-jaxws.jar" dest="${thirdparty.dir}/jboss-jaxws.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws-spi/${jboss-jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws-wsconsume-impl/${jbossws-wsconsume-impl}/lib/jbossws-wsconsume-impl.jar" dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar" 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"/>
+    <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar" dest="${thirdparty.dir}/jboss-xml-binding-sources.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar" dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar" dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/stax-api/${stax-api}/lib/stax-api.jar" dest="${thirdparty.dir}/stax-api.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-api.jar" dest="${thirdparty.dir}/jaxb-api.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-impl.jar" dest="${thirdparty.dir}/jaxb-impl.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-xjc.jar" dest="${thirdparty.dir}/jaxb-xjc.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar" dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/wscommons-policy/${wscommons-policy}/lib/policy.jar" dest="${thirdparty.dir}/policy.jar" usetimestamp="true" verbose="true"/>
+	  
+    <mkdir dir="${thirdparty.dir}/jbossws-resources"/>
+    <unzip dest="${thirdparty.dir}/jbossws-resources" src="${thirdparty.dir}/jbossws-resources.zip"/>
+  </target>
+  
+  <target name="thirdparty-classpath" >
+    
+    <!-- The compile classpath for jboss42 integration -->
+    <path id="jboss42.integration.classpath">
+      <pathelement location="${jboss42.lib}/jboss-jmx.jar"/>
+      <pathelement location="${jboss42.lib}/jboss-system.jar"/>
+      <pathelement location="${jboss42.server.lib}/jboss.jar"/>
+      <pathelement location="${jboss42.server.lib}/jboss-j2ee.jar"/>
+      <pathelement location="${jboss42.server.lib}/jboss-ejb3x.jar"/>
+      <pathelement location="${jboss42.server.lib}/jbosssx.jar"/>
+      <pathelement location="${jboss42.server.deploy}/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+      <pathelement location="${jboss42.server.deploy}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+      <pathelement location="${jboss42.server.deploy}/ejb3.deployer/jboss-ejb3.jar"/>
+      <pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
+      <pathelement location="${thirdparty.dir}/jaxb-impl.jar"/>
+      <pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-common-core.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-jaxrpc.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-jaxws.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-logging-spi.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-saaj.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
+      <pathelement location="${thirdparty.dir}/jbossws-core.jar"/>
+      <pathelement location="${thirdparty.dir}/jbossws-spi.jar"/>
+      <pathelement location="${thirdparty.dir}/servlet-api.jar"/>
+    </path>
+
+    <!-- The compile classpath for jboss40 integration -->
+    <path id="jboss40.integration.classpath">
+      <pathelement location="${jboss40.lib}/jboss-jmx.jar"/>
+      <pathelement location="${jboss40.lib}/jboss-system.jar"/>
+      <pathelement location="${jboss40.server.lib}/jboss.jar"/>
+      <pathelement location="${jboss40.server.deploy}/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+      <pathelement location="${jboss40.server.deploy}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+      <pathelement location="${jboss40.server.deploy}/ejb3.deployer/jboss-ejb3.jar"/>
+      <pathelement location="${jboss40.server.deploy}/ejb3.deployer/jboss-ejb3x.jar"/>
+    </path>
+
+    <!-- The compile classpath for tomcat integration -->
+    <path id="tomcat.integration.classpath">
+    </path>
+    
+  </target>
+
+</project>


Property changes on: projects/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/etc/component-info.xml
===================================================================
--- projects/jbws-jboss42/trunk/src/main/etc/component-info.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/etc/component-info.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,24 @@
+<project name="jboss/jbossws-jboss42">
+  
+  <component id="jboss/jbossws-jboss42"
+    description="JBossWS an implementation of J2EE Web Services" 
+    version="@repository.id@"
+    licenseType="lgpl">
+    
+    <artifact id="jbossws-jboss42.jar"/>
+    <artifact id="jbossws42.sar"/>
+    <artifact id="jbossws42-src.zip"/>
+    
+    <import componentref="jboss/jbossws">
+      <compatible version="@jboss-jbossws@"/>
+    </import>
+    <import componentref="jboss/jbossws-spi">
+      <compatible version="@jboss-jbossws-spi@"/>
+    </import>
+    
+    <export>
+    </export>
+    
+  </component>
+  
+</project>


Property changes on: projects/jbws-jboss42/trunk/src/main/etc/component-info.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/etc/default.mf
===================================================================
--- projects/jbws-jboss42/trunk/src/main/etc/default.mf	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/etc/default.mf	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+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=@build.id@)
+Implementation-Vendor: @implementation.vendor@
+Implementation-Vendor-Id: @implementation.vendor.id@

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+
+//$Id$
+
+
+/**
+ * An interface for all web service deployer hooks 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Apr-2007
+ */
+public interface DeployerHook
+{
+   void deploy(DeploymentInfo unit) throws DeploymentException;
+
+   void undeploy(DeploymentInfo unit);
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+//$Id$
+
+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 at 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);
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+//$Id$
+
+/**
+ * A deployer service that manages WS4EE compliant Web-Services for EJB-2.1 Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 15-Jan-2005
+ */
+public class DeployerInterceptorEJB21 extends DeployerInterceptor implements DeployerInterceptorEJB21MBean
+{
+
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.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");
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+// $Id$
+
+/**
+ * A deployer service that manages WS4EE compliant Web-Services for EJB3 Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 10-May-2005
+ */
+public class DeployerInterceptorEJB3 extends DeployerInterceptor implements DeployerInterceptorEJB3MBean
+{
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.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");
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+// $Id$
+
+/**
+ * A deployer service that manages WS4EE compliant Web Services for WAR
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 15-Jan-2005
+ */
+public class DeployerInterceptorJSE extends DeployerInterceptor implements DeployerInterceptorJSEMBean
+{
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+import javax.management.ObjectName;
+
+import org.jboss.deployment.SubDeployerInterceptorMBean;
+import org.jboss.ws.integration.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");
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42;
+
+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);
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public abstract class AbstractApplicationMetaDataAdapter
+{
+   public UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi, ApplicationMetaData apmd)
+   {
+      udi.addAttachment(ApplicationMetaData.class, apmd);
+      
+      UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
+      buildUnifiedBeanMetaData(umd, apmd);
+      umd.setConfigName(apmd.getConfigName());
+      umd.setConfigFile(apmd.getConfigFile());
+      umd.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
+      umd.setSecurityDomain(apmd.getSecurityDomain());
+      umd.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
+      return umd;
+   }
+
+   protected PublishLocationAdapter getPublishLocationAdpater(final ApplicationMetaData apmd)
+   {
+      return new PublishLocationAdapter ()
+      {
+         public String getWsdlPublishLocationByName(String name)
+         {
+            return apmd.getWsdlPublishLocationByName(name);
+         }
+      };
+   }
+
+   protected void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd, ApplicationMetaData metaData)
+   {
+      List<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
+      Iterator it = metaData.getEnterpriseBeans();
+      while (it.hasNext())
+      {
+         BeanMetaData bmd = (BeanMetaData)it.next();
+         UnifiedBeanMetaData ubmd = buildUnifiedBeanMetaData(bmd);
+         if (ubmd != null)
+         {
+            beans.add(ubmd);
+         }
+      }
+      umd.setEnterpriseBeans(beans);
+   }
+
+   protected abstract UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd);
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import java.util.List;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+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.ws.integration.deployment.DeployerManager;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+import org.jboss.ws.integration.jboss42.DeployerHook;
+import org.jboss.ws.integration.jboss42.DeployerInterceptorMBean;
+
+/**
+ * An abstract web service deployer.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHook implements DeployerHook
+{
+   // provide logging
+   protected final Logger log = Logger.getLogger(getClass());
+
+   protected DeployerManager deployerManager;
+   private List<ObjectName> phaseOneInterceptors;
+   private List<ObjectName> phaseTwoInterceptors;
+
+   public void setDeployerManager(DeployerManager deploymentManager)
+   {
+      this.deployerManager = deploymentManager;
+   }
+
+   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 WSDeploymentException(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 WSDeploymentException(e);
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+/**
+ * An abstract deployer for EJB Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHookEJB extends ArchiveDeployerHook
+{
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42.jbossws;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+
+//$Id$
+
+/**
+ * An abstract deployer for JSE Endpoints
+ *
+ * @author Thomas.Diesler at 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;
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.metadata.EjbPortComponentMetaData;
+import org.jboss.metadata.MessageDrivenMetaData;
+import org.jboss.metadata.SessionMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedSessionMetaData;
+
+/**
+ * Build container independent application meta data 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class ApplicationMetaDataAdapter extends AbstractApplicationMetaDataAdapter
+{
+   protected UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd)
+   {
+      UnifiedBeanMetaData ubmd = null;
+      if (bmd instanceof SessionMetaData)
+      {
+         ubmd = new UnifiedSessionMetaData();
+      }
+      else if (bmd instanceof MessageDrivenMetaData)
+      {
+         ubmd = new UnifiedMessageDrivenMetaData();
+         ((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
+      }
+
+      if (ubmd != null)
+      {
+         ubmd.setEjbName(bmd.getEjbName());
+         ubmd.setEjbClass(bmd.getEjbClass());
+         ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
+         ubmd.setHome(bmd.getHome());
+         ubmd.setLocalHome(bmd.getLocalHome());
+         ubmd.setJndiName(bmd.getJndiName());
+         ubmd.setLocalJndiName(bmd.getLocalJndiName());
+
+         EjbPortComponentMetaData pcmd = bmd.getPortComponent();
+         if (pcmd != null)
+         {
+            UnifiedEjbPortComponentMetaData upcmd = new UnifiedEjbPortComponentMetaData();
+            upcmd.setPortComponentName(pcmd.getPortComponentName());
+            upcmd.setPortComponentURI(pcmd.getPortComponentURI());
+            upcmd.setAuthMethod(pcmd.getAuthMethod());
+            upcmd.setTransportGuarantee(pcmd.getTransportGuarantee());
+            upcmd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
+            ubmd.setPortComponent(upcmd);
+         }
+      }
+      return ubmd;
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.WebservicesFactory;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+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 at 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.getContext().addAttachment(DeploymentInfo.class, unit);
+         }
+
+         deployerManager.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);
+         deployerManager.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 WSDeploymentException(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;
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that injects the correct classloader into the UMDM 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class ClassLoaderInjectionDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      DeploymentInfo unit = dep.getContext().getAttachment(DeploymentInfo.class);
+      if (unit == null)
+         throw new IllegalStateException("Cannot obtain deployement unit");
+
+      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+      if (umd == null)
+         throw new IllegalStateException("Cannot obtain unified meta data");
+
+      ClassLoader classLoader = unit.ucl;
+
+      // Get the webapp context classloader and use it as the deploymet class loader
+      WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+      if (webMetaData != null)
+      {
+         classLoader = webMetaData.getContextLoader();
+      }
+
+      umd.setClassLoader(classLoader);
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,168 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+
+/**
+ * Build container independent deployment info. 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class DeploymentInfoAdapter
+{
+   // logging support
+   private static Logger log = Logger.getLogger(DeploymentInfoAdapter.class);
+
+   private WebMetaDataAdapter webMetaDataAdapter;
+   private AbstractApplicationMetaDataAdapter appMetaDataAdapter;
+
+   public void setAppMetaDataAdapter(AbstractApplicationMetaDataAdapter applicationMetaDataAdapter)
+   {
+      this.appMetaDataAdapter = applicationMetaDataAdapter;
+   }
+
+   public void setWebMetaDataAdapter(WebMetaDataAdapter webMetaDataAdapter)
+   {
+      this.webMetaDataAdapter = webMetaDataAdapter;
+   }
+
+   public UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentInfo di)
+   {
+      udi.addAttachment(DeploymentInfo.class, di);
+
+      if (di.parent != null)
+      {
+         udi.parent = new UnifiedDeploymentInfo(null);
+         buildDeploymentInfo(udi.parent, di.parent);
+      }
+
+      udi.vfRoot = new ResourceLoaderAdapter(di.localCl);
+      udi.name = di.getCanonicalName();
+      udi.simpleName = di.shortName;
+      udi.url = getDeploymentURL(di);
+      udi.classLoader = di.annotationsCl;
+      udi.deployedObject = di.deployedObject;
+
+      buildMetaData(udi, di.metaData);
+
+      log.debug("UnifiedDeploymentInfo:\n" + udi);
+      return udi;
+   }
+
+   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;
+   }
+
+   private void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
+   {
+      if (metaData instanceof WebMetaData)
+      {
+         udi.metaData = webMetaDataAdapter.buildUnifiedWebMetaData(udi, (WebMetaData)metaData);
+         udi.webappURL = udi.url;
+      }
+      else if (metaData instanceof ApplicationMetaData)
+      {
+         udi.metaData = appMetaDataAdapter.buildUnifiedApplicationMetaData(udi, (ApplicationMetaData)metaData);
+      }
+      else if (udi.deployedObject != null)
+      {
+         Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
+
+         ArrayList<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
+         for (Object container : ejb3Module.getContainers().values())
+         {
+            if (container instanceof StatelessContainer)
+            {
+               StatelessContainer slc = (StatelessContainer)container;
+               UnifiedBeanMetaData uslc = new UnifiedBeanMetaData();
+               uslc.setEjbName(slc.getEjbName());
+               uslc.setEjbClass(slc.getBeanClassName());
+               beans.add(uslc);
+            }
+         }
+
+         UnifiedApplicationMetaData appMetaData = new UnifiedApplicationMetaData();
+         appMetaData.setEnterpriseBeans(beans);
+         udi.metaData = appMetaData;
+      }
+   }
+
+   public 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 WSException("Cannot obtain EJB3 module: " + objectName);
+
+         return ejb3Module;
+      }
+      catch (MBeanProxyCreationException ex)
+      {
+         throw new WSException("Cannot obtain proxy to EJB3 module");
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.ws.integration.KernelLocator;
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 10-Mar-2007
+ */
+public class DeploymentInfoAdapterFactory
+{
+   // Hide ctor
+   private DeploymentInfoAdapterFactory()
+   {
+   }
+
+   public static DeploymentInfoAdapter newInstance()
+   {
+      KernelRegistry registry = KernelLocator.getKernel().getRegistry();
+      KernelRegistryEntry entry = registry.getEntry("DeploymentInfoAdapter");
+      return (DeploymentInfoAdapter)entry.getTarget();
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,267 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.ejb.EjbModule;
+import org.jboss.ejb.Interceptor;
+import org.jboss.ejb.StatelessSessionContainer;
+import org.jboss.invocation.Invocation;
+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.security.SecurityAssociation;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.server.AbstractInvocationHandler;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * Handles invocations on EJB21 endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB21 extends AbstractInvocationHandler
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(InvocationHandlerEJB21.class);
+
+   private String jndiName;
+   private MBeanServer server;
+   private ObjectName objectName;
+
+   /** Initialize the service endpoint */
+   @Override
+   public void init(Endpoint endpoint)
+   {
+      super.init(endpoint);
+
+      server = MBeanServerLocator.locateJBoss();
+
+      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      String ejbName = sepMetaData.getLinkName();
+      if (ejbName == null)
+         throw new WSException("Cannot obtain ejb-link from port component");
+
+      UnifiedDeploymentInfo udi = endpoint.getService().getDeployment().getContext().getAttachment(UnifiedDeploymentInfo.class);
+      UnifiedApplicationMetaData applMetaData = (UnifiedApplicationMetaData)udi.metaData;
+      UnifiedBeanMetaData beanMetaData = (UnifiedBeanMetaData)applMetaData.getBeanByEjbName(ejbName);
+      if (beanMetaData == null)
+         throw new WSException("Cannot obtain ejb meta data for: " + ejbName);
+
+      // verify the service endpoint
+      String seiName = sepMetaData.getServiceEndpointInterfaceName();
+      if (sepMetaData.getType() == Type.JAXRPC && seiName != null)
+      {
+         String bmdSEI = beanMetaData.getServiceEndpointInterface();
+         if (seiName.equals(bmdSEI) == false)
+            throw new WSException("Endpoint meta data defines SEI '" + seiName + "', <service-endpoint> in ejb-jar.xml defines '" + bmdSEI + "'");
+      }
+
+      // get the bean's JNDI name
+      jndiName = beanMetaData.getContainerObjectNameJndiName();
+      if (jndiName == null)
+         throw new WSException("Cannot obtain JNDI name for: " + ejbName);
+
+      objectName = ObjectNameFactory.create("jboss.j2ee:jndiName=" + jndiName + ",service=EJB");
+
+      // 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);
+      }
+   }
+
+   /** Load the SEI implementation bean if necessary 
+    */
+   public Class loadServiceEndpoint()
+   {
+      if (server.isRegistered(objectName) == false)
+         throw new WSException("Cannot find service endpoint target: " + objectName);
+
+      return null;
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   @Override
+   protected Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception
+   {
+      return null;
+   }
+
+   /** Invoke an instance of the SEI implementation bean */
+   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
+   {
+      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+
+      // these are provided by the ServerLoginHandler
+      Principal principal = SecurityAssociation.getPrincipal();
+      Object credential = SecurityAssociation.getCredential();
+
+      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+
+      // invoke on the container
+      try
+      {
+         // setup the invocation
+         Method method = epInv.getJavaMethod();
+         Object[] args = epInv.getRequestPayload();
+         Invocation inv = new Invocation(null, method, args, null, principal, credential);
+
+         // EJB2.1 endpoints will only get an JAXRPC context 
+         if ((msgContext instanceof javax.xml.rpc.handler.MessageContext) == false)
+            msgContext = new SOAPMessageContextJAXRPC(msgContext);
+
+         inv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+         inv.setValue(InvocationKey.SOAP_MESSAGE, msgContext.getSOAPMessage());
+         inv.setType(InvocationType.SERVICE_ENDPOINT);
+
+         // Set the handler callback and endpoint invocation
+         ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+         inv.setValue(HandlerCallback.class.getName(), new HandlerCallbackImpl(sepMetaData), PayloadKey.TRANSIENT);
+         inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
+
+         String[] sig = { Invocation.class.getName() };
+         Object retObj = server.invoke(objectName, "invoke", new Object[] { inv }, sig);
+         epInv.setReturnValue(retObj);
+      }
+      catch (Exception e)
+      {
+         handleInvocationException(e);
+      }
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   public void destroyServiceEndpointInstance(Object seiImpl)
+   {
+      // do nothing
+   }
+
+   /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+   @Override
+   public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+   {
+      if (type == HandlerType.PRE)
+         return delegate.callRequestHandlerChain(sepMetaData, type);
+      else return true;
+   }
+
+   /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+   public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+   {
+      if (type == HandlerType.PRE)
+         return delegate.callResponseHandlerChain(sepMetaData, type);
+      else return true;
+   }
+
+   /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+   public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
+   {
+      if (type == HandlerType.PRE)
+         return delegate.callFaultHandlerChain(sepMetaData, type, ex);
+      else return true;
+   }
+
+   // The ServiceEndpointInterceptor calls the methods in this callback
+   public class HandlerCallbackImpl implements HandlerCallback
+   {
+      private ServerEndpointMetaData sepMetaData;
+
+      public HandlerCallbackImpl(ServerEndpointMetaData sepMetaData)
+      {
+         this.sepMetaData = sepMetaData;
+      }
+
+      /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+      public boolean callRequestHandlerChain(HandlerType type)
+      {
+         if (type == HandlerType.PRE)
+            return true;
+         else return delegate.callRequestHandlerChain(sepMetaData, type);
+      }
+
+      /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+      public boolean callResponseHandlerChain(HandlerType type)
+      {
+         if (type == HandlerType.PRE)
+            return true;
+         else return delegate.callResponseHandlerChain(sepMetaData, type);
+      }
+
+      /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+      public boolean callFaultHandlerChain(HandlerType type, Exception ex)
+      {
+         if (type == HandlerType.PRE)
+            return true;
+         else return delegate.callFaultHandlerChain(sepMetaData, type, ex);
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,192 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import javax.ejb.EJBContext;
+import javax.management.ObjectName;
+
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.MethodInfo;
+import org.jboss.ejb3.BeanContext;
+import org.jboss.ejb3.BeanContextLifecycleCallback;
+import org.jboss.ejb3.EJBContainerInvocation;
+import org.jboss.ejb3.stateless.StatelessBeanContext;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.injection.lang.reflect.BeanProperty;
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.jaxws.WebServiceContextEJB;
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.server.AbstractInvocationHandler;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * Handles invocations on EJB3 endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB3 extends AbstractInvocationHandler
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(InvocationHandlerEJB3.class);
+   
+   private ObjectName objectName;
+
+   /** Initialize the service endpoint */
+   @Override
+   public void init(Endpoint endpoint)
+   {
+      super.init(endpoint);
+      
+      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      String ejbName = sepMetaData.getLinkName();
+      if (ejbName == null)
+         throw new WSException("Cannot obtain ejb-link from port component");
+
+      UnifiedDeploymentInfo udi = endpoint.getService().getDeployment().getContext().getAttachment(UnifiedDeploymentInfo.class);
+      String nameStr = "jboss.j2ee:name=" + ejbName + ",service=EJB3,jar=" + udi.simpleName;
+      if (udi.parent != null)
+      {
+         nameStr += ",ear=" + udi.parent.simpleName;
+      }
+
+      objectName = ObjectNameFactory.create(nameStr.toString());
+   }
+
+   /** Load the SEI implementation bean if necessary 
+    */
+   public Class loadServiceEndpoint()
+   {
+      Dispatcher dispatcher = Dispatcher.singleton;
+      if (dispatcher.getRegistered(objectName.getCanonicalName()) == null)
+         throw new WSException("Cannot find service endpoint target: " + objectName);
+
+      return null;
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   @Override
+   protected Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception
+   {
+      return null;
+   }
+
+   /** Invoke an instance of the SEI implementation bean */
+   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
+   {
+      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+
+      // invoke on the container
+      try
+      {
+         // setup the invocation
+         Method seiMethod = epInv.getJavaMethod();
+         Object[] args = epInv.getRequestPayload();
+
+         Dispatcher dispatcher = Dispatcher.singleton;
+         StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
+         Class beanClass = container.getBeanClass();
+
+         Method implMethod = getImplMethod(beanClass, seiMethod);
+         MethodInfo info = container.getMethodInfo(implMethod);
+         
+         EJBContainerInvocation<StatelessContainer, StatelessBeanContext> ejb3Inv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
+         ejb3Inv.setAdvisor(container);
+         ejb3Inv.setArguments(args);
+         ejb3Inv.setContextCallback(new ContextCallback());
+         
+         Object retObj = ejb3Inv.invokeNext();
+
+         epInv.setReturnValue(retObj);
+      }
+      catch (Throwable th)
+      {
+         handleInvocationException(th);
+      }
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   public void destroyServiceEndpointInstance(Object seiImpl)
+   {
+      // do nothing
+   }
+
+   class ContextCallback implements BeanContextLifecycleCallback
+   {
+      private SOAPMessageContextJAXWS jaxwsMessageContext;
+      private SOAPMessageContextJAXRPC jaxrpcMessageContext;
+
+      public ContextCallback()
+      {
+         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+         if (msgContext instanceof SOAPMessageContextJAXRPC)
+         {
+            jaxrpcMessageContext = (SOAPMessageContextJAXRPC)msgContext;
+            jaxwsMessageContext = new SOAPMessageContextJAXWS(msgContext);
+         }
+         else if (msgContext instanceof SOAPMessageContextJAXWS)
+         {
+            jaxwsMessageContext = (SOAPMessageContextJAXWS)msgContext;
+            jaxrpcMessageContext = new SOAPMessageContextJAXRPC(msgContext);
+         }
+      }
+
+      public void attached(BeanContext beanCtx)
+      {
+         StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
+         sbc.setMessageContextJAXRPC(jaxrpcMessageContext);
+         
+         BeanProperty beanProp = sbc.getWebServiceContextProperty();
+         if (beanProp != null)
+         {
+            EJBContext ejbCtx = beanCtx.getEJBContext(); 
+            beanProp.set(beanCtx.getInstance(), new WebServiceContextEJB(jaxwsMessageContext, ejbCtx));
+         }
+      }
+
+      public void released(BeanContext beanCtx)
+      {
+         StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
+         sbc.setMessageContextJAXRPC(null);
+         
+         BeanProperty beanProp = sbc.getWebServiceContextProperty();
+         if (beanProp != null)
+            beanProp.set(beanCtx.getInstance(), null);
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC EJB21 Endpoints
+ *
+ * @author Thomas.Diesler at 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 unit)
+   {
+      Deployment dep = new DeploymentImpl();
+      dep.setType(getDeploymentType());
+      dep.setClassLoader(unit.ucl);
+
+      Service service = dep.getService();
+
+      ApplicationMetaData appmd = (ApplicationMetaData)unit.metaData;
+      if (appmd == null)
+         throw new IllegalStateException("Deployment unit does not contain application meta data");
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, null);
+      if (wsMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+      // Copy the attachments
+      dep.getContext().addAttachment(WebservicesMetaData.class, wsMetaData);
+      dep.getContext().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();
+            try
+            {
+               ClassLoader loader = unit.ucl;
+               Class<?> epBean = loader.loadClass(ejbClass.trim());
+
+               // Create the endpoint
+               Endpoint endpoint = new EndpointImpl(service, epBean);
+               String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbLink;
+               endpoint.setName(ObjectNameFactory.create(nameStr));
+
+               service.addEndpoint(endpoint);
+            }
+            catch (ClassNotFoundException ex)
+            {
+               log.warn("Cannot load servlet class: " + ejbClass);
+            }
+         }
+      }
+      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


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+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.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC JSE Endpoints
+ *
+ * @author Thomas.Diesler at 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 unit)
+   {
+      Deployment dep = new DeploymentImpl();
+      dep.setType(getDeploymentType());
+      dep.setClassLoader(unit.annotationsCl);
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = (WebMetaData)unit.metaData;
+      if (webMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
+      if (wsMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+      // Copy the attachments
+      dep.getContext().addAttachment(WebservicesMetaData.class, wsMetaData);
+      dep.getContext().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 = unit.annotationsCl;
+               Class<?> epBean = loader.loadClass(servletClass.trim());
+
+               // Create the endpoint
+               Endpoint endpoint = new EndpointImpl(service, epBean);
+               String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletLink;
+               endpoint.setName(ObjectNameFactory.create(nameStr));
+
+               service.addEndpoint(endpoint);
+            }
+            catch (ClassNotFoundException ex)
+            {
+               log.warn("Cannot load servlet class: " + servletClass);
+            }
+         }
+      }
+
+      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;
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+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.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * A deployer JAXWS EJB3 Endpoints
+ *
+ * @author Thomas.Diesler at 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 unit)
+   {
+      Deployment dep = new DeploymentImpl();
+      dep.setType(getDeploymentType());
+      dep.setClassLoader(unit.ucl);
+
+      Service service = dep.getService();
+
+      Ejb3ModuleMBean ejb3Module = DeploymentInfoAdapter.getEJB3Module(unit.deployedObject);
+      for (Object manager : ejb3Module.getContainers().values())
+      {
+         if (manager instanceof EJBContainer)
+         {
+            EJBContainer container = (EJBContainer)manager;
+            if (isWebServiceBean(container))
+            {
+               String ejbName = container.getEjbName();
+               Class epBean = container.getBeanClass();
+
+               // Create the endpoint
+               Endpoint endpoint = new EndpointImpl(service, epBean);
+               String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbName;
+               endpoint.setName(ObjectNameFactory.create(nameStr));
+
+               service.addEndpoint(endpoint);
+            }
+         }
+      }
+
+      return dep;
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      boolean isWebserviceDeployment = false;
+
+      // Check if the ejb3 contains annotated endpoints
+      Ejb3ModuleMBean ejb3Module = DeploymentInfoAdapter.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


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import java.io.IOException;
+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.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * A deployer JAXWS JSE Endpoints
+ *
+ * @author Thomas.Diesler at 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 unit)
+   {
+      Deployment dep = new DeploymentImpl();
+      dep.setType(getDeploymentType());
+      dep.setClassLoader(unit.annotationsCl);
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = (WebMetaData)unit.metaData;
+      if (webMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+      // Copy the attachments
+      dep.getContext().addAttachment(WebMetaData.class, webMetaData);
+
+      List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
+      for (Servlet servlet : servlets)
+      {
+         String servletName = servlet.getServletName();
+         String servletClass = servlet.getServletClass();
+
+         try
+         {
+            ClassLoader loader = unit.annotationsCl;
+            Class<?> epBean = loader.loadClass(servletClass.trim());
+
+            // Create the endpoint
+            Endpoint endpoint = new EndpointImpl(service, epBean);
+            String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName;
+            endpoint.setName(ObjectNameFactory.create(nameStr));
+
+            service.addEndpoint(endpoint);
+         }
+         catch (ClassNotFoundException ex)
+         {
+            log.warn("Cannot load servlet class: " + servletClass);
+            continue;
+         }
+      }
+
+      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


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A basic hook that delegates a deployment manger.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class MainDeployerHook extends AbstractDeployerHook
+{
+   public void deploy(DeploymentInfo unit) throws DeploymentException
+   {
+      if (ignoreDeployment(unit))
+         return;
+
+      Deployment dep = (Deployment)unit.context.get(Deployment.class);
+      if (dep != null)
+      {
+         deployerManager.deploy(dep);
+      }
+   }
+
+   public void undeploy(DeploymentInfo unit)
+   {
+      if (ignoreDeployment(unit))
+         return;
+
+      Deployment dep = (Deployment)unit.context.get(Deployment.class);
+      if (dep != null)
+      {
+         deployerManager.undeploy(dep);
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.ws.core.deployment.ServiceEndpointPublisher;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A deployer that modifies the web.xml meta data 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class ModifyWebMetaDataDeployer extends AbstractDeployer
+{
+   private ServiceEndpointPublisher serviceEndpointPublisher;
+
+   public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+   {
+      this.serviceEndpointPublisher = serviceEndpointPublisher;
+   }
+
+   public void create(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+         throw new IllegalStateException("Cannot obtain unified deployement info");
+
+      serviceEndpointPublisher.rewriteWebXml(udi);
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.server.legacy.ServiceEndpoint;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManager;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManagerFactory;
+
+/**
+ * A servlet that reports the serviceURL for a given service ID.
+ * <p/>
+ * When the web service client ENC is setup, it may contain port-component-link
+ * entries that point to service endpoints in the same top level deployment.
+ * The final serviceURL of those endpoints will become available after the
+ * reference to the javax.xml.rpc.Service is bound to JNDI.
+ * <p/>
+ * When the client does a lookup of the javax.xml.rpc.Service from JNDI the ObjectFactory
+ * will contact this servlet for the final serviceURL. It is acceptable that the client
+ * wsdl does not contain the correct serviceURL if the client is using the port-component-link element.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 29-May-2004
+ */
+public class PortComponentLinkServlet extends HttpServlet
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(PortComponentLinkServlet.class);
+
+   protected ServiceEndpointManager epManager;
+
+   public void init(ServletConfig config) throws ServletException
+   {
+      super.init(config);
+      ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+      epManager = factory.getServiceEndpointManager();
+   }
+
+   /**
+    * Get the serviceURL as string for a given serviceID.
+    */
+   public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+   {
+      String pcLink = req.getParameter("pcLink");
+      if (pcLink == null)
+         throw new IllegalArgumentException("Cannot obtain request parameter 'pcLink'");
+
+      ServiceEndpoint serviceEndpoint = epManager.resolvePortComponentLink(pcLink);
+      ;
+      if (serviceEndpoint == null)
+         throw new WSException("Cannot resolve port-component-link: " + pcLink);
+
+      res.setContentType("text/plain");
+      PrintWriter out = res.getWriter();
+
+      String endpointAddress = serviceEndpoint.getServiceEndpointInfo().getServerEndpointMetaData().getEndpointAddress();
+      out.println(endpointAddress);
+
+      log.debug("Resolved " + pcLink + " to: " + endpointAddress);
+      out.close();
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import java.security.Principal;
+
+import org.jboss.security.SecurityAssociation;
+import org.jboss.ws.extensions.security.SecurityAssociationAdaptor;
+import org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory;
+
+/**
+ * A JBoss specific SecurityAdaptorFactory 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class SecurityAssociationAdaptorFactoryImpl implements SecurityAssociationAdaptorFactory
+{
+   public SecurityAssociationAdaptor getSecurityAssociationAdaptor()
+   {
+      return new SecurityAccociationAdaptorImpl();
+   }
+
+   public class SecurityAccociationAdaptorImpl implements SecurityAssociationAdaptor
+   {
+      public void setPrincipal(Principal pricipal)
+      {
+         SecurityAssociation.setPrincipal(pricipal);
+      }
+
+      public void setCredential(Object credential)
+      {
+         SecurityAssociation.setCredential(credential);
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.AssemblyDescriptorMetaData;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.ServiceEndpointGeneratorEJB;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointGeneratorEJB21 extends ServiceEndpointGeneratorEJB
+{
+   // logging support
+   protected Logger log = Logger.getLogger(ServiceEndpointGeneratorEJB21.class);
+
+   /** Add the roles from ejb-jar.xml to the security roles
+    */
+   protected void addEJBSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
+   {
+      // Fix: http://jira.jboss.org/jira/browse/JBWS-309
+      ApplicationMetaData applMetaData = (ApplicationMetaData)udi.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())
+            {
+               Element securityRole = (Element)webApp.appendChild(DOMUtils.createElement("security-role"));
+               Element roleName = (Element)securityRole.appendChild(DOMUtils.createElement("role-name"));
+               roleName.appendChild(DOMUtils.createTextNode((String)it.next()));
+            }
+         }
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import javax.annotation.security.RolesAllowed;
+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.ws.WSException;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.ServiceEndpointGeneratorEJB;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointGeneratorEJB3 extends ServiceEndpointGeneratorEJB
+{
+   // logging support
+   protected Logger log = Logger.getLogger(ServiceEndpointGeneratorEJB3.class);
+
+   /** Add the roles from ejb-jar.xml to the security roles
+    */
+   protected void addEJBSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
+   {
+      // The container objects below provide access to all of the ejb metadata
+      Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.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())
+               {
+                  Element securityRole = (Element)webApp.appendChild(DOMUtils.createElement("security-role"));
+                  Element roleName = (Element)securityRole.appendChild(DOMUtils.createElement("role-name"));
+                  roleName.appendChild(DOMUtils.createTextNode(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 WSException("Cannot obtain EJB3 module: " + objectName);
+
+         return ejb3Module;
+      }
+      catch (MBeanProxyCreationException ex)
+      {
+         throw new WSException("Cannot obtain proxy to EJB3 module");
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,145 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ejb.plugins.AbstractInterceptor;
+import org.jboss.invocation.Invocation;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.CommonBinding;
+import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.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 at 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 Invocation mi) throws Exception
+   {
+      // If no msgContext, it's not for us
+      CommonMessageContext msgContext = (CommonMessageContext)mi.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+      if (msgContext == null)
+      {
+         return getNext().invoke(mi);
+      }
+
+      // Get the endpoint invocation 
+      EndpointInvocation epInv = (EndpointInvocation)mi.getValue(EndpointInvocation.class.getName());
+      OperationMetaData opMetaData = epInv.getOperationMetaData();
+
+      // Get the handler callback 
+      HandlerCallback callback = (HandlerCallback)mi.getValue(HandlerCallback.class.getName());
+
+      // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
+      if (callback != null && epInv != null)
+      {
+         try
+         {
+            // call the request handlers
+            boolean handlersPass = callback.callRequestHandlerChain(HandlerType.ENDPOINT);
+            handlersPass = handlersPass && callback.callRequestHandlerChain(HandlerType.POST);
+
+            // Call the next interceptor in the chain
+            if (handlersPass)
+            {
+               CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
+               CommonBinding binding = bindingProvider.getCommonBinding();
+
+               // Verify that the the message has not been mofified
+               CommonMessageContext messageContext = MessageContextAssociation.peekMessageContext();
+               if (messageContext.isModified())
+               {
+                  log.debug("Handler modified payload, unbind message and update invocation args");
+                  epInv = bindingProvider.getCommonBinding().unbindRequestMessage(opMetaData, messageContext.getMessageAbstraction());
+               }
+
+               // 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 = epInv.getRequestPayload();
+               mi.setArguments(reqParams);
+               Object resObj = getNext().invoke(mi);
+               epInv.setReturnValue(resObj);
+
+               // Bind the response message
+               SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
+               msgContext.setSOAPMessage(resMessage);
+            }
+
+            // call the response handlers
+            handlersPass = callback.callResponseHandlerChain(HandlerType.POST);
+            handlersPass = handlersPass && callback.callResponseHandlerChain(HandlerType.ENDPOINT);
+
+            // update the return value after response handler processing
+            Object resObj = epInv.getReturnValue();
+
+            return resObj;
+         }
+         catch (Exception ex)
+         {
+            try
+            {
+               SOAPMessage faultMessage = SOAPFaultHelperJAXRPC.exceptionToFaultMessage(ex);
+               msgContext.setSOAPMessage(faultMessage);
+
+               // call the fault handlers
+               boolean handlersPass = callback.callFaultHandlerChain(HandlerType.POST, ex);
+               handlersPass = handlersPass && callback.callFaultHandlerChain(HandlerType.ENDPOINT, ex);
+            }
+            catch (Exception subEx)
+            {
+               log.warn("Cannot process handlerChain.handleFault, ignoring: ", subEx);
+            }
+            throw ex;
+         }
+      }
+      else
+      {
+         log.warn("Handler callback not available");
+         return getNext().invoke(mi);
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import java.util.ArrayList;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.deployment.DeploymentInfo;
+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.ws.WSException;
+import org.jboss.ws.core.deployment.JAXRPCDeployment;
+import org.jboss.ws.core.deployment.JAXWSDeployment;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer that builds the UnifiedDeploymentInfo 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class UnifiedDeploymentInfoDeployer extends AbstractDeployer
+{
+   private DeploymentInfoAdapter deploymentInfoAdapter;
+
+   public void setDeploymentInfoAdapter(DeploymentInfoAdapter deploymentInfoAdapter)
+   {
+      this.deploymentInfoAdapter = deploymentInfoAdapter;
+   }
+
+   @Override
+   public void create(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+      {
+         DeploymentInfo unit = dep.getContext().getAttachment(DeploymentInfo.class);
+         if (unit == null)
+            throw new IllegalStateException("Cannot obtain deployment unit");
+
+         DeploymentType type = dep.getType();
+         if (type.toString().startsWith("JAXWS"))
+         {
+            udi = new JAXWSDeployment(type);
+            deploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+         }
+         else
+         {
+            WebservicesMetaData wsMetaData = dep.getContext().getAttachment(WebservicesMetaData.class);
+            udi = new JAXRPCDeployment(type, wsMetaData);
+            deploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+         }
+
+         dep.getContext().addAttachment(UnifiedDeploymentInfo.class, udi);
+      }
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+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.ws.core.deployment.ServiceEndpointPublisher;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.Deployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+
+/**
+ * Publish the HTTP service endpoint to Tomcat 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class WebAppDeployerDeployer implements Deployer
+{
+   // provide logging
+   private static Logger log = Logger.getLogger(WebAppDeployerDeployer.class);
+   
+   private ServiceEndpointPublisher serviceEndpointPublisher;
+
+   public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+   {
+      this.serviceEndpointPublisher = serviceEndpointPublisher;
+   }
+
+   public void create(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+         throw new IllegalStateException("Cannot obtain unified deployement info");
+
+      URL warURL = udi.webappURL;
+
+      log.debug("publishServiceEndpoint: " + warURL);
+      try
+      {
+         DeploymentInfo di = udi.getAttachment(DeploymentInfo.class);
+         if (di == null)
+            throw new IllegalStateException("Cannot obtain DeploymentInfo from context");
+
+         serviceEndpointPublisher.rewriteWebXml(udi);
+
+         // Preserve the repository config
+         DeploymentInfo auxdi = new DeploymentInfo(warURL, null, MBeanServerLocator.locateJBoss());
+         auxdi.repositoryConfig = di.getTopRepositoryConfig();
+         getMainDeployer().deploy(auxdi);
+      }
+      catch (Exception ex)
+      {
+         WSDeploymentException.rethrow(ex);
+      }
+   }
+
+   public void destroy(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+         throw new IllegalStateException("Cannot obtain unified deployement info");
+
+      URL warURL = udi.webappURL;
+      if (warURL == null)
+      {
+         log.error("Cannot obtain warURL for: " + udi.name);
+         return;
+      }
+
+      log.debug("destroyServiceEndpoint: " + warURL);
+      try
+      {
+         getMainDeployer().undeploy(warURL);
+      }
+      catch (Exception ex)
+      {
+         WSDeploymentException.rethrow(ex);
+      }
+   }
+
+   public void start(Deployment dep)
+   {
+   }
+
+   public void stop(Deployment dep)
+   {
+   }
+
+   private MainDeployerMBean getMainDeployer() throws MBeanProxyCreationException
+   {
+      MBeanServer server = MBeanServerLocator.locateJBoss();
+      MainDeployerMBean mainDeployer = (MainDeployerMBean)MBeanProxy.get(MainDeployerMBean.class, MainDeployerMBean.OBJECT_NAME, server);
+      return mainDeployer;
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that generates a webapp for an EJB endpoint 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class WebAppGeneratorDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+         throw new IllegalStateException("Cannot obtain unified deployement info");
+
+      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+      if (umd == null)
+         throw new IllegalStateException("Cannot obtain unified meta data");
+
+      if (dep.getType().toString().endsWith("EJB21"))
+      {
+         ServiceEndpointGeneratorEJB21 generator = new ServiceEndpointGeneratorEJB21();
+         udi.webappURL = generator.generatWebDeployment(umd, udi);
+      }
+      else if (dep.getType().toString().endsWith("EJB3"))
+      {
+         ServiceEndpointGeneratorEJB3 generator = new ServiceEndpointGeneratorEJB3();
+         udi.webappURL = generator.generatWebDeployment(umd, udi);
+      }
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss42.jbossws;
+
+// $Id$
+
+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.metadata.WebMetaData;
+import org.jboss.metadata.WebSecurityMetaData;
+import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
+import org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
+
+/**
+ * Build container independent web meta data 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class WebMetaDataAdapter
+{
+   public UnifiedWebMetaData buildUnifiedWebMetaData(UnifiedDeploymentInfo udi, WebMetaData webMetaData)
+   {
+      udi.addAttachment(WebMetaData.class, webMetaData);
+
+      UnifiedWebMetaData umd = new UnifiedWebMetaData();
+      umd.setContextRoot(webMetaData.getContextRoot());
+      umd.setServletMappings(webMetaData.getServletMappings());
+      umd.setServletClassNames(getServletClassMap(webMetaData));
+      umd.setConfigName(webMetaData.getConfigName());
+      umd.setConfigFile(webMetaData.getConfigFile());
+      umd.setSecurityDomain(webMetaData.getSecurityDomain());
+      umd.setPublishLocationAdapter(getPublishLocationAdpater(webMetaData));
+      umd.setSecurityMetaData(getSecurityMetaData(webMetaData.getSecurityContraints()));
+
+      return umd;
+   }
+
+   private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
+   {
+      return new PublishLocationAdapter()
+      {
+         public String getWsdlPublishLocationByName(String name)
+         {
+            return wmd.getWsdlPublishLocationByName(name);
+         }
+      };
+   }
+
+   private List<UnifiedWebSecurityMetaData> getSecurityMetaData(final Iterator securityConstraints)
+   {
+      ArrayList<UnifiedWebSecurityMetaData> unifiedsecurityMetaData = new ArrayList<UnifiedWebSecurityMetaData>();
+
+      while (securityConstraints.hasNext())
+      {
+         WebSecurityMetaData securityMetaData = (WebSecurityMetaData)securityConstraints.next();
+
+         UnifiedWebSecurityMetaData current = new UnifiedWebSecurityMetaData();
+         unifiedsecurityMetaData.add(current);
+
+         current.setTransportGuarantee(securityMetaData.getTransportGuarantee());
+
+         HashMap resources = securityMetaData.getWebResources();
+         for (Object webResourceObj : resources.values())
+         {
+            WebResourceCollection webResource = (WebResourceCollection)webResourceObj;
+            UnifiedWebResourceCollection 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;
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jms;
+
+// $Id:JMSMessageDispatcher.java 915 2006-09-08 08:40:45Z thomas.diesler at jboss.com $
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.rmi.RemoteException;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.server.legacy.ServiceEndpoint;
+import org.jboss.ws.core.server.legacy.ServiceEndpointInvoker;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManager;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManagerFactory;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * A dispatcher for SOAPMessages
+ *  
+ * @author Thomas.Diesler at jboss.org
+ */
+public class JMSMessageDispatcher implements JMSMessageDispatcherMBean
+{
+   // logging support
+   protected Logger log = Logger.getLogger(JMSMessageDispatcher.class);
+
+   /** Dispatch the message to the underlying SOAP engine
+    */
+   public SOAPMessage dipatchMessage(String fromName, Object targetBean, InputStream reqMessage) throws RemoteException
+   {
+      ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+      ServiceEndpointManager epManager = factory.getServiceEndpointManager();
+      ObjectName sepID = getServiceEndpointForDestination(epManager, fromName);
+
+      if (sepID == null)
+         throw new WSException("Cannot find serviceID for: " + fromName);
+
+      log.debug("dipatchMessage: " + sepID);
+
+      // Setup the MDB invoker
+      ServiceEndpoint sep = epManager.getServiceEndpointByID(sepID);
+      ServerEndpointMetaData sepMetaData = sep.getServiceEndpointInfo().getServerEndpointMetaData();
+
+      ServiceEndpointInvoker invoker = sep.getServiceEndpointInfo().getInvoker();
+      if (invoker instanceof ServiceEndpointInvokerMDB)
+      {
+         ServiceEndpointInvokerMDB mdbInvoker = (ServiceEndpointInvokerMDB)invoker;
+         mdbInvoker.setTargetBeanObject(targetBean);
+      }
+
+      // Associate a message context with the current thread
+      CommonMessageContext msgContext = new SOAPMessageContextJAXRPC();
+      MessageContextAssociation.pushMessageContext(msgContext);
+      msgContext.setEndpointMetaData(sepMetaData);
+      
+      SOAPMessage resMessage = null;
+      try
+      {
+         // Process the request message and return the already serialized response
+         // Legacy implementations of the JMSTransportSupport dont provide a msg
+         // context which is needed for serialization.
+         resMessage = (SOAPMessage)sep.processRequest(null, null, reqMessage);
+         resMessage.writeTo(new ByteArrayOutputStream());
+         return resMessage;
+      }
+      catch (Exception ex)
+      {
+         WSException.rethrow("Cannot process SOAP request", ex);
+      }
+      finally
+      {
+         MessageContextAssociation.popMessageContext();
+      }
+      
+      return resMessage;
+   }
+
+   /** Dispatch the message to the underlying SOAP engine
+    */
+   public SOAPMessage delegateMessage(String serviceID, InputStream soapMessage) throws RemoteException
+   {
+      throw new NotImplementedException();
+   }
+
+   // The destination jndiName is encoded in the service object name under key 'jms'
+   private ObjectName getServiceEndpointForDestination(ServiceEndpointManager epManager, String fromName)
+   {
+      ObjectName sepID = null;
+      for (ObjectName aux : epManager.getServiceEndpoints())
+      {
+         String jmsProp = aux.getKeyProperty("jms");
+         if (jmsProp != null && jmsProp.equals(fromName))
+         {
+            sepID = aux;
+            break;
+         }
+      }
+      return sepID;
+   }
+
+   public void create() throws Exception
+   {
+      MBeanServer server = MBeanServerLocator.locateJBoss();
+      if (server != null)
+      {
+         server.registerMBean(this, OBJECT_NAME);
+      }
+   }
+
+   public void destroy() throws Exception
+   {
+      MBeanServer server = MBeanServerLocator.locateJBoss();
+      if (server != null)
+      {
+         server.unregisterMBean(OBJECT_NAME);
+      }
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jms;
+
+// $Id:JMSMessageDispatcher.java 915 2006-09-08 08:40:45Z thomas.diesler at jboss.com $
+
+public interface JMSMessageDispatcherMBean extends MessageDispatcher
+{
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,241 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jms;
+
+// $Id:JMSTransportSupport.java 915 2006-09-08 08:40:45Z thomas.diesler at jboss.com $
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBException;
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+import javax.jms.BytesMessage;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NestedRuntimeException;
+
+/**
+ * The abstract base class for MDBs that want to act as web service endpoints.
+ * A subclass should only need to implement the service endpoint interface.
+ *
+ * @author Thomas.Diesler at jboss.org
+ */
+public abstract class JMSTransportSupport implements MessageDrivenBean, MessageListener
+{
+   // logging support
+   protected Logger log = Logger.getLogger(JMSTransportSupport.class);
+
+   //private MessageDrivenContext mdbCtx;
+   private QueueConnectionFactory queueFactory;
+
+   /**
+    * All messages come in here, if it is a BytesMessage we pass it on for further processing.
+    */
+   public void onMessage(Message message)
+   {
+      try
+      {
+         String msgStr = null;
+         if (message instanceof BytesMessage)
+         {
+            msgStr = getMessageStr((BytesMessage)message);
+         }
+         else if (message instanceof TextMessage)
+         {
+            msgStr = ((TextMessage)message).getText();
+         }
+         else
+         {
+            log.warn("Invalid message type: " + message);
+            return;
+         }
+
+         log.debug("Incomming SOAP message: " + msgStr);
+
+         String fromName = null;
+         Destination destination = message.getJMSDestination();
+         if (destination instanceof Queue)
+            fromName = "queue/" + ((Queue)destination).getQueueName();
+         if (destination instanceof Topic)
+            fromName = "topic/" + ((Topic)destination).getTopicName();
+
+         InputStream reqMessage = new ByteArrayInputStream(msgStr.getBytes());
+         SOAPMessage resMessage = processSOAPMessage(fromName, reqMessage);
+
+         if (resMessage != null)
+         {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            resMessage.writeTo(baos);
+
+            msgStr = new String(baos.toByteArray());
+            log.debug("Outgoing SOAP message: " + msgStr);
+
+            Queue replyQueue = getReplyQueue(message);
+            if (replyQueue != null)
+            {
+               sendResponse(replyQueue, msgStr);
+            }
+            else
+            {
+               log.warn("No reply queue, ignore response message");
+            }
+         }
+         else
+         {
+            log.debug("SOAP response message is null");
+         }
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception e)
+      {
+         throw new EJBException(e);
+      }
+   }
+
+   protected SOAPMessage processSOAPMessage(String fromName, InputStream reqMessage) throws SOAPException, IOException, RemoteException
+   {
+      MessageDispatcher msgDispatcher = new JMSMessageDispatcher();
+      SOAPMessage resMessage = msgDispatcher.dipatchMessage(fromName, this, reqMessage);
+      return resMessage;
+   }
+
+   private String getMessageStr(BytesMessage message) throws Exception
+   {
+      byte[] buffer = new byte[8 * 1024];
+      ByteArrayOutputStream out = new ByteArrayOutputStream(buffer.length);
+      int read = message.readBytes(buffer);
+      while (read != -1)
+      {
+         out.write(buffer, 0, read);
+         read = message.readBytes(buffer);
+      }
+
+      byte[] msgBytes = out.toByteArray();
+      return new String(msgBytes);
+   }
+
+   /**
+    * Get the reply queue.
+    */
+   protected Queue getReplyQueue(Message message) throws JMSException
+   {
+      Queue replyQueue = (Queue)message.getJMSReplyTo();
+      return replyQueue;
+   }
+
+   /**
+    * Respond to the call by sending a message to the reply queue
+    */
+   protected void sendResponse(Queue replyQueue, String msgStr) throws SOAPException, IOException, JMSException
+   {
+      QueueConnection qc = queueFactory.createQueueConnection();
+      QueueSession session = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+      QueueSender sender = null;
+      try
+      {
+         sender = session.createSender(replyQueue);
+         TextMessage responseMessage = session.createTextMessage(msgStr);
+         sender.send(responseMessage);
+         log.info("Sent response");
+      }
+      finally
+      {
+         try
+         {
+            sender.close();
+         }
+         catch (JMSException ignored)
+         {
+         }
+         try
+         {
+            session.close();
+         }
+         catch (JMSException ignored)
+         {
+         }
+         try
+         {
+            qc.close();
+         }
+         catch (JMSException ignored)
+         {
+         }
+      }
+   }
+
+   // MDB lifecycle methods ********************************************************************************************
+
+   public void ejbCreate()
+   {
+      try
+      {
+         InitialContext ctx = new InitialContext();
+         queueFactory = (QueueConnectionFactory)ctx.lookup("java:/ConnectionFactory");
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception e)
+      {
+         throw new NestedRuntimeException(e);
+      }
+   }
+
+   /**
+    * A container invokes this method before it ends the life of the message-driven object.
+    */
+   public void ejbRemove() throws EJBException
+   {
+   }
+
+   /**
+    * Set the associated message-driven context.
+    */
+   public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
+   {
+      //this.mdbCtx = ctx;
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jms;
+
+// $Id:MessageDispatcher.java 898 2006-09-05 08:23:03Z thomas.diesler at jboss.com $
+
+import java.io.InputStream;
+import java.rmi.RemoteException;
+
+import javax.management.ObjectName;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ws.integration.ObjectNameFactory;
+
+/**
+ * A dispatcher for SOAPMessages 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 19-Feb-2006
+ */
+public interface MessageDispatcher
+{
+   public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=JMSTransportSupport");
+   
+   /** Dispatch the message to the underlying SOAP engine
+    */
+   SOAPMessage dipatchMessage(String fromName, Object targetImplBean, InputStream reqMessage) throws RemoteException;
+   
+   /** Dispatch the message to the underlying SOAP engine
+    */
+   SOAPMessage delegateMessage(String serviceID, InputStream reqMessage) throws RemoteException;
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java
===================================================================
--- projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jms;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.server.legacy.AbstractServiceEndpointInvoker;
+import org.jboss.ws.core.server.legacy.ServiceEndpointInvoker;
+import org.jboss.ws.core.utils.ThreadLocalAssociation;
+
+/**
+ * Handles invocations on MDB endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-Mar-2006
+ */
+public class ServiceEndpointInvokerMDB extends AbstractServiceEndpointInvoker implements ServiceEndpointInvoker
+{
+   // provide logging
+   private Logger log = Logger.getLogger(ServiceEndpointInvokerMDB.class);
+
+   /** Load the SEI implementation bean if necessary
+    */
+   public Class loadServiceEndpoint() throws ClassNotFoundException
+   {
+      return null;
+   }
+
+   // The dispatcher sets the target bean object
+   public void setTargetBeanObject(Object targetMDB)
+   {
+      ThreadLocalAssociation.localInvokerMDBAssoc().set(targetMDB);
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary
+    */
+   public Object createServiceEndpointInstance(Object endpointContext, Class seiImplClass) throws InstantiationException, IllegalAccessException
+   {
+      return ThreadLocalAssociation.localInvokerMDBAssoc().get();
+   }
+
+   /** Invoke an instance of the SEI implementation bean */
+   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
+   {
+      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+      try
+      {
+         Class implClass = seiImpl.getClass();
+         Method seiMethod = epInv.getJavaMethod();
+         Method implMethod = getImplMethod(implClass, seiMethod);
+
+         Object[] args = epInv.getRequestPayload();
+         Object retObj = implMethod.invoke(seiImpl, args);
+         epInv.setReturnValue(retObj);
+      }
+      catch (Exception e)
+      {
+         handleInvocationException(e);
+      }
+      finally
+      {
+         // cleanup thread local
+         setTargetBeanObject(null);
+      }
+   }
+
+   /** Destroy an instance of the SEI implementation bean if necessary */
+   public void destroyServiceEndpointInstance(Object seiImpl)
+   {
+   }
+}


Property changes on: projects/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.core.server.HttpServer
===================================================================
--- projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.core.server.HttpServer	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.core.server.HttpServer	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1 @@
+org.jboss.ws.integration.jboss42.JBossHttpServer
\ No newline at end of file

Added: projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory
===================================================================
--- projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1 @@
+org.jboss.ws.integration.jboss42.SecurityAssociationAdaptorFactoryImpl
\ No newline at end of file

Added: projects/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- projects/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer">
+  
+  <!-- An abstraction of server configuration aspects. -->  
+  <bean name="WSServerConfig" class="org.jboss.ws.integration.management.ServerConfigImpl">
+    <!--
+        The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
+        element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
+      
+        If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
+        If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
+        
+        If 'webServiceHost' is not set, JBossWS uses requesters protocol host and port when rewriting the <soap:address>.
+    -->
+    <property name="webServiceHost">${jboss.bind.address}</property>
+    <property name="modifySOAPAddress">true</property>
+    
+    <!-- 
+      Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
+      Otherwise the ports will be identified by querying the list of installed connectors. 
+      If multiple connectors are found the port of the first connector is used.
+      <property name="webServiceSecurePort">8443</property>
+      <property name="webServicePort">8080</property>
+    -->
+  </bean>
+
+  <!-- The registry for web service endpoints -->
+  <bean name="WSEndpointRegistry" class="org.jboss.ws.core.server.ServiceEndpointRegistry"/>
+  
+  <!-- A subscription manager for WS-Eventing -->
+  <bean name="WSSubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
+  
+  <!-- Bind Service objects in client environment context  -->
+  <!-- The bean name is compiled into the server. Changeit with the next release. -->
+  <bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
+  
+  <!-- Locate the single instance of the kernel -->  
+  <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
+    <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+  </bean>
+  
+  <!-- 
+    ********************************************************************************************************************* 
+    Web Service deployment                                                                                                
+    
+    There are three deployer interceptors registered with the JBoss Deployers. 
+    
+    1) DeployerInterceptorJSE
+    2) DeployerInterceptorEJB21
+    3) DeployerInterceptorEJB3
+    
+    Each interceptor has a number of DeployerHooks registerd with it 
+    
+    Conceptually, each of these hooks implements the following pattern:
+    
+    DployerHook.deploy(unit) 
+      if(isWebServiceDeployment)
+        Deployment dep = createDeployment(unit)
+        DeployerManager.deploy(dep)
+ 
+    DeployerHook.undeploy(unit)
+      Deployment dep = getDeployment(unit) 
+      DeployerManager.undeploy(dep)
+    
+    Each deployer hook has a web service DeployerManager injected into it. 
+    A web service DeployerManager maintains a list of Deployers, each of which 
+    handles a single aspect of web service deployment.
+    
+    Finally, each Endpoint is registered with the EndpointRegistry.
+    
+    ********************************************************************************************************************* 
+  -->
+  
+  <!-- 
+    Each DeploymentManger maintains a list of Deployers
+    Each Deployer handles a single aspect of web service deployment.
+  -->
+  <bean name="WSDeployerManagerJSE" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+    <property name="deployers">
+      <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+        <inject bean="WSUnifiedDeploymentInfoDeployer"/>
+        <inject bean="WSUnifiedMetaDataDeployer"/>
+        <inject bean="WSUnifiedMetaDataAssociationDeployer"/>
+        <inject bean="WSModifyWebMetaDataDeployer"/>
+      </list>
+    </property>
+  </bean>
+  <bean name="WSDeployerManagerEJB" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+    <property name="deployers">
+      <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+        <inject bean="WSUnifiedDeploymentInfoDeployer"/>
+        <inject bean="WSUnifiedMetaDataDeployer"/>
+        <inject bean="WSUnifiedMetaDataAssociationDeployer"/>
+        <inject bean="WSWebAppGeneratorDeployer"/>
+        <inject bean="WSWebAppDeployerDeployer"/>
+      </list>
+    </property>
+  </bean>
+  <bean name="WSMainDeployerManager" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+    <property name="deployers">
+      <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+        <inject bean="WSEndpointNameDeployer"/>
+        <inject bean="WSEndpointHandlerDeployer"/>
+        <inject bean="WSPublishContractDeployer"/>
+        <inject bean="WSClassLoaderInjectionDeployer"/>
+        <inject bean="WSEagerInitializeDeployer"/>
+        <inject bean="WSEndpointRegistryDeployer"/>
+        <inject bean="WSEndpointLifecycleDeployer"/>
+      </list>
+    </property>
+  </bean>
+  
+  <!-- 
+    The Deployers
+    Each handles a single aspect of web service deployment 
+  --> 
+  <bean name="WSClassLoaderInjectionDeployer" class="org.jboss.ws.integration.jboss42.jbossws.ClassLoaderInjectionDeployer"/>
+  <bean name="WSEagerInitializeDeployer" class="org.jboss.ws.core.deployment.EagerInitializeDeployer"/>
+  <bean name="WSEndpointHandlerDeployer" class="org.jboss.ws.core.deployment.EndpointHandlerDeployer">
+    <property name="requestHandler">org.jboss.ws.core.server.RequestHandlerImpl</property>
+    <property name="lifecycleHandler">org.jboss.ws.core.server.LifecycleHandlerImpl</property>
+    <property name="invocationHandler">
+      <map keyClass="java.lang.String" valueClass="java.lang.String">
+        <entry><key>JAXRPC_JSE</key><value>org.jboss.ws.core.server.InvocationHandlerJSE</value></entry>
+        <entry><key>JAXRPC_EJB21</key><value>org.jboss.ws.integration.jboss42.jbossws.InvocationHandlerEJB21</value></entry>
+        <entry><key>JAXWS_JSE</key><value>org.jboss.ws.core.server.InvocationHandlerJSE</value></entry>
+        <entry><key>JAXWS_EJB3</key><value>org.jboss.ws.integration.jboss42.jbossws.InvocationHandlerEJB3</value></entry>
+      </map>
+    </property>
+  </bean>
+  <bean name="WSEndpointLifecycleDeployer" class="org.jboss.ws.core.deployment.EndpointLifecycleDeployer"/>
+  <bean name="WSEndpointNameDeployer" class="org.jboss.ws.core.deployment.EndpointNameDeployer"/>
+  <bean name="WSEndpointRegistryDeployer" class="org.jboss.ws.integration.deployment.EndpointRegistryDeployer"/>
+  <bean name="WSModifyWebMetaDataDeployer" class="org.jboss.ws.integration.jboss42.jbossws.ModifyWebMetaDataDeployer">
+    <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+  </bean>
+  <bean name="WSPublishContractDeployer" class="org.jboss.ws.core.deployment.PublishContractDeployer"/>
+  <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.ws.integration.jboss42.jbossws.UnifiedDeploymentInfoDeployer">
+    <property name="deploymentInfoAdapter"><inject bean="WSDeploymentInfoAdapter"/></property>
+  </bean>
+  <bean name="WSUnifiedMetaDataAssociationDeployer" class="org.jboss.ws.core.deployment.UnifiedMetaDataAssociationDeployer"/>
+  <bean name="WSUnifiedMetaDataDeployer" class="org.jboss.ws.core.deployment.UnifiedMetaDataDeployer"/>
+  <bean name="WSWebAppGeneratorDeployer" class="org.jboss.ws.integration.jboss42.jbossws.WebAppGeneratorDeployer"/>
+  <bean name="WSWebAppDeployerDeployer" class="org.jboss.ws.integration.jboss42.jbossws.WebAppDeployerDeployer">
+    <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+  </bean>
+
+  <!-- Deployer helper beans -->  
+  <bean name="WSServiceEndpointPublisher" class="org.jboss.ws.core.deployment.ServiceEndpointPublisher">
+    <property name="servletClass">org.jboss.ws.core.server.ServiceEndpointServlet</property>
+  </bean>
+  <bean name="WSDeploymentInfoAdapter" class="org.jboss.ws.integration.jboss42.jbossws.DeploymentInfoAdapter">
+    <property name="appMetaDataAdapter"><inject bean="WSAppMetaDataAdapter"/></property>
+    <property name="webMetaDataAdapter"><inject bean="WSWebMetaDataAdapter"/></property>
+  </bean>
+  <bean name="WSAppMetaDataAdapter" class="org.jboss.ws.integration.jboss42.jbossws.ApplicationMetaDataAdapter"/>
+  <bean name="WSWebMetaDataAdapter" class="org.jboss.ws.integration.jboss42.jbossws.WebMetaDataAdapter"/>
+  
+  <!-- 
+    Register DeployerHooks with JBoss deployers 
+  -->
+  <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.ws.integration.jboss42.jbossws.JAXRPCDeployerHookJSE">
+    <property name="deployerManager"><inject bean="WSDeployerManagerJSE"/></property>
+    <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.ws.integration.jboss42.jbossws.JAXRPCDeployerHookEJB21">
+    <property name="deployerManager"><inject bean="WSDeployerManagerEJB"/></property>
+    <property name="phaseOneInterceptors">
+      <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.ws.integration.jboss42.jbossws.JAXWSDeployerHookJSE">
+    <property name="deployerManager"><inject bean="WSDeployerManagerJSE"/></property>
+    <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.ws.integration.jboss42.jbossws.JAXWSDeployerHookEJB3">
+    <property name="deployerManager"><inject bean="WSDeployerManagerEJB"/></property>
+    <property name="phaseOneInterceptors">
+      <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
+        <value>jboss.ws:service=DeployerInterceptorEJB3</value>
+      </list>
+    </property>
+  </bean>
+  <bean name="WSMainDeployerHook" class="org.jboss.ws.integration.jboss42.jbossws.MainDeployerHook">
+    <property name="deployerManager"><inject bean="WSMainDeployerManager"/></property>
+    <property name="phaseTwoInterceptors">
+      <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
+        <value>jboss.ws:service=DeployerInterceptorJSE</value>
+        <value>jboss.ws:service=DeployerInterceptorEJB21</value>
+        <value>jboss.ws:service=DeployerInterceptorEJB3</value>
+      </list>
+    </property>
+  </bean>
+    
+</deployment>


Property changes on: projects/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
===================================================================
--- projects/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<server>
+
+   <!--
+     A deployer service for JSE endpoints.
+   -->
+   <mbean name="jboss.ws:service=DeployerInterceptorJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.web:service=WebServer</depends-list-element>
+      </depends-list>
+   </mbean>
+
+   <!--
+     A deployer service for EJB2.1 endpoints.
+   -->
+   <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB21">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
+      </depends-list>
+   </mbean>
+
+   <!--
+     A deployer service for EJB3 endpoints.
+   -->
+   <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB3">
+      <depends-list optional-attribute-name="Interceptables">
+         <depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
+      </depends-list>
+   </mbean>
+
+</server>


Property changes on: projects/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
===================================================================
--- projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE jboss-web
+    PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+
+  <!--
+  <security-domain>java:/jaas/jbossws</security-domain>
+  -->
+  <context-root>jbossws</context-root>
+
+</jboss-web>


Property changes on: projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
===================================================================
--- projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  A web application that installs the JBossWS servlets
+
+  $Id$
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+  <display-name>JBossWS</display-name>
+
+  <servlet>
+    <servlet-name>ContextServlet</servlet-name>
+    <servlet-class>org.jboss.ws.integration.jboss42.JBossContextServlet</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>PortComponentLinkServlet</servlet-name>
+    <servlet-class>org.jboss.ws.integration.jboss42.PortComponentLinkServlet</servlet-class>
+  </servlet>
+  
+  <!-- now the mappings -->
+  
+  <servlet-mapping>
+    <servlet-name>ContextServlet</servlet-name>
+    <url-pattern>/services/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>PortComponentLinkServlet</servlet-name>
+    <url-pattern>/pclink</url-pattern>
+  </servlet-mapping>
+
+  <!-- 
+  currently the W3C haven't settled on a media type for WSDL;
+  http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
+  for now we go with the basic 'it's XML' response 
+  -->
+  <mime-mapping>
+    <extension>wsdl</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+
+  <mime-mapping>
+    <extension>xsd</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+
+  <welcome-file-list id="WelcomeFileList">
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+
+</web-app>


Property changes on: projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/index.html
===================================================================
--- projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/index.html	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/index.html	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,63 @@
+<html><head>
+<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<title>JBossWS / jbossws-2.0.0.CR3 (date=200702012001)</title>
+<link rel='stylesheet' href='./styles.css'>
+</head>
+<body>
+
+<div class='pageHeader'>Welcome to JBoss Web Services</div>
+
+<div class="pageSection">
+<h2>J2EE compatible web services</h2>
+JBossWS is a JAX-WS compliant web service stack developed to be part of JBoss' JavaEE5 offering.
+</div>
+
+<div class="pageSection">
+<h3>Administration</h3>
+
+<fieldset>
+    <legend><b>Runtime information</b></legend>
+<ul>
+	<li><a href="services">View a list of deployed services</a></li>
+	<!--li><a href="depends">View installed dependencies</a></li-->
+	<li><a href="/jmx-console/">Access JMX console</a></li>
+</ul>
+</fieldset>
+</div>
+
+<div class="pageSection">
+<h3>Project information</h3>
+
+<fieldset>
+    <legend><b>Documentation</b></legend>
+
+<ul>
+	<li><a href="http://labs.jboss.com/portal/jbossws/downloads">Latest download and samples</a></li>
+	<li><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBWSFAQ">FAQ</a></li>
+	<li><a href="http://labs.jboss.com/jbossws/user-guide/en/html/index.html">User guide</a></li>
+	<li><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS">JBossWS WIKI</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+    <legend><b>Community</b></legend>
+<ul>
+	<li><a href="http://www.jboss.org/index.html?module=bb&op=viewforum&f=200">User forum</a></li>
+	<li><a href="http://www.jboss.org/index.html?module=bb&op=viewforum&f=174">Design forum</a></li>
+	<li><a href="https://lists.jboss.org/mailman/listinfo/jbossws-users">Mailing list</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+    <legend><b>Source repository</b></legend>
+<ul>
+	<li><a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWSFAQSourceRepository">Subversion repository</a></li>
+	<li><a href="http://fisheye.jboss.com/viewrep/JBossWS">Browse sources online</a></li>
+</ul>
+</fieldset>
+</div>
+
+</body>
+</html>

Added: projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/styles.css
===================================================================
--- projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/styles.css	                        (rev 0)
+++ projects/jbws-jboss42/trunk/src/main/resources/jbossws.war/styles.css	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,186 @@
+
+/* table for list views */
+.table_list {
+}
+
+/* table for detail views */
+.table_form {
+}
+
+.pageHeader {
+   font-size: 14pt;
+   font-weight: BOLD;
+   color: #ffffff;
+   border-bottom-width:1px;
+   border-bottom-style:solid;
+   border-color:#000066;
+   margin-bottom:15px;
+   padding-left:15px;
+   padding-top:5px;
+   padding-bottom:5px;
+   background-color: #aaaadd;
+   max-width: 900px;
+}
+
+.pageSection {
+ padding-left:15px;
+ margin-bottom: 5px;
+ max-width: 900px;
+}
+
+.metrics
+{	 
+   font-size: 6pt;
+   background-color: #dddddd;
+   width: 100%;
+}
+
+/* table row header */
+.list_tr_head {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   font-weight: 600;
+   text-align: center;
+   background-color: #aaaadd;
+}
+
+/* table row list view */
+.list_tr {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: top;
+   background-color: #ffffff;
+}
+
+/* table row list view odd lines */
+.list_tr_even {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: top;
+   background-color: #ffffff;
+}
+
+/* table row list view even lines */
+.list_tr_odd {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: top;
+   background-color: #dddddd;
+}
+
+/* form label */
+.form_label {
+   font-family: Verdana, sans-serif;
+   font-weight: 500;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: top;
+   background-color: #dddddd;
+   padding-top: 2px;
+   padding-bottom: 2px;
+}
+
+/* form value */
+.form_value {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: baseline;
+}
+
+/* tiny writing */
+.tiny {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #666666;
+}
+
+/* required input fields */
+.inputmust {
+   background-color: #dddddd;
+}
+
+/* error message */
+.error {
+   font-family: Courier New;
+   color: #990000;
+}
+
+/* error message */
+.error_trace {
+   font-family: Courier New;
+}
+
+/* active tree node */
+.tree_active_label {
+   font-weight: bold;
+}
+
+body {
+   font-family: Verdana,, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   background-color: #ffffff;
+}
+
+/* title style */
+h1 {
+   font-family: Verdana, sans-serif;
+   font-size: 14pt;
+   font-weight: 600;
+   color: #000066;
+}
+
+h2 {
+   font-family: Verdana, sans-serif;
+   font-size: 12pt;
+   font-weight: 600;
+   color: #000066;
+}
+
+h3 {
+   font-family: Verdana, sans-serif;
+   font-size: 10pt;
+   font-weight: 600;
+   color: #000066;
+}
+
+h4 {
+   font-family: Verdana, sans-serif;
+   font-size: 10pt;
+   font-weight: 500;
+   color: #000066;
+}
+
+/* table desk */
+td {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   padding-left: 5px;
+   padding-right: 5px;
+}
+
+input, textarea, select, option {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+}
+
+a {
+   font-family: Verdana, sans-serif;
+   color: #0000dd;
+   text-decoration: none;
+}
+
+a:hover{
+   font-family: Verdana, sans-serif;
+   color: #cc0000;
+   text-decoration: none;
+}
+
+pre {
+    background:#dddddd
+}
\ No newline at end of file

Added: projects/jbws-jboss42/trunk/version.properties
===================================================================
--- projects/jbws-jboss42/trunk/version.properties	                        (rev 0)
+++ projects/jbws-jboss42/trunk/version.properties	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,32 @@
+
+# $Id: version.properties 2928 2007-04-26 10:53:56Z thomas.diesler at jboss.com $
+
+specification.title=JBossWS
+specification.vendor=JBoss (http://www.jboss.org)
+specification.version=jbossws-2.1
+
+version.id=2.1.0.DEV
+repository.id=SNAPSHOT
+
+implementation.title=JBoss Web Services (JBossWS)
+implementation.url=http://www.jboss.org/products/jbossws
+implementation.vendor=JBoss Inc.
+implementation.vendor.id=http://www.jboss.org
+
+# Thirdparty library versions
+apache-xmlsec=1.3.0
+ibm-wsdl4j=1.6.2
+jboss-common-core=2.0.2.GA
+jboss-common-logging-log4j=2.0.2.GA
+jboss-common-logging-spi=2.0.2.GA
+jboss-jaxr=1.2.0.GA
+jboss-jbossws=SNAPSHOT
+jboss-jbossws-spi=SNAPSHOT
+jboss-jbossxb=1.0.0.CR10
+jboss-microcontainer=1.0.2
+jbossws-wsconsume-impl=2.0.0
+stax-api=1.0
+sun-jaxb=2.0.3jboss
+sun-servlet=2.4
+wscommons-policy=1.0
+

Added: projects/jbws-jboss50/trunk/.classpath
===================================================================
--- projects/jbws-jboss50/trunk/.classpath	                        (rev 0)
+++ projects/jbws-jboss50/trunk/.classpath	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-common-core.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-container.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-dependency.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-deployers.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-logging-log4j.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-logging-spi.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-microcontainer.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-xml-binding.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-jaxrpc.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-jaxws.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-saaj.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jbossws-core.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jbossws-spi.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-security-spi.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/jbossws-core"/>
+	<classpathentry kind="output" path="output-eclipse"/>
+</classpath>

Added: projects/jbws-jboss50/trunk/.project
===================================================================
--- projects/jbws-jboss50/trunk/.project	                        (rev 0)
+++ projects/jbws-jboss50/trunk/.project	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jbws-jboss50</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: projects/jbws-jboss50/trunk/ant.properties.example
===================================================================
--- projects/jbws-jboss50/trunk/ant.properties.example	                        (rev 0)
+++ projects/jbws-jboss50/trunk/ant.properties.example	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,26 @@
+#
+# A sample ant properties file
+#
+# $Id: ant.properties.example 2870 2007-04-15 14:54:22Z thomas.diesler at jboss.com $
+
+# JBoss Home
+#jboss50.home=/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3
+
+# The JBoss server instance
+jboss.server.instance=default
+
+# JBoss Repository
+#jboss.repository=file:/home/tdiesler/svn/jboss.local.repository
+jboss.repository=http://repository.jboss.org
+
+# JBossWS Release
+jboss.local.repository=/home/tdiesler/svn/jboss.local.repository
+
+# Force thirdparty HTTP get
+#force.thirdparty.get=true
+
+# Java Compiler options
+javac.debug=yes
+javac.deprecation=yes
+javac.fail.onerror=yes
+javac.verbose=no

Added: projects/jbws-jboss50/trunk/build.xml
===================================================================
--- projects/jbws-jboss50/trunk/build.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/build.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,214 @@
+<?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$ -->
+
+<project default="main"  basedir="." name="JBossWS-JBoss50">
+  
+  <import file="${basedir}/src/main/etc/ant-import/build-deploy.xml"/>
+  <import file="${basedir}/src/main/etc/ant-import/build-release.xml"/>
+  <import file="${basedir}/src/main/etc/ant-import/build-thirdparty.xml"/>
+  
+  <!-- ================================================================== -->
+  <!-- Setup                                                              -->
+  <!-- ================================================================== -->
+  
+  <property file="${basedir}/ant.properties"/>
+  <property file="${basedir}/version.properties"/>
+  <property environment="env"/>
+  
+  <property name="jboss50.lib" value="${jboss50.home}/lib"/>
+  <property name="jboss50.client" value="${jboss50.home}/client"/>
+  <property name="jboss50.server" value="${jboss50.home}/server/${jboss.server.instance}"/>
+  <property name="jboss50.server.lib" value="${jboss50.server}/lib"/>
+  <property name="jboss50.server.deploy" value="${jboss50.server}/deploy"/>
+  <property name="jboss50.server.deployers" value="${jboss50.server}/deployers"/>
+  <property name="jboss50.thirdparty" value="${jboss50.home}/../../../thirdparty"/>
+  
+  <property name="jboss50.dir" value="${basedir}"/>
+  <property name="jboss50.src.dir" value="${jboss50.dir}/src/main"/>
+  <property name="jboss50.etc.dir" value="${jboss50.src.dir}/etc"/>
+  <property name="jboss50.java.dir" value="${jboss50.src.dir}/java"/>
+  <property name="jboss50.resources.dir" value="${jboss50.src.dir}/resources"/>
+  <property name="jboss50.output.dir" value="${jboss50.dir}/output"/>
+  <property name="jboss50.output.classes.dir" value="${jboss50.output.dir}/classes"/>
+  <property name="jboss50.output.etc.dir" value="${jboss50.output.dir}/etc"/>
+  <property name="jboss50.output.lib.dir" value="${jboss50.output.dir}/lib"/>
+	
+  <property name="thirdparty.dir" value="${basedir}/thirdparty"/>
+  
+  <property name="jboss50.available.file" value="${jboss50.client}/jboss-ejb3-client.jar"/>
+  <available property="jboss50.available" file="${jboss50.available.file}"/>
+	
+  <!-- ================================================================== -->
+  <!-- Initialization                                                     -->
+  <!-- ================================================================== -->
+  
+  <target name="prepare">
+    
+    <mkdir dir="${jboss50.output.dir}"/>
+    
+    <checksum file="${basedir}/version.properties" fileext=".md5" verifyproperty="checksum.ok"/>
+    <checksum file="${basedir}/version.properties" fileext=".md5"/>
+    
+    <condition property="force.thirdparty.get">
+      <or>
+        <not>
+          <available file="${thirdparty.dir}" type="dir"/>
+        </not>
+        <isfalse value="${checksum.ok}"/>
+      </or>
+    </condition>
+    
+    <tstamp>
+      <format property="build.id" pattern="yyyyMMddHHmm"/>
+    </tstamp>
+	  
+  </target>
+  
+  <target name="jboss50-init" depends="prepare, thirdparty">
+    <fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Compile                                                            -->
+  <!-- ================================================================== -->
+  
+  <!--
+  | Compile everything.
+  |
+  | This target should depend on other compile-* targets for each
+  | different type of compile that needs to be performed, short of
+  | documentation compiles.
+  -->
+  
+  <target name="jboss50-compile" depends="jboss50-init,jboss50-compile-classes,jboss50-compile-etc" description="Compile all source files."/>
+  
+  <!-- Compile java sources -->
+  <target name="jboss50-compile-classes" depends="jboss50-init">
+    <mkdir dir="${jboss50.output.classes.dir}"/>
+    <javac srcdir="${jboss50.java.dir}" sourcepath="" destdir="${jboss50.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
+      deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
+      <include name="org/jboss/ws/integration/jboss50/**"/>
+      <classpath refid="jboss50.integration.classpath"/>
+    </javac>
+  </target>
+  
+  <!-- Compile etc files (manifests and such) -->
+  <target name="jboss50-compile-etc" depends="jboss50-init">
+    <mkdir dir="${jboss50.output.etc.dir}"/>
+    <copy todir="${jboss50.output.etc.dir}" filtering="yes" overwrite="yes">
+      <fileset dir="${jboss50.etc.dir}">
+        <include name="component-info.xml"/>
+        <include name="default.mf"/>
+  	  </fileset>
+      <filterset>
+        <filter token="java.vm.version" value="${java.vm.version}"/>
+        <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="${basedir}/version.properties"/>
+      </filterset>
+    </copy>
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Archives                                                           -->
+  <!-- ================================================================== -->
+  
+  <!--
+  | Build all jar files.
+  -->
+  <target name="jboss50-jars" depends="jboss50-compile,jboss50-module-jars" description="Builds all jar files.">
+  </target>
+  
+  <!--
+  |  Build all jar files.
+  -->
+  <target name="jboss50-module-jars" depends="jboss50-init">
+    
+    <!-- Build jbossws-jboss50.jar -->
+    <mkdir dir="${jboss50.output.lib.dir}"/>
+    <jar jarfile="${jboss50.output.lib.dir}/jbossws-jboss50.jar" manifest="${jboss50.etc.dir}/default.mf">
+      <fileset dir="${jboss50.output.classes.dir}">
+        <include name="org/jboss/ws/integration/jboss50/**"/>
+      </fileset>
+      <metainf dir="${jboss50.resources.dir}/jbossws-jboss50.jar/META-INF"/>
+    </jar>
+    
+    <!-- Build jbossws-context.war -->
+    <war warfile="${jboss50.output.lib.dir}/jbossws-context.war" webxml="${jboss50.resources.dir}/jbossws.war/WEB-INF/web.xml">
+      <fileset dir="${jboss50.resources.dir}/jbossws.war">
+        <include name="index.html"/>
+        <include name="styles.css"/>
+      </fileset>
+      <webinf dir="${jboss50.resources.dir}/jbossws.war/WEB-INF">
+        <include name="jboss-web.xml"/>
+      </webinf>
+    </war>
+    
+    <!-- Build jbossws50.sar -->
+    <jar jarfile="${jboss50.output.lib.dir}/jbossws50.sar" manifest="${jboss50.etc.dir}/default.mf">
+      <!-- [JBAS-4379] MC beans deployed twice because of jacc service
+      <fileset dir="${jboss50.output.lib.dir}">
+        <include name="jbossws-context.war"/>
+      </fileset>
+      -->
+      <fileset dir="${thirdparty.dir}">
+        <include name="policy.jar"/>
+        <include name="jbossws-core.jar"/>
+        <include name="wsdl4j.jar"/>
+        <include name="xmlsec.jar"/>
+      </fileset>
+      <metainf dir="${thirdparty.dir}/jbossws-resources">
+        <include name="standard-*-config.xml"/>
+      </metainf>
+      <metainf dir="${jboss50.resources.dir}/jbossws.sar/META-INF">
+        <include name="jbossws-beans.xml"/>
+      </metainf>
+    </jar>
+    
+    <!-- Build jbossws50.deployer -->
+    <zip zipfile="${jboss50.output.lib.dir}/jbossws50-deployer.zip">
+      <fileset dir="${thirdparty.dir}">
+        <include name="jbossws-spi.jar"/>
+      </fileset>
+      <fileset dir="${jboss50.output.lib.dir}">
+        <include name="jbossws-jboss50.jar"/>
+      </fileset>
+      <fileset dir="${jboss50.resources.dir}/jbossws.deployer">
+        <include name="META-INF/jbossws-deployer-beans.xml"/>
+      </fileset>
+    </zip>
+    
+    <!-- Build jbossws50-src.zip -->
+    <zip zipfile="${jboss50.output.lib.dir}/jbossws50-src.zip" >
+      <fileset dir="${jboss50.java.dir}"/>
+    </zip>
+    
+   </target>
+  
+  <!-- ================================================================== -->
+  <!-- Miscellaneous                                                       -->
+  <!-- ================================================================== -->
+  
+  <target name="clean" depends="prepare" description="Cleans up most generated files.">
+    <delete dir="${jboss50.output.dir}"/>
+  </target>
+  
+  <target name="main" description="Executes the default target (most)." depends="most"/>
+  
+  <target name="most" description="Builds almost everything." depends="jboss50-jars"/>
+  
+  <target name="all" description="Create a distribution zip file" depends="main">
+  </target>
+  
+</project>


Property changes on: projects/jbws-jboss50/trunk/build.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/etc/JBossORG-EULA.txt
===================================================================
--- projects/jbws-jboss50/trunk/src/main/etc/JBossORG-EULA.txt	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/etc/JBossORG-EULA.txt	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,107 @@
+LICENSE AGREEMENT
+JBOSS(r)
+
+This License Agreement governs the use of the Software Packages and any updates to the Software 
+Packages, regardless of the delivery mechanism.  Each Software Package is a collective work 
+under U.S. Copyright Law.  Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to 
+the user ("Client") a license to the applicable collective work(s) pursuant to the 
+GNU Lesser General Public License v. 2.1 except for the following Software Packages: 
+(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to the 
+GNU General Public License v.2; 
+
+(b) JBoss Rules, which is licensed pursuant to the Apache  License v.2.0;
+
+(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is licensed under the 
+(open source) Sleepycat License (if Client does not wish to use the open source version of this database, 
+it may purchase a license from Sleepycat Software); 
+
+and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public License v.1, 
+and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to enter various 
+royalty-free patent licenses.  
+
+Each of the foregoing licenses is available at http://www.opensource.org/licenses/index.php.
+
+1.  The Software.  "Software Packages" refer to the various software modules that are created and made available 
+for distribution by the JBoss.org open source community at http://www.jboss.org.   Each of the Software Packages 
+may be comprised of hundreds of software components.  The end user license agreement for each component is located in 
+the component's source code.  With the exception of certain image files identified in Section 2 below, 
+the license terms for the components permit Client to copy, modify, and redistribute the component, 
+in both source code and binary code forms.  This agreement does not limit Client's rights under, 
+or grant Client rights that supersede, the license terms of any particular component.
+
+2.  Intellectual Property Rights.  The Software Packages are owned by Red Hat and others and are protected under copyright 
+and other laws.  Title to the Software Packages and any component, or to any copy, modification, or merged portion shall 
+remain with the aforementioned, subject to the applicable license.  The "JBoss" trademark, "Red Hat" trademark, the 
+individual Software Package trademarks, and the "Shadowman" logo are registered trademarks of Red Hat and its affiliates 
+in the U.S. and other countries.  This agreement permits Client to distribute unmodified copies of the Software Packages 
+using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the condition that Client follows Red Hat's 
+trademark guidelines for those trademarks located at http://www.redhat.com/about/corporate/trademark/.  Client must abide by 
+these trademark guidelines when distributing the Software Packages, regardless of whether the Software Packages have been modified. 
+If Client modifies the Software Packages, then Client must replace all Red Hat trademarks and logos identified at 
+http://www.jboss.com/company/logos, unless a separate agreement with Red Hat is executed or other permission granted.  
+Merely deleting the files containing the Red Hat trademarks may corrupt the Software Packages.  
+
+3.  Limited Warranty.  Except as specifically stated in this Paragraph 3 or a license for a particular 
+component, to the maximum extent permitted under applicable law, the Software Packages and the 
+components are provided and licensed "as is" without warranty of any kind, expressed or implied, 
+including the implied warranties of merchantability, non-infringement or fitness for a particular purpose.  
+Red Hat warrants that the media on which Software Packages may be furnished will be free from defects in 
+materials and manufacture under normal use for a period of 30 days from the date of delivery to Client.  
+Red Hat does not warrant that the functions contained in the Software Packages will meet Client's requirements 
+or that the operation of the Software Packages will be entirely error free or appear precisely as described 
+in the accompanying documentation. This warranty extends only to the party that purchases the Services 
+pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor. 
+
+4.  Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, the remedies 
+described below are accepted by Client as its only remedies.  Red Hat's entire liability, and Client's 
+exclusive remedies, shall be: If the Software media is defective, Client may return it within 30 days of 
+delivery along with a copy of Client's payment receipt and Red Hat, at its option, will replace it or 
+refund the money paid by Client for the Software.  To the maximum extent permitted by applicable law, 
+Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential 
+damages, including lost profits or lost savings arising out of the use or inability to use the Software, 
+even if Red Hat or such dealer has been advised of the possibility of such damages.  In no event shall 
+Red Hat's liability under this agreement exceed the amount that Client paid to Red Hat under this 
+Agreement during the twelve months preceding the action.
+
+5.  Export Control.  As required by U.S. law, Client represents and warrants that it: 
+(a) understands that the Software Packages are subject to export controls under the 
+U.S. Commerce Department's Export Administration Regulations ("EAR"); 
+
+(b) is not located in a prohibited destination country under the EAR or U.S. sanctions regulations 
+(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria); 
+
+(c) will not export, re-export, or transfer the Software Packages to any prohibited destination, entity, 
+or individual without the necessary export license(s) or authorizations(s) from the U.S. Government; 
+
+(d) will not use or transfer the Software Packages for use in any sensitive nuclear, chemical or 
+biological weapons, or missile technology end-uses unless authorized by the U.S. Government by 
+regulation or specific license; 
+
+(e) understands and agrees that if it is in the United States and exports or transfers the Software 
+Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit semi-annual 
+reports to the Commerce Department's Bureau of Industry & Security (BIS), which include the name and 
+address (including country) of each transferee; 
+
+and (f) understands that countries other than the United States may restrict the import, use, or 
+export of encryption products and that it shall be solely responsible for compliance with any such 
+import, use, or export restrictions.
+
+6.  Third Party Programs. Red Hat may distribute third party software programs with the Software Packages 
+that are not part of the Software Packages and which Client must install separately.  These third party 
+programs are subject to their own license terms.  The license terms either accompany the programs or 
+can be viewed at http://www.redhat.com/licenses/.  If Client does not agree to abide by the applicable 
+license terms for such programs, then Client may not install them.  If Client wishes to install the programs 
+on more than one system or transfer the programs to another party, then Client must contact the licensor 
+of the programs.
+
+7.  General.  If any provision of this agreement is held to be unenforceable, that shall not affect the 
+enforceability of the remaining provisions.  This License Agreement shall be governed by the laws of the 
+State of North Carolina and of the United States, without regard to any conflict of laws provisions, 
+except that the United Nations Convention on the International Sale of Goods shall not apply.
+
+Copyright 2006 Red Hat, Inc.  All rights reserved.  
+"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.  
+All other trademarks are the property of their respective owners. 
+
+	Page 1 of 1	18 October 2006
+


Property changes on: projects/jbws-jboss50/trunk/src/main/etc/JBossORG-EULA.txt
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml
===================================================================
--- projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,59 @@
+<?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$ -->
+
+<project name="JBossWS-Deploy">
+
+  <!-- ================================================================== -->
+  <!-- Deployment  JBoss50                                                -->
+  <!-- ================================================================== -->
+  
+  <!-- Deploy jbossws to jboss50 -->
+  <target name="deploy-jboss50" depends="jboss50-jars" description="Deploy jbossws">
+
+    <fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
+
+    <copy todir="${jboss50.home}/bin" overwrite="true">
+      <fileset dir="${thirdparty.dir}/jbossws-resources">
+        <include name="*.bat"/>
+        <include name="*.sh"/>
+      </fileset>
+    </copy>
+    <copy todir="${jboss50.home}/client" overwrite="true">
+      <fileset dir="${thirdparty.dir}">
+        <include name="jboss-jaxrpc.jar"/>
+        <include name="jboss-jaxws.jar"/>
+        <include name="jboss-saaj.jar"/>
+        <include name="jbossws-client.jar"/>
+        <include name="jaxb-api.jar"/>
+        <include name="jaxb-impl.jar"/>
+        <include name="jaxb-xjc.jar"/>
+        <include name="wsdl4j.jar"/>
+        <include name="jbossws-wsconsume-impl.jar"/>
+      </fileset>
+    </copy>
+    <copy todir="${jboss50.home}/server/${jboss.server.instance}/lib" overwrite="true">
+      <fileset dir="${thirdparty.dir}">
+        <include name="jboss-jaxrpc.jar"/>
+        <include name="jboss-jaxws.jar"/>
+        <include name="jboss-saaj.jar"/>
+      </fileset>
+    </copy>
+    <delete dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
+    <mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
+    <unzip dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer" src="${jboss50.output.lib.dir}/jbossws50-deployer.zip"/>
+    <delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+    <mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+    <unjar dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss50.output.lib.dir}/jbossws50.sar"/>
+  </target>
+    
+</project>


Property changes on: projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml
===================================================================
--- projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,39 @@
+<?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$ -->
+
+<project default="release" name="JBossWS Release">
+
+  <!-- Release to jboss.local.repository -->
+  <target name="release" depends="jboss50-jars" 
+    description="Release to jboss.local.repository">
+
+    <!-- jboss/jbossws-jboss50 -->
+    <property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
+    <mkdir dir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"/>
+    <copy todir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib" overwrite="true">
+      <fileset dir="${jboss50.output.lib.dir}">
+        <include name="jbossws-jboss50.jar"/>
+        <include name="jbossws50.sar"/>
+        <include name="jbossws50-deployer.zip"/>
+        <include name="jbossws50-src.zip"/>
+      </fileset>
+    </copy>
+    <copy tofile="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/component-info.xml" file="${jboss50.etc.dir}/component-info.xml" filtering="true" overwrite="true">
+      <filterset>
+        <filtersfile file="${basedir}/version.properties"/>
+      </filterset>
+    </copy>
+    
+  </target>
+
+</project>


Property changes on: projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-thirdparty.xml
===================================================================
--- projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-thirdparty.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-thirdparty.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,99 @@
+<?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$ -->
+
+<project default="thirdparty" name="JBossWS-Thirdparty">
+
+  <!-- ========= -->
+  <!-- Libraries -->
+  <!-- ========= -->
+
+  <target name="thirdparty" depends="thirdparty-get,thirdparty-classpath">
+  </target>
+  
+  <target name="thirdparty-get" if="force.thirdparty.get" 
+    description="Gets the thirdparty libraries">
+
+    <mkdir dir="${thirdparty.dir}"/>
+    <get src="${jboss.repository}/apache-xmlsec/${apache-xmlsec}/lib/xmlsec.jar" dest="${thirdparty.dir}/xmlsec.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j-src.jar" dest="${thirdparty.dir}/wsdl4j-src.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar" dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar" dest="${thirdparty.dir}/jboss-common-core-sources.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar" dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar" dest="${thirdparty.dir}/jboss-logging-spi.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jaxr/${jboss-jaxr}/lib/juddi-service.sar" dest="${thirdparty.dir}/juddi-service.sar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-client.jar" dest="${thirdparty.dir}/jbossws-client.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-core.jar" dest="${thirdparty.dir}/jbossws-core.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-resources.zip" dest="${thirdparty.dir}/jbossws-resources.zip" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-saaj.jar" dest="${thirdparty.dir}/jboss-saaj.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-jaxrpc.jar" dest="${thirdparty.dir}/jboss-jaxrpc.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-jaxws.jar" dest="${thirdparty.dir}/jboss-jaxws.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws-spi/${jboss-jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws-wsconsume-impl/${jbossws-wsconsume-impl}/lib/jbossws-wsconsume-impl.jar" dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar" 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"/>
+    <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar" dest="${thirdparty.dir}/jboss-xml-binding-sources.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar" dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency-src.zip" dest="${thirdparty.dir}/jboss-dependency-src.zip" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers.jar" dest="${thirdparty.dir}/jboss-deployers.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers-src.zip" dest="${thirdparty.dir}/jboss-deployers-src.zip" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar" dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip" dest="${thirdparty.dir}/jboss-microcontainer-src.zip" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/security-spi/${jboss-security-spi}/lib/jboss-security-spi.jar" dest="${thirdparty.dir}/jboss-security-spi.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-api.jar" dest="${thirdparty.dir}/jaxb-api.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-impl.jar" dest="${thirdparty.dir}/jaxb-impl.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-xjc.jar" dest="${thirdparty.dir}/jaxb-xjc.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar" dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/wscommons-policy/${wscommons-policy}/lib/policy.jar" dest="${thirdparty.dir}/policy.jar" usetimestamp="true" verbose="true"/>
+	  
+    <mkdir dir="${thirdparty.dir}/jbossws-resources"/>
+    <unzip dest="${thirdparty.dir}/jbossws-resources" src="${thirdparty.dir}/jbossws-resources.zip"/>
+  </target>
+  
+  <target name="thirdparty-classpath" >
+    
+    <!-- The compile classpath for jboss50 integration -->
+    <path id="jboss50.integration.classpath">
+      <pathelement location="${jboss50.lib}/jboss-aop-jdk50.jar"/>
+      <pathelement location="${jboss50.lib}/jboss-deployers.jar"/>
+      <pathelement location="${jboss50.lib}/jboss-j2se.jar"/>
+      <pathelement location="${jboss50.lib}/jboss-system.jar"/>
+      <pathelement location="${jboss50.lib}/jboss-system-jmx.jar"/>
+      <pathelement location="${jboss50.lib}/jboss-vfs.jar"/>
+      <pathelement location="${jboss50.server.lib}/jboss.jar"/>
+      <pathelement location="${jboss50.server.lib}/jboss-javaee.jar"/>
+      <pathelement location="${jboss50.server.lib}/jnpserver.jar"/>
+      <pathelement location="${jboss50.server.deployers}/jboss-aop-jboss5.deployer/jboss-aspect-library-jdk50.jar"/>
+      <pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+      <pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-ejb3.jar"/>
+      <pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-ejb3x.jar"/>
+      <pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
+      <pathelement location="${thirdparty.dir}/jaxb-impl.jar"/>
+      <pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-common-core.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-jaxrpc.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-jaxws.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-logging-spi.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-saaj.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-security-spi.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
+      <pathelement location="${thirdparty.dir}/jbossws-core.jar"/>
+      <pathelement location="${thirdparty.dir}/jbossws-spi.jar"/>
+      <pathelement location="${thirdparty.dir}/servlet-api.jar"/>
+    </path>
+    
+  </target>
+
+</project>


Property changes on: projects/jbws-jboss50/trunk/src/main/etc/ant-import/build-thirdparty.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/etc/component-info.xml
===================================================================
--- projects/jbws-jboss50/trunk/src/main/etc/component-info.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/etc/component-info.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,25 @@
+<project name="jboss/jbossws-jboss50">
+  
+  <component id="jboss/jbossws-jboss50"
+    description="JBossWS an implementation of J2EE Web Services" 
+    version="@repository.id@"
+    licenseType="lgpl">
+    
+    <artifact id="jbossws-jboss50.jar"/>
+    <artifact id="jbossws50.sar"/>
+    <artifact id="jbossws50-deployer.zip"/>
+    <artifact id="jbossws50-src.zip"/>
+    
+    <import componentref="jboss/jbossws">
+      <compatible version="@jboss-jbossws@"/>
+    </import>
+    <import componentref="jboss/jbossws-spi">
+      <compatible version="@jboss-jbossws-spi@"/>
+    </import>
+    
+    <export>
+    </export>
+    
+  </component>
+  
+</project>


Property changes on: projects/jbws-jboss50/trunk/src/main/etc/component-info.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/etc/default.mf
===================================================================
--- projects/jbws-jboss50/trunk/src/main/etc/default.mf	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/etc/default.mf	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+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=@build.id@)
+Implementation-Vendor: @implementation.vendor@
+Implementation-Vendor-Id: @implementation.vendor.id@

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss50;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.logging.Logger;
+
+//$Id$
+
+/**
+ * This deployer that calls the registered DeployerHooks
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Apr-2007
+ */
+public abstract class AbstractWebServiceDeployer extends AbstractSimpleDeployer
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(AbstractWebServiceDeployer.class);
+
+   private List<DeployerHook> deployerHooks = new LinkedList<DeployerHook>();
+
+   public void addDeployerHook(DeployerHook deployer)
+   {
+      log.debug("Add deployer hook: " + deployer);
+      deployerHooks.add(deployer);
+   }
+
+   public void removeDeployerHook(DeployerHook deployer)
+   {
+      log.debug("Remove deployer hook: " + deployer);
+      deployerHooks.remove(deployer);
+   }
+
+   @Override
+   public void deploy(DeploymentUnit unit) throws DeploymentException
+   {
+      for (DeployerHook deployer : deployerHooks)
+         deployer.deploy(unit);
+   }
+
+   @Override
+   public void undeploy(DeploymentUnit unit)
+   {
+      for (DeployerHook deployer : deployerHooks)
+         deployer.undeploy(unit);
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/DeployerHook.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/DeployerHook.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/DeployerHook.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss50;
+
+//$Id$
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+
+/**
+ * An interface for all web service deployer hooks 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Apr-2007
+ */
+public interface DeployerHook
+{
+   void deploy(DeploymentUnit unit) throws DeploymentException;
+
+   void undeploy(DeploymentUnit unit);
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/DeployerHook.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+/**
+ * This web service deployer for EJB
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Apr-2007
+ */
+public class WebServiceDeployerEJB extends AbstractWebServiceDeployer
+{
+   private int relOrderEJB2x;
+   private int relOrderEJB3;
+   
+   public void setRelOrderEJB2x(int relOrderEJB2x)
+   {
+      this.relOrderEJB2x = relOrderEJB2x;
+   }
+   
+   public void setRelOrderEJB3(int relOrderEJB3)
+   {
+      this.relOrderEJB3 = relOrderEJB3;
+   }
+   
+   @Override
+   public int getRelativeOrder()
+   {
+      return Math.max(relOrderEJB2x, relOrderEJB3) + 1;
+   }
+   
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerJSE.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerJSE.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerJSE.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+/**
+ * This web service deployer for JSE
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Apr-2007
+ */
+public class WebServiceDeployerJSE extends AbstractWebServiceDeployer
+{
+   private int relOrderWar;
+
+   public void setRelOrderWar(int relOrderWar)
+   {
+      this.relOrderWar = relOrderWar;
+   }
+
+   @Override
+   public int getRelativeOrder()
+   {
+      return relOrderWar - 1;
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceMainDeployer.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceMainDeployer.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceMainDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+/**
+ * The main web service deployer
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Apr-2007
+ */
+public class WebServiceMainDeployer extends AbstractWebServiceDeployer
+{
+   private int relOrderJSE;
+   private int relOrderEJB;
+   
+   public void setRelOrderEJB(int relOrderEJB)
+   {
+      this.relOrderEJB = relOrderEJB;
+   }
+   
+   public void setRelOrderJSE(int relOrderJSE)
+   {
+      this.relOrderJSE = relOrderJSE;
+   }
+   
+   @Override
+   public int getRelativeOrder()
+   {
+      return Math.max(relOrderEJB, relOrderJSE) + 1;
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceMainDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHook.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHook.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHook.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.deployment.DeployerManager;
+import org.jboss.ws.integration.jboss50.DeployerHook;
+
+/**
+ * An abstract web service deployer.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHook implements DeployerHook
+{
+   // provide logging
+   protected final Logger log = Logger.getLogger(getClass());
+
+   protected DeployerManager deployerManager;
+
+   public DeployerManager getDeployerManager()
+   {
+      return deployerManager;
+   }
+
+   public void setDeployerManager(DeployerManager deploymentManager)
+   {
+      this.deployerManager = deploymentManager;
+   }
+
+   /** Return true if this deployment should be ignored
+    */
+   public boolean ignoreDeployment(DeploymentUnit unit)
+   {
+      String name = unit.getName();
+      return (name.startsWith("jboss:id=") && name.indexOf("service=jacc") > 0);
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHook.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookEJB.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookEJB.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookEJB.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+/**
+ * An abstract deployer for EJB Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHookEJB extends ArchiveDeployerHook
+{
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookEJB.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookJSE.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookJSE.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookJSE.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.metadata.WebMetaData;
+
+//$Id$
+
+/**
+ * An abstract deployer for JSE Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHookJSE extends ArchiveDeployerHook
+{
+   public boolean isWebServiceDeployment(DeploymentUnit unit)
+   {
+      if (unit.getAttachment(WebMetaData.class) == null)
+         return false;
+
+      return true;
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/AbstractDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,163 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.metadata.EjbPortComponentMetaData;
+import org.jboss.metadata.MessageDrivenMetaData;
+import org.jboss.metadata.SessionMetaData;
+import org.jboss.metadata.ApplicationMetaData.WebserviceDescription;
+import org.jboss.metadata.ApplicationMetaData.Webservices;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedSessionMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class ApplicationMetaDataAdaptor
+{
+   // logging support
+   private static Logger log = Logger.getLogger(ApplicationMetaDataAdaptor.class);
+
+   public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit)
+   {
+      ApplicationMetaData appMetaData = unit.getAttachment(ApplicationMetaData.class);
+      udi.addAttachment(ApplicationMetaData.class, appMetaData);
+      
+      UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
+      buildUnifiedBeanMetaData(umd, appMetaData);
+      buildWebservicesMetaData(umd, appMetaData);
+      umd.setSecurityDomain(appMetaData.getSecurityDomain());
+      return umd;
+   }
+
+   private static void buildWebservicesMetaData(UnifiedApplicationMetaData umd, ApplicationMetaData apmd)
+   {
+      Webservices webservices = apmd.getWebservices();
+      if (webservices != null)
+      {
+         String contextRoot = webservices.getContextRoot();
+         umd.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
+
+         List<WebserviceDescription> wsDescriptions = webservices.getWebserviceDescriptions();
+         if (wsDescriptions.size() > 1)
+            log.warn("Multiple <webservice-description> elements not supported");
+
+         if (wsDescriptions.size() > 0)
+         {
+            WebserviceDescription wsd = wsDescriptions.get(0);
+            umd.setConfigName(wsd.getConfigName());
+            umd.setConfigFile(wsd.getConfigFile());
+         }
+
+         umd.setWebServiceContextRoot(contextRoot);
+      }
+   }
+
+   private static PublishLocationAdapter getPublishLocationAdpater(final Webservices webservices)
+   {
+      return new PublishLocationAdapter()
+      {
+         public String getWsdlPublishLocationByName(String name)
+         {
+            String wsdlPublishLocation = null;
+            for (WebserviceDescription wsd : webservices.getWebserviceDescriptions())
+            {
+               if (wsd.getDescriptionName().equals(name))
+               {
+                  wsdlPublishLocation = wsd.getWsdlPublishLocation();
+               }
+            }
+            return wsdlPublishLocation;
+         }
+      };
+   }
+
+   private static void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd, ApplicationMetaData appMetaData)
+   {
+      List<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
+      Iterator it = appMetaData.getEnterpriseBeans();
+      while (it.hasNext())
+      {
+         BeanMetaData bmd = (BeanMetaData)it.next();
+         buildUnifiedBeanMetaData(beans, bmd);
+      }
+      umd.setEnterpriseBeans(beans);
+   }
+
+   private static UnifiedBeanMetaData buildUnifiedBeanMetaData(List<UnifiedBeanMetaData> beans, BeanMetaData bmd)
+   {
+      UnifiedBeanMetaData ubmd = null;
+      if (bmd instanceof SessionMetaData)
+      {
+         ubmd = new UnifiedSessionMetaData();
+      }
+      else if (bmd instanceof MessageDrivenMetaData)
+      {
+         ubmd = new UnifiedMessageDrivenMetaData();
+         ((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
+      }
+
+      if (ubmd != null)
+      {
+         ubmd.setEjbName(bmd.getEjbName());
+         ubmd.setEjbClass(bmd.getEjbClass());
+         ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
+         ubmd.setHome(bmd.getHome());
+         ubmd.setLocalHome(bmd.getLocalHome());
+         ubmd.setJndiName(bmd.getJndiName());
+         ubmd.setLocalJndiName(bmd.getLocalJndiName());
+
+         EjbPortComponentMetaData pcmd = bmd.getPortComponent();
+         if (pcmd != null)
+         {
+            UnifiedEjbPortComponentMetaData upcmd = new UnifiedEjbPortComponentMetaData();
+            upcmd.setPortComponentName(pcmd.getPortComponentName());
+            upcmd.setPortComponentURI(pcmd.getPortComponentURI());
+            upcmd.setAuthMethod(pcmd.getAuthMethod());
+            upcmd.setTransportGuarantee(pcmd.getTransportGuarantee());
+            upcmd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
+            ubmd.setPortComponent(upcmd);
+         }
+
+         beans.add(ubmd);
+      }
+      return ubmd;
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,167 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ejb3.Container;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.SessionContainer;
+import org.jboss.ejb3.mdb.MessagingContainer;
+import org.jboss.ejb3.metamodel.Ejb3PortComponent;
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.EnterpriseBean;
+import org.jboss.ejb3.metamodel.WebserviceDescription;
+import org.jboss.ejb3.metamodel.Webservices;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedSessionMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Apr-2007
+ */
+public class ApplicationMetaDataAdaptorEJB3
+{
+   // logging support
+   private static Logger log = Logger.getLogger(ApplicationMetaDataAdaptorEJB3.class);
+
+   public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit)
+   {
+      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+      udi.addAttachment(Ejb3Deployment.class, ejb3Deployment);
+      
+      EjbJarDD jarDD = unit.getAttachment(EjbJarDD.class);
+      UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
+      buildUnifiedBeanMetaData(umd, ejb3Deployment);
+      buildWebservicesMetaData(umd, jarDD);
+      return umd;
+   }
+
+   private static void buildWebservicesMetaData(UnifiedApplicationMetaData umd, EjbJarDD jarDD)
+   {
+      // nothing to do
+      if (jarDD == null)
+         return;
+      
+      Webservices webservices = jarDD.getWebservices();
+      if (webservices != null)
+      {
+         String contextRoot = webservices.getContextRoot();
+         umd.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
+
+         List<WebserviceDescription> wsDescriptions = webservices.getWebserviceDescriptions();
+         if (wsDescriptions.size() > 1)
+            log.warn("Multiple <webservice-description> elements not supported");
+
+         if (wsDescriptions.size() > 0)
+         {
+            WebserviceDescription wsd = wsDescriptions.get(0);
+            umd.setConfigName(wsd.getConfigName());
+            umd.setConfigFile(wsd.getConfigFile());
+            
+            // com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1
+            // WSEjbWebServiceRefTest1VerifyTargetEndpointAddress
+            if (contextRoot == null)
+               contextRoot = "/" + wsd.getDescriptionName();
+         }
+         
+         umd.setWebServiceContextRoot(contextRoot);
+      }
+   }
+
+   private static void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd, Ejb3Deployment ejb3Deployment)
+   {
+      List<UnifiedBeanMetaData> ubmdList = new ArrayList<UnifiedBeanMetaData>();
+      Iterator<Container> it = ejb3Deployment.getEjbContainers().values().iterator();
+      while (it.hasNext())
+      {
+         EJBContainer container = (EJBContainer)it.next();
+         UnifiedBeanMetaData ubmd = null;
+         if (container instanceof SessionContainer)
+         {
+            ubmd = new UnifiedSessionMetaData();
+         }
+         else if (container instanceof MessagingContainer)
+         {
+            ubmd = new UnifiedMessageDrivenMetaData();
+            log.warn("No implemented: initialize MDB destination");
+            //((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessagingContainer)container).getDestination());
+         }
+
+         if (ubmd != null)
+         {
+            ubmd.setEjbName(container.getEjbName());
+            ubmd.setEjbClass(container.getBeanClassName());
+
+            EnterpriseBean bean = container.getXml();
+            Ejb3PortComponent pcMetaData = (bean != null ? bean.getPortComponent() : null);
+            if (pcMetaData != null)
+            {
+               UnifiedEjbPortComponentMetaData ejbPortComp = new UnifiedEjbPortComponentMetaData();
+               ejbPortComp.setPortComponentName(pcMetaData.getPortComponentName());
+               ejbPortComp.setPortComponentURI(pcMetaData.getPortComponentURI());
+               ejbPortComp.setAuthMethod(pcMetaData.getAuthMethod());
+               ejbPortComp.setTransportGuarantee(pcMetaData.getTransportGuarantee());
+               ejbPortComp.setSecureWSDLAccess(pcMetaData.getSecureWSDLAccess());
+
+               ubmd.setPortComponent(ejbPortComp);
+            }
+
+            ubmdList.add(ubmd);
+         }
+      }
+      umd.setEnterpriseBeans(ubmdList);
+   }
+
+   private static PublishLocationAdapter getPublishLocationAdpater(final Webservices webservices)
+   {
+      return new PublishLocationAdapter()
+      {
+         public String getWsdlPublishLocationByName(String name)
+         {
+            String wsdlPublishLocation = null;
+            for (WebserviceDescription wsd : webservices.getWebserviceDescriptions())
+            {
+               if (wsd.getDescriptionName().equals(name))
+               {
+                  wsdlPublishLocation = wsd.getWsdlPublishLocation();
+               }
+            }
+            return wsdlPublishLocation;
+         }
+      };
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ArchiveDeployerHook.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ArchiveDeployerHook.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ArchiveDeployerHook.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.WebservicesFactory;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+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 at 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(DeploymentUnit unit);
+
+   /** Create the Deployment for a given DeploymentUnit
+    */
+   public abstract Deployment createDeployment(DeploymentUnit unit);
+
+   /** Get the Deployment for a given DeploymentUnit
+    */
+   public Deployment getDeployment(DeploymentUnit unit)
+   {
+      Deployment dep = unit.getAttachment(Deployment.class);
+      return (dep != null && dep.getType() == getDeploymentType() ? dep : null);
+   }
+
+   public void deploy(DeploymentUnit unit) throws DeploymentException
+   {
+      if (ignoreDeployment(unit))
+         return;
+
+      if (isWebServiceDeployment(unit))
+      {
+         log.debug("deploy: " + unit.getName());
+         Deployment dep = getDeployment(unit);
+         if (dep == null)
+         {
+            dep = createDeployment(unit);
+            dep.getContext().addAttachment(DeploymentUnit.class, unit);
+         }
+
+         deployerManager.deploy(dep);
+         unit.addAttachment(Deployment.class, dep);
+      }
+   }
+
+   public void undeploy(DeploymentUnit unit)
+   {
+      if (ignoreDeployment(unit))
+         return;
+
+      Deployment dep = getDeployment(unit);
+      if (dep != null)
+      {
+         log.debug("undeploy: " + unit.getName());
+         deployerManager.undeploy(dep);
+         unit.removeAttachment(Deployment.class);
+      }
+   }
+
+   /** Unmrashall the webservices.xml if there is one
+    */
+   protected WebservicesMetaData getWebservicesMetaData(DeploymentUnit unit)
+   {
+      WebservicesMetaData wsMetaData = unit.getAttachment(WebservicesMetaData.class);
+      UnifiedVirtualFile vfWebservices = getWebservicesFile(unit);
+      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.addAttachment(WebservicesMetaData.class, wsMetaData);
+            }
+         }
+         catch (Exception ex)
+         {
+            throw new WSDeploymentException(ex);
+         }
+      }
+      return wsMetaData;
+   }
+
+   private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit)
+   {
+      VirtualFile vf = unit.getMetaDataFile("webservices.xml");
+      return (vf != null ? new VirtualFileAdaptor(vf) : null);
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ArchiveDeployerHook.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that injects the correct classloader into the UMDM 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class ClassLoaderInjectionDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      DeploymentUnit unit = dep.getContext().getAttachment(DeploymentUnit.class);
+      if (unit == null)
+         throw new IllegalStateException("Cannot obtain deployement unit");
+
+      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+      if (umd == null)
+         throw new IllegalStateException("Cannot obtain unified meta data");
+
+      ClassLoader classLoader = unit.getClassLoader();
+      
+      // Get the webapp context classloader and use it as the deploymet class loader
+      WebMetaData webMetaData = unit.getAttachment(WebMetaData.class);
+      if (webMetaData != null)
+      {
+         classLoader = webMetaData.getContextLoader();
+      }
+      
+      umd.setClassLoader(classLoader);
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+
+// $Id$
+
+/**
+ * Build container independent deployment info.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class DeploymentInfoAdapter
+{
+   // logging support
+   private static Logger log = Logger.getLogger(DeploymentInfoAdapter.class);
+
+   public static void buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentUnit unit)
+   {
+      udi.addAttachment(DeploymentUnit.class, unit);
+      
+      try
+      {
+         if (unit.getDeploymentContext().getParent() != null)
+         {
+            udi.parent = new UnifiedDeploymentInfo(null);
+            buildDeploymentInfo(udi.parent, unit.getDeploymentContext().getParent().getDeploymentUnit());
+         }
+
+         udi.vfRoot = new VirtualFileAdaptor(unit.getDeploymentContext().getRoot());
+
+         udi.name = unit.getName();
+         udi.simpleName = unit.getSimpleName();
+         udi.url = udi.vfRoot.toURL();
+
+         buildMetaData(udi, unit);
+
+         // Since we create temporary classes, we need to create a delegate loader
+         // This prevents CCE problems where the parent loader is available at deploy time,
+         // and a child loader is available at start time.
+         udi.classLoader = new URLClassLoader(new URL[] {}, unit.getClassLoader());
+
+         log.debug("UnifiedDeploymentInfo:\n" + udi);
+      }
+      catch (Exception ex)
+      {
+         WSException.rethrow(ex.getMessage(), ex);
+      }
+   }
+
+   private static void buildMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+   {
+      if (unit.getAttachment(Ejb3Deployment.class) != null)
+      {
+         udi.metaData = ApplicationMetaDataAdaptorEJB3.buildUnifiedApplicationMetaData(udi, unit);
+      }
+      else if (unit.getAttachment(ApplicationMetaData.class) != null)
+      {
+         udi.metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(udi, unit);
+      }
+      else if (unit.getAttachment(WebMetaData.class) != null)
+      {
+         udi.metaData = WebMetaDataAdaptor.buildUnifiedWebMetaData(udi, unit);
+         udi.webappURL = udi.vfRoot.toURL();
+      }
+      else
+      {
+         throw new IllegalStateException("Cannot build meta data");
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,267 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.ejb.EjbModule;
+import org.jboss.ejb.Interceptor;
+import org.jboss.ejb.StatelessSessionContainer;
+import org.jboss.invocation.Invocation;
+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.security.SecurityAssociation;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.server.AbstractInvocationHandler;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * Handles invocations on EJB21 endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB21 extends AbstractInvocationHandler
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(InvocationHandlerEJB21.class);
+
+   private String jndiName;
+   private MBeanServer server;
+   private ObjectName objectName;
+
+   /** Initialize the service endpoint */
+   @Override
+   public void init(Endpoint endpoint)
+   {
+      super.init(endpoint);
+
+      server = MBeanServerLocator.locateJBoss();
+
+      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      String ejbName = sepMetaData.getLinkName();
+      if (ejbName == null)
+         throw new WSException("Cannot obtain ejb-link from port component");
+
+      UnifiedDeploymentInfo udi = endpoint.getService().getDeployment().getContext().getAttachment(UnifiedDeploymentInfo.class);
+      UnifiedApplicationMetaData applMetaData = (UnifiedApplicationMetaData)udi.metaData;
+      UnifiedBeanMetaData beanMetaData = (UnifiedBeanMetaData)applMetaData.getBeanByEjbName(ejbName);
+      if (beanMetaData == null)
+         throw new WSException("Cannot obtain ejb meta data for: " + ejbName);
+
+      // verify the service endpoint
+      String seiName = sepMetaData.getServiceEndpointInterfaceName();
+      if (sepMetaData.getType() == Type.JAXRPC && seiName != null)
+      {
+         String bmdSEI = beanMetaData.getServiceEndpointInterface();
+         if (seiName.equals(bmdSEI) == false)
+            throw new WSException("Endpoint meta data defines SEI '" + seiName + "', <service-endpoint> in ejb-jar.xml defines '" + bmdSEI + "'");
+      }
+
+      // get the bean's JNDI name
+      jndiName = beanMetaData.getContainerObjectNameJndiName();
+      if (jndiName == null)
+         throw new WSException("Cannot obtain JNDI name for: " + ejbName);
+
+      objectName = ObjectNameFactory.create("jboss.j2ee:jndiName=" + jndiName + ",service=EJB");
+
+      // 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);
+      }
+   }
+
+   /** Load the SEI implementation bean if necessary 
+    */
+   public Class loadServiceEndpoint()
+   {
+      if (server.isRegistered(objectName) == false)
+         throw new WSException("Cannot find service endpoint target: " + objectName);
+
+      return null;
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   @Override
+   protected Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception
+   {
+      return null;
+   }
+
+   /** Invoke an instance of the SEI implementation bean */
+   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
+   {
+      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+
+      // these are provided by the ServerLoginHandler
+      Principal principal = SecurityAssociation.getPrincipal();
+      Object credential = SecurityAssociation.getCredential();
+
+      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+
+      // invoke on the container
+      try
+      {
+         // setup the invocation
+         Method method = epInv.getJavaMethod();
+         Object[] args = epInv.getRequestPayload();
+         Invocation inv = new Invocation(null, method, args, null, principal, credential);
+
+         // EJB2.1 endpoints will only get an JAXRPC context 
+         if ((msgContext instanceof javax.xml.rpc.handler.MessageContext) == false)
+            msgContext = new SOAPMessageContextJAXRPC(msgContext);
+
+         inv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+         inv.setValue(InvocationKey.SOAP_MESSAGE, msgContext.getSOAPMessage());
+         inv.setType(InvocationType.SERVICE_ENDPOINT);
+
+         // Set the handler callback and endpoint invocation
+         ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+         inv.setValue(HandlerCallback.class.getName(), new HandlerCallbackImpl(sepMetaData), PayloadKey.TRANSIENT);
+         inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
+
+         String[] sig = { Invocation.class.getName() };
+         Object retObj = server.invoke(objectName, "invoke", new Object[] { inv }, sig);
+         epInv.setReturnValue(retObj);
+      }
+      catch (Exception e)
+      {
+         handleInvocationException(e);
+      }
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   public void destroyServiceEndpointInstance(Object seiImpl)
+   {
+      // do nothing
+   }
+
+   /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+   @Override
+   public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+   {
+      if (type == HandlerType.PRE)
+         return delegate.callRequestHandlerChain(sepMetaData, type);
+      else return true;
+   }
+
+   /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+   public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+   {
+      if (type == HandlerType.PRE)
+         return delegate.callResponseHandlerChain(sepMetaData, type);
+      else return true;
+   }
+
+   /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+   public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
+   {
+      if (type == HandlerType.PRE)
+         return delegate.callFaultHandlerChain(sepMetaData, type, ex);
+      else return true;
+   }
+
+   // The ServiceEndpointInterceptor calls the methods in this callback
+   public class HandlerCallbackImpl implements HandlerCallback
+   {
+      private ServerEndpointMetaData sepMetaData;
+
+      public HandlerCallbackImpl(ServerEndpointMetaData sepMetaData)
+      {
+         this.sepMetaData = sepMetaData;
+      }
+
+      /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+      public boolean callRequestHandlerChain(HandlerType type)
+      {
+         if (type == HandlerType.PRE)
+            return true;
+         else return delegate.callRequestHandlerChain(sepMetaData, type);
+      }
+
+      /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+      public boolean callResponseHandlerChain(HandlerType type)
+      {
+         if (type == HandlerType.PRE)
+            return true;
+         else return delegate.callResponseHandlerChain(sepMetaData, type);
+      }
+
+      /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+      public boolean callFaultHandlerChain(HandlerType type, Exception ex)
+      {
+         if (type == HandlerType.PRE)
+            return true;
+         else return delegate.callFaultHandlerChain(sepMetaData, type, ex);
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,192 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import javax.ejb.EJBContext;
+import javax.management.ObjectName;
+
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.MethodInfo;
+import org.jboss.ejb3.BeanContext;
+import org.jboss.ejb3.BeanContextLifecycleCallback;
+import org.jboss.ejb3.EJBContainerInvocation;
+import org.jboss.ejb3.stateless.StatelessBeanContext;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.injection.lang.reflect.BeanProperty;
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.jaxws.WebServiceContextEJB;
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.server.AbstractInvocationHandler;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * Handles invocations on EJB3 endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB3 extends AbstractInvocationHandler
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(InvocationHandlerEJB3.class);
+   
+   private ObjectName objectName;
+
+   /** Initialize the service endpoint */
+   @Override
+   public void init(Endpoint endpoint)
+   {
+      super.init(endpoint);
+      
+      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      String ejbName = sepMetaData.getLinkName();
+      if (ejbName == null)
+         throw new WSException("Cannot obtain ejb-link from port component");
+
+      UnifiedDeploymentInfo udi = endpoint.getService().getDeployment().getContext().getAttachment(UnifiedDeploymentInfo.class);
+      String nameStr = "jboss.j2ee:name=" + ejbName + ",service=EJB3,jar=" + udi.simpleName;
+      if (udi.parent != null)
+      {
+         nameStr += ",ear=" + udi.parent.simpleName;
+      }
+
+      objectName = ObjectNameFactory.create(nameStr.toString());
+   }
+
+   /** Load the SEI implementation bean if necessary 
+    */
+   public Class loadServiceEndpoint()
+   {
+      Dispatcher dispatcher = Dispatcher.singleton;
+      if (dispatcher.getRegistered(objectName.getCanonicalName()) == null)
+         throw new WSException("Cannot find service endpoint target: " + objectName);
+
+      return null;
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   @Override
+   protected Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception
+   {
+      return null;
+   }
+
+   /** Invoke an instance of the SEI implementation bean */
+   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
+   {
+      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+
+      // invoke on the container
+      try
+      {
+         // setup the invocation
+         Method seiMethod = epInv.getJavaMethod();
+         Object[] args = epInv.getRequestPayload();
+
+         Dispatcher dispatcher = Dispatcher.singleton;
+         StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
+         Class beanClass = container.getBeanClass();
+
+         Method implMethod = getImplMethod(beanClass, seiMethod);
+         MethodInfo info = container.getMethodInfo(implMethod);
+         
+         EJBContainerInvocation<StatelessContainer, StatelessBeanContext> ejb3Inv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
+         ejb3Inv.setAdvisor(container);
+         ejb3Inv.setArguments(args);
+         ejb3Inv.setContextCallback(new ContextCallback());
+         
+         Object retObj = ejb3Inv.invokeNext();
+
+         epInv.setReturnValue(retObj);
+      }
+      catch (Throwable th)
+      {
+         handleInvocationException(th);
+      }
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   public void destroyServiceEndpointInstance(Object seiImpl)
+   {
+      // do nothing
+   }
+
+   class ContextCallback implements BeanContextLifecycleCallback
+   {
+      private SOAPMessageContextJAXWS jaxwsMessageContext;
+      private SOAPMessageContextJAXRPC jaxrpcMessageContext;
+
+      public ContextCallback()
+      {
+         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+         if (msgContext instanceof SOAPMessageContextJAXRPC)
+         {
+            jaxrpcMessageContext = (SOAPMessageContextJAXRPC)msgContext;
+            jaxwsMessageContext = new SOAPMessageContextJAXWS(msgContext);
+         }
+         else if (msgContext instanceof SOAPMessageContextJAXWS)
+         {
+            jaxwsMessageContext = (SOAPMessageContextJAXWS)msgContext;
+            jaxrpcMessageContext = new SOAPMessageContextJAXRPC(msgContext);
+         }
+      }
+
+      public void attached(BeanContext beanCtx)
+      {
+         StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
+         sbc.setMessageContextJAXRPC(jaxrpcMessageContext);
+         
+         BeanProperty beanProp = sbc.getWebServiceContextProperty();
+         if (beanProp != null)
+         {
+            EJBContext ejbCtx = beanCtx.getEJBContext(); 
+            beanProp.set(beanCtx.getInstance(), new WebServiceContextEJB(jaxwsMessageContext, ejbCtx));
+         }
+      }
+
+      public void released(BeanContext beanCtx)
+      {
+         StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
+         sbc.setMessageContextJAXRPC(null);
+         
+         BeanProperty beanProp = sbc.getWebServiceContextProperty();
+         if (beanProp != null)
+            beanProp.set(beanCtx.getInstance(), null);
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC EJB21 Endpoints
+ *
+ * @author Thomas.Diesler at 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(DeploymentUnit unit)
+   {
+      Deployment dep = new DeploymentImpl();
+      dep.setType(getDeploymentType());
+      dep.setClassLoader(unit.getClassLoader());
+
+      Service service = dep.getService();
+
+      ApplicationMetaData appmd = unit.getAttachment(ApplicationMetaData.class);
+      if (appmd == null)
+         throw new IllegalStateException("Deployment unit does not contain application meta data");
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+      if (wsMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+      // Copy the attachments
+      dep.getContext().addAttachment(WebservicesMetaData.class, wsMetaData);
+      dep.getContext().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();
+            try
+            {
+               ClassLoader loader = unit.getClassLoader();
+               Class<?> epBean = loader.loadClass(ejbClass.trim());
+               
+               // Create the endpoint
+               Endpoint endpoint = new EndpointImpl(service, epBean);
+               String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbLink;
+               endpoint.setName(ObjectNameFactory.create(nameStr));
+
+               service.addEndpoint(endpoint);
+            }
+            catch (ClassNotFoundException ex)
+            {
+               log.warn("Cannot load servlet class: " + ejbClass);
+            }
+         }
+      }
+      return dep;
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentUnit unit)
+   {
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+      return wsMetaData != null && unit.getAllMetaData(ApplicationMetaData.class).size() > 0;
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.Servlet;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC JSE Endpoints
+ *
+ * @author Thomas.Diesler at 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(DeploymentUnit unit)
+   {
+      Deployment dep = new DeploymentImpl();
+      dep.setType(getDeploymentType());
+      dep.setClassLoader(unit.getClassLoader());
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = unit.getAttachment(WebMetaData.class);
+      if (webMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+      if (wsMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+      // Copy the attachments
+      dep.getContext().addAttachment(WebservicesMetaData.class, wsMetaData);
+      dep.getContext().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 = unit.getClassLoader();
+               Class<?> epBean = loader.loadClass(servletClass.trim());
+
+               // Create the endpoint
+               Endpoint endpoint = new EndpointImpl(service, epBean);
+               String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletLink;
+               endpoint.setName(ObjectNameFactory.create(nameStr));
+
+               service.addEndpoint(endpoint);
+            }
+            catch (ClassNotFoundException ex)
+            {
+               log.warn("Cannot load servlet class: " + servletClass);
+            }
+         }
+      }
+
+      return dep;
+   }
+
+   private Servlet getServletForName(WebMetaData wmd, String servletLink)
+   {
+      for (Servlet servlet : wmd.getServlets())
+      {
+         if (servletLink.equals(servlet.getName()))
+         {
+            return servlet;
+         }
+      }
+      throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentUnit unit)
+   {
+      if (super.isWebServiceDeployment(unit) == false)
+         return false;
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+      return wsMetaData != null;
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import java.util.Iterator;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * A deployer JAXWS EJB3 Endpoints
+ *
+ * @author Thomas.Diesler at 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(DeploymentUnit unit)
+   {
+      Deployment dep = new DeploymentImpl();
+      dep.setType(getDeploymentType());
+      dep.setClassLoader(unit.getClassLoader());
+
+      Service service = dep.getService();
+
+      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+      if (ejb3Deployment == null)
+         throw new IllegalStateException("Deployment unit does not contain ejb3 deployment");
+
+      // Copy the attachments
+      dep.getContext().addAttachment(Ejb3Deployment.class, ejb3Deployment);
+
+      Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+      while (it.hasNext())
+      {
+         EJBContainer container = (EJBContainer)it.next();
+         if (isWebServiceBean(container))
+         {
+            String ejbName = container.getEjbName();
+            Class epBean = container.getBeanClass();
+
+            // Create the endpoint
+            Endpoint endpoint = new EndpointImpl(service, epBean);
+            String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbName;
+            endpoint.setName(ObjectNameFactory.create(nameStr));
+
+            service.addEndpoint(endpoint);
+         }
+      }
+
+      return dep;
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentUnit unit)
+   {
+      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+      if (ejb3Deployment == null)
+         return false;
+
+      boolean isWebServiceDeployment = false;
+
+      Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+      while (it.hasNext())
+      {
+         EJBContainer container = (EJBContainer)it.next();
+         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


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.Servlet;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * A deployer JAXWS JSE Endpoints
+ *
+ * @author Thomas.Diesler at 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(DeploymentUnit unit)
+   {
+      Deployment dep = new DeploymentImpl();
+      dep.setType(getDeploymentType());
+      dep.setClassLoader(unit.getClassLoader());
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = unit.getAttachment(WebMetaData.class);
+      if (webMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+      // Copy the attachments
+      dep.getContext().addAttachment(WebMetaData.class, webMetaData);
+
+      List<Servlet> servlets = getRelevantServlets(webMetaData, unit.getClassLoader());
+      for (Servlet servlet : servlets)
+      {
+         String servletName = servlet.getName();
+         String servletClass = servlet.getServletClass();
+
+         try
+         {
+            ClassLoader loader = unit.getClassLoader();
+            Class<?> epBean = loader.loadClass(servletClass.trim());
+
+            // Create the endpoint
+            Endpoint endpoint = new EndpointImpl(service, epBean);
+            String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName;
+            endpoint.setName(ObjectNameFactory.create(nameStr));
+
+            service.addEndpoint(endpoint);
+         }
+         catch (ClassNotFoundException ex)
+         {
+            log.warn("Cannot load servlet class: " + servletClass);
+            continue;
+         }
+      }
+
+      return dep;
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentUnit unit)
+   {
+      if (super.isWebServiceDeployment(unit) == false)
+         return false;
+
+      boolean isWebServiceDeployment = false;
+      try
+      {
+         WebMetaData webMetaData = unit.getAttachment(WebMetaData.class);
+         List<Servlet> servlets = getRelevantServlets(webMetaData, unit.getClassLoader());
+         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>();
+      for (Servlet servlet : webMetaData.getServlets())
+      {
+         String servletClassName = servlet.getServletClass();
+
+         // 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(servlet);
+         }
+         catch (ClassNotFoundException ex)
+         {
+            log.warn("Cannot load servlet class: " + servletClassName);
+            continue;
+         }
+      }
+      return servlets;
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/MainDeployerHook.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/MainDeployerHook.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/MainDeployerHook.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A basic hook that delegates a deployment manger.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class MainDeployerHook extends AbstractDeployerHook
+{
+   public void deploy(DeploymentUnit unit) throws DeploymentException
+   {
+      if (ignoreDeployment(unit))
+         return;
+      
+      Deployment dep = unit.getAttachment(Deployment.class);
+      if (dep != null)
+      {
+         deployerManager.deploy(dep);
+      }
+   }
+
+   public void undeploy(DeploymentUnit unit)
+   {
+      if (ignoreDeployment(unit))
+         return;
+      
+      Deployment dep = unit.getAttachment(Deployment.class);
+      if (dep != null)
+      {
+         deployerManager.undeploy(dep);
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/MainDeployerHook.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import java.util.Iterator;
+
+import org.jboss.metadata.NameValuePair;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.Servlet;
+import org.jboss.ws.core.deployment.ServiceEndpointPublisher;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A deployer that modifies the web.xml meta data 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class ModifyWebMetaDataDeployer extends AbstractDeployer
+{
+   private ServiceEndpointPublisher serviceEndpointPublisher;
+
+   public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+   {
+      this.serviceEndpointPublisher = serviceEndpointPublisher;
+   }
+
+   @Override
+   public void create(Deployment dep)
+   {
+      WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+      if (webMetaData != null)
+      {
+         for (Servlet servlet : webMetaData.getServlets())
+         {
+            String orgServletClass = servlet.getServletClass();
+
+            // JSP
+            if (orgServletClass == null || orgServletClass.length() == 0)
+            {
+               log.debug("Innore servlet class: " + orgServletClass);
+               continue;
+            }
+
+            // Nothing to do if we have an <init-param>
+            if (!isAlreadyModified(servlet) && !isJavaxServlet(orgServletClass, dep.getClassLoader()))
+            {
+               servlet.setServletClass(serviceEndpointPublisher.getServletClass());
+               NameValuePair initParam = new NameValuePair(Endpoint.SEPID_DOMAIN_ENDPOINT, orgServletClass);
+               servlet.addInitParam(initParam);
+            }
+         }
+      }
+   }
+
+   private boolean isJavaxServlet(String orgServletClass, ClassLoader loader)
+   {
+      boolean isServlet = false;
+      if (loader != null)
+      {
+         try
+         {
+            Class servletClass = loader.loadClass(orgServletClass);
+            isServlet = JavaUtils.isAssignableFrom(javax.servlet.Servlet.class, servletClass);
+            if (isServlet == true)
+            {
+               log.info("Ignore servlet: " + orgServletClass);
+            }
+         }
+         catch (ClassNotFoundException e)
+         {
+            log.warn("Cannot load servlet class: " + orgServletClass);
+         }
+      }
+      return isServlet;
+   }
+
+   private boolean isAlreadyModified(Servlet servlet)
+   {
+      Iterator itParams = servlet.getInitParams().iterator();
+      while (itParams.hasNext())
+      {
+         NameValuePair pair = (NameValuePair)itParams.next();
+         if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(pair.getName()))
+            return true;
+      }
+      return false;
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/SecurityAssociationAdaptorFactoryImpl.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/SecurityAssociationAdaptorFactoryImpl.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/SecurityAssociationAdaptorFactoryImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+// $Id$
+
+import java.security.Principal;
+
+import org.jboss.security.SecurityAssociation;
+import org.jboss.ws.extensions.security.SecurityAssociationAdaptor;
+import org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory;
+
+/**
+ * A JBoss specific SecurityAdaptorFactory 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class SecurityAssociationAdaptorFactoryImpl implements SecurityAssociationAdaptorFactory
+{
+   public SecurityAssociationAdaptor getSecurityAssociationAdaptor()
+   {
+      return new SecurityAccociationAdaptorImpl();
+   }
+
+   public class SecurityAccociationAdaptorImpl implements SecurityAssociationAdaptor
+   {
+      public void setPrincipal(Principal pricipal)
+      {
+         SecurityAssociation.setPrincipal(pricipal);
+      }
+
+      public void setCredential(Object credential)
+      {
+         SecurityAssociation.setCredential(credential);
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/SecurityAssociationAdaptorFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.AssemblyDescriptorMetaData;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.ServiceEndpointGeneratorEJB;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointGeneratorEJB21 extends ServiceEndpointGeneratorEJB
+{
+   // logging support
+   protected Logger log = Logger.getLogger(ServiceEndpointGeneratorEJB21.class);
+
+   /** Add the roles from ejb-jar.xml to the security roles
+    */
+   protected void addEJBSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
+   {
+      // Fix: http://jira.jboss.org/jira/browse/JBWS-309
+      ApplicationMetaData applMetaData = (ApplicationMetaData)udi.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())
+            {
+               Element securityRole = (Element)webApp.appendChild(DOMUtils.createElement("security-role"));
+               Element roleName = (Element)securityRole.appendChild(DOMUtils.createElement("role-name"));
+               roleName.appendChild(DOMUtils.createTextNode((String)it.next()));
+            }
+         }
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import java.util.Iterator;
+
+import javax.annotation.security.RolesAllowed;
+
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.ServiceEndpointGeneratorEJB;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointGeneratorEJB3 extends ServiceEndpointGeneratorEJB
+{
+   // logging support
+   protected Logger log = Logger.getLogger(ServiceEndpointGeneratorEJB3.class);
+
+   /** Add the roles from ejb-jar.xml to the security roles
+    */
+   protected void addEJBSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
+   {
+      Ejb3Deployment ejb3Deployment = udi.getAttachment(Ejb3Deployment.class);
+      if (ejb3Deployment != null)
+      {
+         Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+         while (it.hasNext())
+         {
+            EJBContainer container = (EJBContainer)it.next();
+            RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
+            if (anRolesAllowed != null)
+            {
+               for (String role : anRolesAllowed.value())
+               {
+                  Element securityRole = (Element)webApp.appendChild(DOMUtils.createElement("security-role"));
+                  Element roleName = (Element)securityRole.appendChild(DOMUtils.createElement("role-name"));
+                  roleName.appendChild(DOMUtils.createTextNode(role));
+               }
+            }
+         }
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointInterceptor.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointInterceptor.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointInterceptor.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,145 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+// $Id$
+
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ejb.plugins.AbstractInterceptor;
+import org.jboss.invocation.Invocation;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.CommonBinding;
+import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.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 at 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 Invocation mi) throws Exception
+   {
+      // If no msgContext, it's not for us
+      CommonMessageContext msgContext = (CommonMessageContext)mi.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+      if (msgContext == null)
+      {
+         return getNext().invoke(mi);
+      }
+
+      // Get the endpoint invocation 
+      EndpointInvocation epInv = (EndpointInvocation)mi.getValue(EndpointInvocation.class.getName());
+      OperationMetaData opMetaData = epInv.getOperationMetaData();
+
+      // Get the handler callback 
+      HandlerCallback callback = (HandlerCallback)mi.getValue(HandlerCallback.class.getName());
+
+      // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
+      if (callback != null && epInv != null)
+      {
+         try
+         {
+            // call the request handlers
+            boolean handlersPass = callback.callRequestHandlerChain(HandlerType.ENDPOINT);
+            handlersPass = handlersPass && callback.callRequestHandlerChain(HandlerType.POST);
+
+            // Call the next interceptor in the chain
+            if (handlersPass)
+            {
+               CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
+               CommonBinding binding = bindingProvider.getCommonBinding();
+
+               // Verify that the the message has not been mofified
+               CommonMessageContext messageContext = MessageContextAssociation.peekMessageContext();
+               if (messageContext.isModified())
+               {
+                  log.debug("Handler modified payload, unbind message and update invocation args");
+                  epInv = bindingProvider.getCommonBinding().unbindRequestMessage(opMetaData, messageContext.getMessageAbstraction());
+               }
+
+               // 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 = epInv.getRequestPayload();
+               mi.setArguments(reqParams);
+               Object resObj = getNext().invoke(mi);
+               epInv.setReturnValue(resObj);
+
+               // Bind the response message
+               SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
+               msgContext.setSOAPMessage(resMessage);
+            }
+
+            // call the response handlers
+            handlersPass = callback.callResponseHandlerChain(HandlerType.POST);
+            handlersPass = handlersPass && callback.callResponseHandlerChain(HandlerType.ENDPOINT);
+
+            // update the return value after response handler processing
+            Object resObj = epInv.getReturnValue();
+
+            return resObj;
+         }
+         catch (Exception ex)
+         {
+            try
+            {
+               SOAPMessage faultMessage = SOAPFaultHelperJAXRPC.exceptionToFaultMessage(ex);
+               msgContext.setSOAPMessage(faultMessage);
+
+               // call the fault handlers
+               boolean handlersPass = callback.callFaultHandlerChain(HandlerType.POST, ex);
+               handlersPass = handlersPass && callback.callFaultHandlerChain(HandlerType.ENDPOINT, ex);
+            }
+            catch (Exception subEx)
+            {
+               log.warn("Cannot process handlerChain.handleFault, ignoring: ", subEx);
+            }
+            throw ex;
+         }
+      }
+      else
+      {
+         log.warn("Handler callback not available");
+         return getNext().invoke(mi);
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointInterceptor.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ws.core.deployment.JAXRPCDeployment;
+import org.jboss.ws.core.deployment.JAXWSDeployment;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer that builds the UnifiedDeploymentInfo 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class UnifiedDeploymentInfoDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+      {
+         DeploymentUnit unit = dep.getContext().getAttachment(DeploymentUnit.class);
+         if (unit == null)
+            throw new IllegalStateException("Cannot obtain deployment unit");
+
+         DeploymentType type = dep.getType();
+         if (type.toString().startsWith("JAXWS"))
+         {
+            udi = new JAXWSDeployment(type);
+            DeploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+         }
+         else
+         {
+            WebservicesMetaData wsMetaData = dep.getContext().getAttachment(WebservicesMetaData.class);
+            udi = new JAXRPCDeployment(type, wsMetaData);
+            DeploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+         }
+
+         dep.getContext().addAttachment(UnifiedDeploymentInfo.class, udi);
+      }
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/VirtualFileAdaptor.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/VirtualFileAdaptor.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/VirtualFileAdaptor.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.integration.UnifiedVirtualFile;
+
+// $Id$
+
+/**
+ * A JBoss50 VirtualFile adaptor
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class VirtualFileAdaptor implements UnifiedVirtualFile
+{
+   private static final long serialVersionUID = 6547394037548338042L;
+
+   private VirtualFile root;
+
+   public VirtualFileAdaptor(VirtualFile root)
+   {
+      this.root = root;
+   }
+
+   public UnifiedVirtualFile findChild(String child) throws IOException
+   {
+      VirtualFile vf = root.findChild(child);
+      return new VirtualFileAdaptor(vf);
+   }
+
+   public URL toURL()
+   {
+      try
+      {
+         return root.toURL();
+      }
+      catch (Exception e)
+      {
+         return null;
+      }
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/VirtualFileAdaptor.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+// $Id$
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.deployers.plugins.structure.AbstractDeploymentContext;
+import org.jboss.deployers.spi.deployment.MainDeployer;
+import org.jboss.deployers.spi.structure.DeploymentContext;
+import org.jboss.deployers.spi.structure.DeploymentState;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.core.deployment.ServiceEndpointPublisher;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.Deployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+
+/**
+ * Publish the HTTP service endpoint to Tomcat 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class WebAppDeployerDeployer implements Deployer
+{
+   // provide logging
+   private static Logger log = Logger.getLogger(WebAppDeployerDeployer.class);
+
+   private MainDeployer mainDeployer;
+   private ServiceEndpointPublisher serviceEndpointPublisher;
+   private Map<String, DeploymentContext> contextMap = new HashMap<String, DeploymentContext>();
+
+   public void setMainDeployer(MainDeployer mainDeployer)
+   {
+      this.mainDeployer = mainDeployer;
+   }
+
+   public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+   {
+      this.serviceEndpointPublisher = serviceEndpointPublisher;
+   }
+
+   public void create(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+         throw new IllegalStateException("Cannot obtain unified deployement info");
+
+      URL warURL = udi.webappURL;
+
+      log.debug("publishServiceEndpoint: " + warURL);
+      try
+      {
+         serviceEndpointPublisher.rewriteWebXml(udi);
+         DeploymentContext context = createDeploymentContext(warURL);
+
+         mainDeployer.addDeploymentContext(context);
+         mainDeployer.process();
+
+         contextMap.put(warURL.toExternalForm(), context);
+      }
+      catch (Exception ex)
+      {
+         WSDeploymentException.rethrow(ex);
+      }
+   }
+
+   public void destroy(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+         throw new IllegalStateException("Cannot obtain unified deployement info");
+
+      URL warURL = udi.webappURL;
+      if (warURL == null)
+      {
+         log.error("Cannot obtain warURL for: " + udi.name);
+         return;
+      }
+
+      log.debug("destroyServiceEndpoint: " + warURL);
+      try
+      {
+         DeploymentContext context = contextMap.get(warURL.toExternalForm());
+         if (context != null)
+         {
+            context.setState(DeploymentState.UNDEPLOYING);
+            mainDeployer.process();
+            mainDeployer.removeDeploymentContext(context.getName());
+
+            contextMap.remove(warURL.toExternalForm());
+         }
+      }
+      catch (Exception ex)
+      {
+         WSDeploymentException.rethrow(ex);
+      }
+   }
+
+   private DeploymentContext createDeploymentContext(URL warURL) throws Exception
+   {
+      VirtualFile file = VFS.getRoot(warURL);
+      return new AbstractDeploymentContext(file);
+   }
+
+   public void start(Deployment dep)
+   {
+   }
+
+   public void stop(Deployment dep)
+   {
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+//$Id$
+
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that generates a webapp for an EJB endpoint 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class WebAppGeneratorDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+      if (udi == null)
+         throw new IllegalStateException("Cannot obtain unified deployement info");
+
+      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+      if (umd == null)
+         throw new IllegalStateException("Cannot obtain unified meta data");
+
+      if (dep.getType().toString().endsWith("EJB21"))
+      {
+         ServiceEndpointGeneratorEJB21 generator = new ServiceEndpointGeneratorEJB21();
+         udi.webappURL = generator.generatWebDeployment(umd, udi);
+      }
+      else if (dep.getType().toString().endsWith("EJB3"))
+      {
+         ServiceEndpointGeneratorEJB3 generator = new ServiceEndpointGeneratorEJB3();
+         udi.webappURL = generator.generatWebDeployment(umd, udi);
+      }
+   }
+}
\ No newline at end of file


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java
===================================================================
--- projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,136 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.jbossws;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.WebSecurityMetaData;
+import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
+import org.jboss.metadata.web.Servlet;
+import org.jboss.metadata.web.ServletMapping;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
+import org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
+
+/**
+ * Build container independent web meta data
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class WebMetaDataAdaptor
+{
+   public static UnifiedWebMetaData buildUnifiedWebMetaData(UnifiedDeploymentInfo udi, DeploymentUnit unit)
+   {
+      WebMetaData wmd = unit.getAttachment(WebMetaData.class);
+      udi.addAttachment(WebMetaData.class, wmd);
+
+      UnifiedWebMetaData umd = new UnifiedWebMetaData();
+      umd.setContextRoot(wmd.getContextRoot());
+      umd.setServletMappings(getServletMappings(wmd));
+      umd.setServletClassNames(getServletClassMap(wmd));
+      umd.setConfigName(wmd.getConfigName());
+      umd.setConfigFile(wmd.getConfigFile());
+      umd.setSecurityDomain(wmd.getSecurityDomain());
+      umd.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
+      umd.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
+
+      return umd;
+   }
+
+   private static PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
+   {
+      return new PublishLocationAdapter()
+      {
+         public String getWsdlPublishLocationByName(String name)
+         {
+            return wmd.getWsdlPublishLocationByName(name);
+         }
+      };
+   }
+
+   protected static List<UnifiedWebSecurityMetaData> getSecurityMetaData(final Iterator securityConstraints)
+   {
+      ArrayList<UnifiedWebSecurityMetaData> unifiedsecurityMetaData = new ArrayList<UnifiedWebSecurityMetaData>();
+
+      while (securityConstraints.hasNext())
+      {
+         WebSecurityMetaData securityMetaData = (WebSecurityMetaData)securityConstraints.next();
+
+         UnifiedWebSecurityMetaData current = new UnifiedWebSecurityMetaData();
+         unifiedsecurityMetaData.add(current);
+
+         current.setTransportGuarantee(securityMetaData.getTransportGuarantee());
+
+         Map<String, WebResourceCollection> resources = securityMetaData.getWebResources();
+         for (WebResourceCollection webResource : resources.values())
+         {
+            UnifiedWebResourceCollection currentResource = current.addWebResource(webResource.getName());
+            for (String currentPattern : webResource.getUrlPatterns())
+            {
+               currentResource.addPattern(currentPattern);
+            }
+         }
+      }
+
+      return unifiedsecurityMetaData;
+   }
+
+   private static Map<String, String> getServletMappings(WebMetaData wmd)
+   {
+      Map<String, String> mappings = new HashMap<String, String>();
+      Iterator it = wmd.getServletMappings().iterator();
+      while (it.hasNext())
+      {
+         ServletMapping sm = (ServletMapping)it.next();
+         // FIXME - Add support for multiple mappings
+         mappings.put(sm.getName(), sm.getUrlPatterns().get(0));
+      }
+      return mappings;
+   }
+
+   private static Map<String, String> getServletClassMap(WebMetaData wmd)
+   {
+      Map<String, String> mappings = new HashMap<String, String>();
+      Iterator it = wmd.getServlets().iterator();
+      while (it.hasNext())
+      {
+         Servlet servlet = (Servlet)it.next();
+         // Skip JSPs
+         if (servlet.getServletClass() == null || servlet.getServletClass().length() == 0)
+            continue;
+
+         mappings.put(servlet.getName(), servlet.getServletClass());
+      }
+      return mappings;
+   }
+}


Property changes on: projects/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.ws.core.server.HttpServer
===================================================================
--- projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.ws.core.server.HttpServer	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.ws.core.server.HttpServer	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1 @@
+org.jboss.ws.integration.jboss50.JBossHttpServer
\ No newline at end of file

Added: projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory
===================================================================
--- projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1 @@
+org.jboss.ws.integration.jboss50.SecurityAssociationAdaptorFactoryImpl
\ No newline at end of file

Added: projects/jbws-jboss50/trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- projects/jbws-jboss50/trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+  
+  <!--
+    A web service deployer that hooks in after the EJB deployers
+  -->
+  <bean name="WebServiceDeployerEJB" class="org.jboss.ws.integration.jboss50.WebServiceDeployerEJB">
+    <property name="relOrderEJB2x"><inject bean="EJB2xDeployer" property="relativeOrder"/></property>
+    <property name="relOrderEJB3"><inject bean="EJBRegistrationDeployer" property="relativeOrder"/></property>
+    <install bean="MainDeployer" method="addDeployer">
+      <parameter>
+        <this/>
+      </parameter>
+    </install>
+    <uninstall bean="MainDeployer" method="removeDeployer">
+      <parameter>
+        <this/>
+      </parameter>
+    </uninstall>
+    <depends>EJB2xDeployer</depends>
+    <depends>EJBRegistrationDeployer</depends>
+  </bean>
+  
+  <!--
+    A web service deployer that hooks in before the WAR deployer
+  -->
+  <bean name="WebServiceDeployerJSE" class="org.jboss.ws.integration.jboss50.WebServiceDeployerJSE">
+    <property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
+    <install bean="MainDeployer" method="addDeployer">
+      <parameter>
+        <this/>
+      </parameter>
+    </install>
+    <uninstall bean="MainDeployer" method="removeDeployer">
+      <parameter>
+        <this/>
+      </parameter>
+    </uninstall>
+    <depends>WebAppParsingDeployer</depends>
+  </bean>
+  
+  <!--
+    A web service deployer that hooks in after the web service WAR/EJB deployers
+  -->
+  <bean name="WebServiceMainDeployer" class="org.jboss.ws.integration.jboss50.WebServiceMainDeployer">
+    <property name="relOrderJSE"><inject bean="WebServiceDeployerJSE" property="relativeOrder"/></property>
+    <property name="relOrderEJB"><inject bean="WebServiceDeployerEJB" property="relativeOrder"/></property>
+    <install bean="MainDeployer" method="addDeployer">
+      <parameter>
+        <this/>
+      </parameter>
+    </install>
+    <uninstall bean="MainDeployer" method="removeDeployer">
+      <parameter>
+        <this/>
+      </parameter>
+    </uninstall>
+    <depends>WarDeployer</depends>
+    <depends>WebServiceDeployerEJB</depends>
+    <depends>WebServiceDeployerJSE</depends>
+  </bean>
+  
+</deployment>


Property changes on: projects/jbws-jboss50/trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
===================================================================
--- projects/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- An abstraction of server configuration aspects. -->  
+  <bean name="WSServerConfig" class="org.jboss.ws.integration.management.ServerConfigImpl">
+    <!--
+        The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
+        element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
+      
+        If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
+        If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
+        
+        If 'webServiceHost' is not set, JBossWS uses requesters protocol host and port when rewriting the <soap:address>.
+    -->
+    <property name="webServiceHost">${jboss.bind.address}</property>
+    <property name="modifySOAPAddress">true</property>
+    
+    <!-- 
+      Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
+      Otherwise the ports will be identified by querying the list of installed connectors. 
+      If multiple connectors are found the port of the first connector is used.
+      <property name="webServiceSecurePort">8443</property>
+      <property name="webServicePort">8080</property>
+    -->
+  </bean>
+
+  <!-- The registry for web service endpoints -->
+  <bean name="WSEndpointRegistry" class="org.jboss.ws.core.server.ServiceEndpointRegistry"/>
+  
+  <!-- A subscription manager for WS-Eventing -->
+  <bean name="WSSubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
+  
+  <!-- Bind Service objects in client environment context  -->
+  <!-- The bean name is compiled into the server. Changeit with the next release. -->
+  <bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
+  
+  <!-- Locate the single instance of the kernel -->  
+  <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
+    <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+  </bean>
+  
+  <!-- 
+    ********************************************************************************************************************* 
+    Web Service deployment                                                                                                
+    
+    There are three deployers registered with the JBoss Main Deployer. 
+    The order of which is important
+    
+    1) EJBDeployer < WebServiceDeployerEJB
+    2) WebServiceDeployerJSE < WarDeployer 
+    3) WebServiceMainDeployer
+    
+    Each WebServiceDeployer has a number of DeployerHooks registerd with it 
+    
+    - WebServiceDeployerEJB
+      - WSDeployerHook_JAXRPC_EJB21
+      - WSDeployerHook_JAXWS_EJB3
+    
+    - WebServiceDeployerJSE
+      - WSDeployerHook_JAXRPC_JSE
+      - WSDeployerHook_JAXWS_JSE
+    
+    -  WebServiceMainDeployer
+      - WSMainDeployerHook    
+    
+    Conceptually, each of these hooks implements the following pattern:
+    
+    DployerHook.deploy(unit) 
+      if(isWebServiceDeployment)
+        Deployment dep = createDeployment(unit)
+        DeployerManager.deploy(dep)
+ 
+    DeployerHook.undeploy(unit)
+      Deployment dep = getDeployment(unit) 
+      DeployerManager.undeploy(dep)
+    
+    Each deployer hook has a web service DeployerManager injected into it. 
+    A web service DeployerManager maintains a list of Deployers, each of which 
+    handles a single aspect of web service deployment.
+    
+    Finally, each Endpoint is registered with the EndpointRegistry.
+    
+    ********************************************************************************************************************* 
+  -->
+  
+  <!-- 
+    Each DeploymentManger maintains a list of Deployers
+    Each Deployer handles a single aspect of web service deployment.
+  -->
+  <bean name="WSDeployerManagerJSE" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+    <property name="deployers">
+      <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+        <inject bean="WSUnifiedDeploymentInfoDeployer"/>
+        <inject bean="WSUnifiedMetaDataDeployer"/>
+        <inject bean="WSUnifiedMetaDataAssociationDeployer"/>
+        <inject bean="WSModifyWebMetaDataDeployer"/>
+      </list>
+    </property>
+  </bean>
+  <bean name="WSDeployerManagerEJB" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+    <property name="deployers">
+      <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+        <inject bean="WSUnifiedDeploymentInfoDeployer"/>
+        <inject bean="WSUnifiedMetaDataDeployer"/>
+        <inject bean="WSUnifiedMetaDataAssociationDeployer"/>
+        <inject bean="WSWebAppGeneratorDeployer"/>
+        <inject bean="WSWebAppDeployerDeployer"/>
+      </list>
+    </property>
+  </bean>
+  <bean name="WSMainDeployerManager" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+    <property name="deployers">
+      <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+        <inject bean="WSEndpointNameDeployer"/>
+        <inject bean="WSEndpointHandlerDeployer"/>
+        <inject bean="WSPublishContractDeployer"/>
+        <inject bean="WSClassLoaderInjectionDeployer"/>
+        <inject bean="WSEagerInitializeDeployer"/>
+        <inject bean="WSEndpointRegistryDeployer"/>
+        <inject bean="WSEndpointLifecycleDeployer"/>
+      </list>
+    </property>
+  </bean>
+  
+  <!-- 
+    The Deployers
+    Each handles a single aspect of web service deployment 
+  --> 
+  <bean name="WSClassLoaderInjectionDeployer" class="org.jboss.ws.integration.jboss50.jbossws.ClassLoaderInjectionDeployer"/>
+  <bean name="WSEagerInitializeDeployer" class="org.jboss.ws.core.deployment.EagerInitializeDeployer"/>
+  <bean name="WSEndpointHandlerDeployer" class="org.jboss.ws.core.deployment.EndpointHandlerDeployer">
+    <property name="requestHandler">org.jboss.ws.core.server.RequestHandlerImpl</property>
+    <property name="lifecycleHandler">org.jboss.ws.core.server.LifecycleHandlerImpl</property>
+    <property name="invocationHandler">
+      <map keyClass="java.lang.String" valueClass="java.lang.String">
+        <entry><key>JAXRPC_JSE</key><value>org.jboss.ws.core.server.InvocationHandlerJSE</value></entry>
+        <entry><key>JAXRPC_EJB21</key><value>org.jboss.ws.integration.jboss50.jbossws.InvocationHandlerEJB21</value></entry>
+        <entry><key>JAXWS_JSE</key><value>org.jboss.ws.core.server.InvocationHandlerJSE</value></entry>
+        <entry><key>JAXWS_EJB3</key><value>org.jboss.ws.integration.jboss50.jbossws.InvocationHandlerEJB3</value></entry>
+      </map>
+    </property>
+  </bean>
+  <bean name="WSEndpointLifecycleDeployer" class="org.jboss.ws.core.deployment.EndpointLifecycleDeployer"/>
+  <bean name="WSEndpointNameDeployer" class="org.jboss.ws.core.deployment.EndpointNameDeployer"/>
+  <bean name="WSEndpointRegistryDeployer" class="org.jboss.ws.integration.deployment.EndpointRegistryDeployer"/>
+  <bean name="WSModifyWebMetaDataDeployer" class="org.jboss.ws.integration.jboss50.jbossws.ModifyWebMetaDataDeployer">
+    <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+  </bean>
+  <bean name="WSPublishContractDeployer" class="org.jboss.ws.core.deployment.PublishContractDeployer"/>
+  <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.ws.integration.jboss50.jbossws.UnifiedDeploymentInfoDeployer"/>
+  <bean name="WSUnifiedMetaDataAssociationDeployer" class="org.jboss.ws.core.deployment.UnifiedMetaDataAssociationDeployer"/>
+  <bean name="WSUnifiedMetaDataDeployer" class="org.jboss.ws.core.deployment.UnifiedMetaDataDeployer"/>
+  <bean name="WSWebAppGeneratorDeployer" class="org.jboss.ws.integration.jboss50.jbossws.WebAppGeneratorDeployer"/>
+  <bean name="WSWebAppDeployerDeployer" class="org.jboss.ws.integration.jboss50.jbossws.WebAppDeployerDeployer">
+    <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+    <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+  </bean>
+  
+  <!-- Deployer helper beans -->  
+  <bean name="WSServiceEndpointPublisher" class="org.jboss.ws.core.deployment.ServiceEndpointPublisher">
+    <property name="servletClass">org.jboss.ws.core.server.ServiceEndpointServlet</property>
+  </bean>
+  
+  <!-- 
+    Register DeployerHooks with JBoss deployers 
+  -->
+  <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.ws.integration.jboss50.jbossws.JAXRPCDeployerHookJSE">
+    <property name="deployerManager"><inject bean="WSDeployerManagerJSE"/></property>
+    <install bean="WebServiceDeployerJSE" method="addDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </install>
+    <uninstall bean="WebServiceDeployerJSE" method="removeDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </uninstall>
+    <depends>WebServiceDeployerJSE</depends>
+  </bean>
+  <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.ws.integration.jboss50.jbossws.JAXRPCDeployerHookEJB21">
+    <property name="deployerManager"><inject bean="WSDeployerManagerEJB"/></property>
+    <install bean="WebServiceDeployerEJB" method="addDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </install>
+    <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </uninstall>
+    <depends>WebServiceDeployerEJB</depends>
+  </bean>
+  <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.ws.integration.jboss50.jbossws.JAXWSDeployerHookJSE">
+    <property name="deployerManager"><inject bean="WSDeployerManagerJSE"/></property>
+    <install bean="WebServiceDeployerJSE" method="addDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </install>
+    <uninstall bean="WebServiceDeployerJSE" method="removeDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </uninstall>
+    <depends>WebServiceDeployerJSE</depends>
+  </bean>
+  <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.ws.integration.jboss50.jbossws.JAXWSDeployerHookEJB3">
+    <property name="deployerManager"><inject bean="WSDeployerManagerEJB"/></property>
+    <install bean="WebServiceDeployerEJB" method="addDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </install>
+    <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </uninstall>
+    <depends>WebServiceDeployerEJB</depends>
+  </bean>
+  <bean name="WSMainDeployerHook" class="org.jboss.ws.integration.jboss50.jbossws.MainDeployerHook">
+    <property name="deployerManager"><inject bean="WSMainDeployerManager"/></property>
+    <install bean="WebServiceMainDeployer" method="addDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </install>
+    <uninstall bean="WebServiceMainDeployer" method="removeDeployerHook">
+      <parameter>
+        <this/>
+      </parameter>
+    </uninstall>
+    <depends>WebServiceMainDeployer</depends>
+  </bean>
+    
+</deployment>


Property changes on: projects/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
===================================================================
--- projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE jboss-web
+    PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+
+  <!--
+  <security-domain>java:/jaas/jbossws</security-domain>
+  -->
+  <context-root>jbossws</context-root>
+
+</jboss-web>


Property changes on: projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
===================================================================
--- projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  A web application that installs the JBossWS servlets
+
+  $Id$
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+  <display-name>JBossWS</display-name>
+
+  <servlet>
+    <servlet-name>ContextServlet</servlet-name>
+    <servlet-class>org.jboss.ws.integration.jboss50.JBossContextServlet</servlet-class>
+  </servlet>
+
+  <servlet>
+    <servlet-name>PortComponentLinkServlet</servlet-name>
+    <servlet-class>org.jboss.ws.integration.jboss50.PortComponentLinkServlet</servlet-class>
+  </servlet>
+  
+  <!-- now the mappings -->
+  
+  <servlet-mapping>
+    <servlet-name>ContextServlet</servlet-name>
+    <url-pattern>/services/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>PortComponentLinkServlet</servlet-name>
+    <url-pattern>/pclink</url-pattern>
+  </servlet-mapping>
+
+  <!-- 
+  currently the W3C haven't settled on a media type for WSDL;
+  http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
+  for now we go with the basic 'it's XML' response 
+  -->
+  <mime-mapping>
+    <extension>wsdl</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+
+  <mime-mapping>
+    <extension>xsd</extension>
+    <mime-type>text/xml</mime-type>
+  </mime-mapping>
+
+  <welcome-file-list id="WelcomeFileList">
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+
+</web-app>


Property changes on: projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/index.html
===================================================================
--- projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/index.html	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/index.html	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,63 @@
+<html><head>
+<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<title>JBossWS / jbossws-2.0.0.CR3 (date=200702012001)</title>
+<link rel='stylesheet' href='./styles.css'>
+</head>
+<body>
+
+<div class='pageHeader'>Welcome to JBoss Web Services</div>
+
+<div class="pageSection">
+<h2>J2EE compatible web services</h2>
+JBossWS is a JAX-WS compliant web service stack developed to be part of JBoss' JavaEE5 offering.
+</div>
+
+<div class="pageSection">
+<h3>Administration</h3>
+
+<fieldset>
+    <legend><b>Runtime information</b></legend>
+<ul>
+	<li><a href="services">View a list of deployed services</a></li>
+	<!--li><a href="depends">View installed dependencies</a></li-->
+	<li><a href="/jmx-console/">Access JMX console</a></li>
+</ul>
+</fieldset>
+</div>
+
+<div class="pageSection">
+<h3>Project information</h3>
+
+<fieldset>
+    <legend><b>Documentation</b></legend>
+
+<ul>
+	<li><a href="http://labs.jboss.com/portal/jbossws/downloads">Latest download and samples</a></li>
+	<li><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBWSFAQ">FAQ</a></li>
+	<li><a href="http://labs.jboss.com/jbossws/user-guide/en/html/index.html">User guide</a></li>
+	<li><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS">JBossWS WIKI</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+    <legend><b>Community</b></legend>
+<ul>
+	<li><a href="http://www.jboss.org/index.html?module=bb&op=viewforum&f=200">User forum</a></li>
+	<li><a href="http://www.jboss.org/index.html?module=bb&op=viewforum&f=174">Design forum</a></li>
+	<li><a href="https://lists.jboss.org/mailman/listinfo/jbossws-users">Mailing list</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+    <legend><b>Source repository</b></legend>
+<ul>
+	<li><a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWSFAQSourceRepository">Subversion repository</a></li>
+	<li><a href="http://fisheye.jboss.com/viewrep/JBossWS">Browse sources online</a></li>
+</ul>
+</fieldset>
+</div>
+
+</body>
+</html>

Added: projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/styles.css
===================================================================
--- projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/styles.css	                        (rev 0)
+++ projects/jbws-jboss50/trunk/src/main/resources/jbossws.war/styles.css	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,186 @@
+
+/* table for list views */
+.table_list {
+}
+
+/* table for detail views */
+.table_form {
+}
+
+.pageHeader {
+   font-size: 14pt;
+   font-weight: BOLD;
+   color: #ffffff;
+   border-bottom-width:1px;
+   border-bottom-style:solid;
+   border-color:#000066;
+   margin-bottom:15px;
+   padding-left:15px;
+   padding-top:5px;
+   padding-bottom:5px;
+   background-color: #aaaadd;
+   max-width: 900px;
+}
+
+.pageSection {
+ padding-left:15px;
+ margin-bottom: 5px;
+ max-width: 900px;
+}
+
+.metrics
+{	 
+   font-size: 6pt;
+   background-color: #dddddd;
+   width: 100%;
+}
+
+/* table row header */
+.list_tr_head {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   font-weight: 600;
+   text-align: center;
+   background-color: #aaaadd;
+}
+
+/* table row list view */
+.list_tr {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: top;
+   background-color: #ffffff;
+}
+
+/* table row list view odd lines */
+.list_tr_even {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: top;
+   background-color: #ffffff;
+}
+
+/* table row list view even lines */
+.list_tr_odd {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: top;
+   background-color: #dddddd;
+}
+
+/* form label */
+.form_label {
+   font-family: Verdana, sans-serif;
+   font-weight: 500;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: top;
+   background-color: #dddddd;
+   padding-top: 2px;
+   padding-bottom: 2px;
+}
+
+/* form value */
+.form_value {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   vertical-align: baseline;
+}
+
+/* tiny writing */
+.tiny {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #666666;
+}
+
+/* required input fields */
+.inputmust {
+   background-color: #dddddd;
+}
+
+/* error message */
+.error {
+   font-family: Courier New;
+   color: #990000;
+}
+
+/* error message */
+.error_trace {
+   font-family: Courier New;
+}
+
+/* active tree node */
+.tree_active_label {
+   font-weight: bold;
+}
+
+body {
+   font-family: Verdana,, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+   background-color: #ffffff;
+}
+
+/* title style */
+h1 {
+   font-family: Verdana, sans-serif;
+   font-size: 14pt;
+   font-weight: 600;
+   color: #000066;
+}
+
+h2 {
+   font-family: Verdana, sans-serif;
+   font-size: 12pt;
+   font-weight: 600;
+   color: #000066;
+}
+
+h3 {
+   font-family: Verdana, sans-serif;
+   font-size: 10pt;
+   font-weight: 600;
+   color: #000066;
+}
+
+h4 {
+   font-family: Verdana, sans-serif;
+   font-size: 10pt;
+   font-weight: 500;
+   color: #000066;
+}
+
+/* table desk */
+td {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   padding-left: 5px;
+   padding-right: 5px;
+}
+
+input, textarea, select, option {
+   font-family: Verdana, sans-serif;
+   font-size: 8pt;
+   color: #000066;
+}
+
+a {
+   font-family: Verdana, sans-serif;
+   color: #0000dd;
+   text-decoration: none;
+}
+
+a:hover{
+   font-family: Verdana, sans-serif;
+   color: #cc0000;
+   text-decoration: none;
+}
+
+pre {
+    background:#dddddd
+}
\ No newline at end of file

Added: projects/jbws-jboss50/trunk/version.properties
===================================================================
--- projects/jbws-jboss50/trunk/version.properties	                        (rev 0)
+++ projects/jbws-jboss50/trunk/version.properties	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,32 @@
+
+# $Id: version.properties 2928 2007-04-26 10:53:56Z thomas.diesler at jboss.com $
+
+specification.title=JBossWS
+specification.vendor=JBoss (http://www.jboss.org)
+specification.version=jbossws-2.1
+
+version.id=2.1.0.DEV
+repository.id=SNAPSHOT
+
+implementation.title=JBoss Web Services (JBossWS)
+implementation.url=http://www.jboss.org/products/jbossws
+implementation.vendor=JBoss Inc.
+implementation.vendor.id=http://www.jboss.org
+
+# Thirdparty library versions
+apache-xmlsec=1.3.0
+ibm-wsdl4j=1.6.2
+jboss-common-core=2.0.2.GA
+jboss-common-logging-log4j=2.0.2.GA
+jboss-common-logging-spi=2.0.2.GA
+jboss-jaxr=1.2.0.GA
+jboss-jbossws=SNAPSHOT
+jboss-jbossws-spi=SNAPSHOT
+jboss-jbossxb=1.0.0.CR10
+jboss-microcontainer=2.0.0.Beta3
+jboss-security-spi=2.0.0.Beta
+jbossws-wsconsume-impl=2.0.0
+sun-jaxb=2.0.3jboss
+sun-servlet=2.4
+wscommons-policy=1.0
+

Added: projects/spi/trunk/.classpath
===================================================================
--- projects/spi/trunk/.classpath	                        (rev 0)
+++ projects/spi/trunk/.classpath	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-common-core.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-container.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-dependency.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-deployers.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-logging-log4j.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-logging-spi.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-microcontainer.jar"/>
+	<classpathentry kind="lib" path="thirdparty/jboss-xml-binding.jar"/>
+	<classpathentry kind="output" path="output-eclipse"/>
+</classpath>

Added: projects/spi/trunk/.project
===================================================================
--- projects/spi/trunk/.project	                        (rev 0)
+++ projects/spi/trunk/.project	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jbossws-spi</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: projects/spi/trunk/ant.properties.example
===================================================================
--- projects/spi/trunk/ant.properties.example	                        (rev 0)
+++ projects/spi/trunk/ant.properties.example	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,20 @@
+#
+# A sample ant properties file
+#
+# $Id: ant.properties.example 2870 2007-04-15 14:54:22Z thomas.diesler at jboss.com $
+
+# JBoss Repository
+#jboss.repository=file:/home/tdiesler/svn/jboss.local.repository
+jboss.repository=http://repository.jboss.org
+
+# JBossWS Release
+jboss.local.repository=/home/tdiesler/svn/jboss.local.repository
+
+# Force thirdparty HTTP get
+#force.thirdparty.get=true
+
+# Java Compiler options
+javac.debug=yes
+javac.deprecation=yes
+javac.fail.onerror=yes
+javac.verbose=no

Added: projects/spi/trunk/build.xml
===================================================================
--- projects/spi/trunk/build.xml	                        (rev 0)
+++ projects/spi/trunk/build.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,163 @@
+<?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$ -->
+
+<project default="main" basedir="." name="JBossWS SPI">
+  
+  <import file="${basedir}/src/main/etc/ant-import/build-release.xml"/>
+  <import file="${basedir}/src/main/etc/ant-import/build-thirdparty.xml"/>
+  
+  <!-- ================================================================== -->
+  <!-- Setup                                                              -->
+  <!-- ================================================================== -->
+  
+  <property file="${basedir}/ant.properties"/>
+  <property file="${basedir}/version.properties"/>
+  <property environment="env"/>
+  
+  <property name="spi.dir" value="${basedir}"/>
+  <property name="spi.src.dir" value="${spi.dir}/src/main"/>
+  <property name="spi.etc.dir" value="${spi.src.dir}/etc"/>
+  <property name="spi.java.dir" value="${spi.src.dir}/java"/>
+  <property name="spi.resources.dir" value="${spi.src.dir}/resources"/>
+  <property name="spi.output.dir" value="${spi.dir}/output"/>
+  <property name="spi.output.apidocs.dir" value="${spi.output.dir}/apidocs"/>
+  <property name="spi.output.classes.dir" value="${spi.output.dir}/classes"/>
+  <property name="spi.output.lib.dir" value="${spi.output.dir}/lib"/>
+  
+  <property name="thirdparty.dir" value="${basedir}/thirdparty"/>
+  
+  <!-- ================================================================== -->
+  <!-- Initialization                                                     -->
+  <!-- ================================================================== -->
+  
+  <target name="prepare">
+    
+    <mkdir dir="${spi.output.dir}"/>
+    
+    <checksum file="${basedir}/version.properties" fileext=".md5" verifyproperty="checksum.ok"/>
+    <checksum file="${basedir}/version.properties" fileext=".md5"/>
+    
+    <condition property="force.thirdparty.get">
+      <or>
+        <not>
+          <available file="${thirdparty.dir}" type="dir"/>
+        </not>
+        <isfalse value="${checksum.ok}"/>
+      </or>
+    </condition>
+    
+    <tstamp>
+      <format property="build.id" pattern="yyyyMMddHHmm"/>
+    </tstamp>
+	  
+  </target>
+  
+  <target name="spi-init" depends="prepare, thirdparty">
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Compile                                                            -->
+  <!-- ================================================================== -->
+  
+  <!--
+  | Compile everything.
+  |
+  | This target should depend on other compile-* targets for each
+  | different type of compile that needs to be performed, short of
+  | documentation compiles.
+  -->
+  
+  <target name="spi-compile" depends="spi-init,spi-compile-classes,spi-compile-etc" 
+    description="Compile all source files."/>
+  
+  <!-- Compile java sources -->
+  <target name="spi-compile-classes" depends="spi-init">
+  
+    <!-- Compile spi classes with jdk1.5 -->
+    <mkdir dir="${spi.output.classes.dir}"/>
+    <javac srcdir="${spi.java.dir}" sourcepath="" destdir="${spi.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
+      deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}" source="1.5" target="1.5">
+      <include name="org/jboss/ws/integration/**"/>
+      <classpath refid="core.classpath"/>
+    </javac>
+  </target>
+  
+  <!-- Compile etc files (manifests and such) -->
+  <target name="spi-compile-etc" depends="spi-init">
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Archives                                                           -->
+  <!-- ================================================================== -->
+  
+  <!--
+  | Build all jar files.
+  -->
+  <target name="spi-jars" depends="spi-compile,spi-module-jars" description="Builds all jar files.">
+  </target>
+  
+  <!--
+  |  Build all jar files.
+  -->
+  <target name="spi-module-jars">
+    
+    <!-- Build jbossws-spi.jar -->
+    <mkdir dir="${spi.output.lib.dir}"/>
+    <jar jarfile="${spi.output.lib.dir}/jbossws-spi.jar" manifest="${spi.etc.dir}/default.mf">
+      <fileset dir="${spi.output.classes.dir}">
+        <include name="org/jboss/ws/integration/**"/>
+      </fileset>
+    </jar>
+    
+    <!-- Build jbossws-spi-src.zip -->
+    <zip zipfile="${spi.output.lib.dir}/jbossws-spi-src.zip" >
+      <fileset dir="${spi.java.dir}"/>
+    </zip>
+    
+  </target>
+  
+  <!-- ================================================================== -->
+  <!-- Documentation                                                      -->
+  <!-- ================================================================== -->
+
+   <!-- Generate the JavaDoc -->
+   <target name="spi-javadoc" depends="spi-init" description="Generate the Javadoc">
+
+      <mkdir dir="${spi.output.apidocs.dir}"/>
+      <javadoc destdir="${spi.output.apidocs.dir}" author="true" version="true" use="true" windowtitle="JBossWS API">
+         <classpath refid="spi.classpath"/>
+         <packageset dir="${spi.java.dir}" defaultexcludes="yes">
+            <include name="org/jboss/ws/**"/>
+         </packageset>
+         <doctitle><![CDATA[<h1>JBossWS</h1>]]></doctitle>
+         <tag name="todo" scope="all" description="To do:"/>
+         <group title="Core" packages="org.jboss.ws.spi*"/>
+         <group title="Metadata" packages="org.jboss.ws.metadata*"/>
+         <group title="spi" packages="org.jboss.ws.spi*"/>
+         <group title="Extensions" packages="org.jboss.ws.extensions*"/>
+         <group title="Tools" packages="org.jboss.ws.tools*"/>
+      </javadoc>
+   </target>
+  
+  <target name="clean" depends="prepare" description="Cleans up most generated files.">
+    <delete dir="${spi.output.dir}"/>
+  </target>
+  
+  <target name="main" description="Executes the default target (most)." depends="most"/>
+  
+  <target name="most" description="Builds almost everything." depends="spi-jars"/>
+  
+  <target name="all" description="Create a distribution zip file" depends="main">
+  </target>
+  
+</project>


Property changes on: projects/spi/trunk/build.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/etc/JBossORG-EULA.txt
===================================================================
--- projects/spi/trunk/src/main/etc/JBossORG-EULA.txt	                        (rev 0)
+++ projects/spi/trunk/src/main/etc/JBossORG-EULA.txt	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,107 @@
+LICENSE AGREEMENT
+JBOSS(r)
+
+This License Agreement governs the use of the Software Packages and any updates to the Software 
+Packages, regardless of the delivery mechanism.  Each Software Package is a collective work 
+under U.S. Copyright Law.  Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to 
+the user ("Client") a license to the applicable collective work(s) pursuant to the 
+GNU Lesser General Public License v. 2.1 except for the following Software Packages: 
+(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to the 
+GNU General Public License v.2; 
+
+(b) JBoss Rules, which is licensed pursuant to the Apache  License v.2.0;
+
+(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is licensed under the 
+(open source) Sleepycat License (if Client does not wish to use the open source version of this database, 
+it may purchase a license from Sleepycat Software); 
+
+and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public License v.1, 
+and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to enter various 
+royalty-free patent licenses.  
+
+Each of the foregoing licenses is available at http://www.opensource.org/licenses/index.php.
+
+1.  The Software.  "Software Packages" refer to the various software modules that are created and made available 
+for distribution by the JBoss.org open source community at http://www.jboss.org.   Each of the Software Packages 
+may be comprised of hundreds of software components.  The end user license agreement for each component is located in 
+the component's source code.  With the exception of certain image files identified in Section 2 below, 
+the license terms for the components permit Client to copy, modify, and redistribute the component, 
+in both source code and binary code forms.  This agreement does not limit Client's rights under, 
+or grant Client rights that supersede, the license terms of any particular component.
+
+2.  Intellectual Property Rights.  The Software Packages are owned by Red Hat and others and are protected under copyright 
+and other laws.  Title to the Software Packages and any component, or to any copy, modification, or merged portion shall 
+remain with the aforementioned, subject to the applicable license.  The "JBoss" trademark, "Red Hat" trademark, the 
+individual Software Package trademarks, and the "Shadowman" logo are registered trademarks of Red Hat and its affiliates 
+in the U.S. and other countries.  This agreement permits Client to distribute unmodified copies of the Software Packages 
+using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the condition that Client follows Red Hat's 
+trademark guidelines for those trademarks located at http://www.redhat.com/about/corporate/trademark/.  Client must abide by 
+these trademark guidelines when distributing the Software Packages, regardless of whether the Software Packages have been modified. 
+If Client modifies the Software Packages, then Client must replace all Red Hat trademarks and logos identified at 
+http://www.jboss.com/company/logos, unless a separate agreement with Red Hat is executed or other permission granted.  
+Merely deleting the files containing the Red Hat trademarks may corrupt the Software Packages.  
+
+3.  Limited Warranty.  Except as specifically stated in this Paragraph 3 or a license for a particular 
+component, to the maximum extent permitted under applicable law, the Software Packages and the 
+components are provided and licensed "as is" without warranty of any kind, expressed or implied, 
+including the implied warranties of merchantability, non-infringement or fitness for a particular purpose.  
+Red Hat warrants that the media on which Software Packages may be furnished will be free from defects in 
+materials and manufacture under normal use for a period of 30 days from the date of delivery to Client.  
+Red Hat does not warrant that the functions contained in the Software Packages will meet Client's requirements 
+or that the operation of the Software Packages will be entirely error free or appear precisely as described 
+in the accompanying documentation. This warranty extends only to the party that purchases the Services 
+pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor. 
+
+4.  Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, the remedies 
+described below are accepted by Client as its only remedies.  Red Hat's entire liability, and Client's 
+exclusive remedies, shall be: If the Software media is defective, Client may return it within 30 days of 
+delivery along with a copy of Client's payment receipt and Red Hat, at its option, will replace it or 
+refund the money paid by Client for the Software.  To the maximum extent permitted by applicable law, 
+Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential 
+damages, including lost profits or lost savings arising out of the use or inability to use the Software, 
+even if Red Hat or such dealer has been advised of the possibility of such damages.  In no event shall 
+Red Hat's liability under this agreement exceed the amount that Client paid to Red Hat under this 
+Agreement during the twelve months preceding the action.
+
+5.  Export Control.  As required by U.S. law, Client represents and warrants that it: 
+(a) understands that the Software Packages are subject to export controls under the 
+U.S. Commerce Department's Export Administration Regulations ("EAR"); 
+
+(b) is not located in a prohibited destination country under the EAR or U.S. sanctions regulations 
+(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria); 
+
+(c) will not export, re-export, or transfer the Software Packages to any prohibited destination, entity, 
+or individual without the necessary export license(s) or authorizations(s) from the U.S. Government; 
+
+(d) will not use or transfer the Software Packages for use in any sensitive nuclear, chemical or 
+biological weapons, or missile technology end-uses unless authorized by the U.S. Government by 
+regulation or specific license; 
+
+(e) understands and agrees that if it is in the United States and exports or transfers the Software 
+Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit semi-annual 
+reports to the Commerce Department's Bureau of Industry & Security (BIS), which include the name and 
+address (including country) of each transferee; 
+
+and (f) understands that countries other than the United States may restrict the import, use, or 
+export of encryption products and that it shall be solely responsible for compliance with any such 
+import, use, or export restrictions.
+
+6.  Third Party Programs. Red Hat may distribute third party software programs with the Software Packages 
+that are not part of the Software Packages and which Client must install separately.  These third party 
+programs are subject to their own license terms.  The license terms either accompany the programs or 
+can be viewed at http://www.redhat.com/licenses/.  If Client does not agree to abide by the applicable 
+license terms for such programs, then Client may not install them.  If Client wishes to install the programs 
+on more than one system or transfer the programs to another party, then Client must contact the licensor 
+of the programs.
+
+7.  General.  If any provision of this agreement is held to be unenforceable, that shall not affect the 
+enforceability of the remaining provisions.  This License Agreement shall be governed by the laws of the 
+State of North Carolina and of the United States, without regard to any conflict of laws provisions, 
+except that the United Nations Convention on the International Sale of Goods shall not apply.
+
+Copyright 2006 Red Hat, Inc.  All rights reserved.  
+"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.  
+All other trademarks are the property of their respective owners. 
+
+	Page 1 of 1	18 October 2006
+


Property changes on: projects/spi/trunk/src/main/etc/JBossORG-EULA.txt
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/etc/ant-import/build-release.xml
===================================================================
--- projects/spi/trunk/src/main/etc/ant-import/build-release.xml	                        (rev 0)
+++ projects/spi/trunk/src/main/etc/ant-import/build-release.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,37 @@
+<?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$ -->
+
+<project default="release" name="JBossWS Release">
+
+  <!-- Release to jboss.local.repository -->
+  <target name="release" depends="spi-jars" 
+    description="Release to jboss.local.repository">
+
+    <!-- jboss/jbossws-spi -->
+    <property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
+    <mkdir dir="${jboss.repository.dir}/jbossws/${repository.id}/lib"/>
+    <copy todir="${jboss.repository.dir}/jbossws-spi/${repository.id}/lib" overwrite="true">
+      <fileset dir="${spi.output.lib.dir}">
+        <include name="jbossws-spi.jar"/>
+        <include name="jbossws-spi-src.zip"/>
+      </fileset>
+    </copy>
+    <copy tofile="${jboss.repository.dir}/jbossws-spi/${repository.id}/component-info.xml" file="${spi.etc.dir}/component-info.xml" filtering="true" overwrite="true">
+      <filterset>
+        <filtersfile file="${basedir}/version.properties"/>
+      </filterset>
+    </copy>
+    
+  </target>
+
+</project>


Property changes on: projects/spi/trunk/src/main/etc/ant-import/build-release.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/etc/ant-import/build-thirdparty.xml
===================================================================
--- projects/spi/trunk/src/main/etc/ant-import/build-thirdparty.xml	                        (rev 0)
+++ projects/spi/trunk/src/main/etc/ant-import/build-thirdparty.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,55 @@
+<?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$ -->
+
+<project default="thirdparty" name="JBossWS-Thirdparty">
+
+  <!-- ========= -->
+  <!-- Libraries -->
+  <!-- ========= -->
+
+  <target name="thirdparty" depends="thirdparty-get,thirdparty-classpath">
+  </target>
+  
+  <target name="thirdparty-get" if="force.thirdparty.get" 
+    description="Gets the thirdparty libraries">
+
+    <mkdir dir="${thirdparty.dir}"/>
+    <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar" dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar" dest="${thirdparty.dir}/jboss-common-core-sources.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar" dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar" dest="${thirdparty.dir}/jboss-logging-spi.jar" 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"/>
+    <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar" dest="${thirdparty.dir}/jboss-xml-binding-sources.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar" dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency-src.zip" dest="${thirdparty.dir}/jboss-dependency-src.zip" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers.jar" dest="${thirdparty.dir}/jboss-deployers.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers-src.zip" dest="${thirdparty.dir}/jboss-deployers-src.zip" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar" dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip" dest="${thirdparty.dir}/jboss-microcontainer-src.zip" usetimestamp="true" verbose="true"/>
+  </target>
+  
+  <target name="thirdparty-classpath" >
+    
+    <!-- The compile classpath for jbossws core -->
+    <path id="core.classpath">
+      <pathelement location="${thirdparty.dir}/jboss-common-core.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-logging-spi.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
+      <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
+    </path>
+
+  </target>
+
+</project>


Property changes on: projects/spi/trunk/src/main/etc/ant-import/build-thirdparty.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/etc/component-info.xml
===================================================================
--- projects/spi/trunk/src/main/etc/component-info.xml	                        (rev 0)
+++ projects/spi/trunk/src/main/etc/component-info.xml	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,23 @@
+<project name="jboss/jbossws">
+  
+  <component id="jboss/jbossws-spi" 
+    description="JBossWS SPI"
+    version="@repository.id@" 
+    licenseType="lgpl">
+    
+    <artifact id="jbossws-spi.jar"/>
+
+    <import componentref="jboss/jbossxb">
+      <compatible version="@jboss-jbossxb@"/>
+    </import>
+    <import componentref="jboss/microcontainer">
+      <compatible version="@jboss-microcontainer@"/>
+    </import>
+    
+    <export>
+      <include input="jbossws-spi.jar"/>
+    </export>
+    
+  </component>
+  
+</project>


Property changes on: projects/spi/trunk/src/main/etc/component-info.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/etc/default.mf
===================================================================
--- projects/spi/trunk/src/main/etc/default.mf	                        (rev 0)
+++ projects/spi/trunk/src/main/etc/default.mf	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+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=@build.id@)
+Implementation-Vendor: @implementation.vendor@
+Implementation-Vendor-Id: @implementation.vendor.id@

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/Endpoint.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/Endpoint.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/Endpoint.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,131 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.invocation.InvocationHandler;
+
+/**
+ * A general JAXWS endpoint.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface Endpoint
+{
+   static final String SEPID_DOMAIN = "jboss.ws";
+   static final String SEPID_PROPERTY_CONTEXT = "context";
+   static final String SEPID_PROPERTY_ENDPOINT = "endpoint";
+
+   static final String SEPID_DOMAIN_ENDPOINT = SEPID_DOMAIN + "." + SEPID_PROPERTY_ENDPOINT;
+
+   public enum EndpointState
+   {
+      UNDEFINED, CREATED, STARTED, STOPED, DESTROYED
+   };
+
+   /** Get the service this endpoint belongs to */
+   Service getService();
+
+   /** Set the service this endpoint belongs to */
+   void setService(Service service);
+
+   /** Get the unique identifier for this endpoint */
+   ObjectName getName();
+
+   /** Set the unique identifier for this endpoint */
+   void setName(ObjectName epName);
+
+   /** Get the current state for this endpoint */
+   EndpointState getState();
+
+   /** Set the current state for this endpoint */
+   void setState(EndpointState state);
+
+   /** Get the endpoint implementation bean */
+   Class getEndpointImpl();
+
+   /** Set the endpoint implementation bean */
+   void setEndpointImpl(Class epImpl);
+
+   /** Set the request handler for this endpoint */
+   void setRequestHandler(RequestHandler handler);
+
+   /** Get the request handler for this endpoint */
+   RequestHandler getRequestHandler();
+
+   /** Get the lifecycle handler for this endpoint */
+   LifecycleHandler getLifecycleHandler();
+
+   /** Set the lifecycle handler for this endpoint */
+   void setLifecycleHandler(LifecycleHandler handler);
+
+   /** Get the endpoint bean invoker */
+   InvocationHandler getInvocationHandler();
+
+   /** Set the endpoint bean invoker */
+   void setInvocationHandler(InvocationHandler invoker);
+
+   /** Add arbitrary meta data */
+   <T> T addMetaData(Class<T> key, Object value);
+
+   /** Get arbitrary meta data */
+   <T> T getMetaData(Class<T> key);
+
+   /** Remove arbitrary meta data */
+   <T> T removeMetaData(Class<T> key);
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/Endpoint.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,68 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+/**
+ * A general endpoint handler.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface EndpointHandler
+{
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,173 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.invocation.InvocationHandler;
+
+/**
+ * A general JAXWS endpoint.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class EndpointImpl implements Endpoint
+{
+   private Service service;
+   private ObjectName name;
+   private Class endpointImpl;
+   private EndpointState state;
+   private RequestHandler requestHandler;
+   private InvocationHandler invocationHandler;
+   private LifecycleHandler lifecycleHandler;
+   private Map<Class, Object> metaData = new HashMap<Class, Object>();
+
+   public EndpointImpl(Service service, Class impl)
+   {
+      this.service = service;
+      this.endpointImpl = impl;
+      this.state = EndpointState.UNDEFINED;
+   }
+
+   public Service getService()
+   {
+      return service;
+   }
+
+   public void setService(Service service)
+   {
+      this.service = service;
+   }
+
+   public Class getEndpointImpl()
+   {
+      return endpointImpl;
+   }
+
+   public void setEndpointImpl(Class endpointImpl)
+   {
+      this.endpointImpl = endpointImpl;
+   }
+
+   public EndpointState getState()
+   {
+      return state;
+   }
+
+   public void setState(EndpointState state)
+   {
+      this.state = state;
+   }
+
+   public ObjectName getName()
+   {
+      return name;
+   }
+
+   public void setName(ObjectName name)
+   {
+      this.name = name;
+   }
+
+   public RequestHandler getRequestHandler()
+   {
+      return requestHandler;
+   }
+
+   public void setRequestHandler(RequestHandler handler)
+   {
+      this.requestHandler = handler;
+   }
+
+   public LifecycleHandler getLifecycleHandler()
+   {
+      return lifecycleHandler;
+   }
+
+   public void setLifecycleHandler(LifecycleHandler handler)
+   {
+      this.lifecycleHandler = handler;
+   }
+
+   public InvocationHandler getInvocationHandler()
+   {
+      return invocationHandler;
+   }
+
+   public void setInvocationHandler(InvocationHandler handler)
+   {
+      this.invocationHandler = handler;
+   }
+
+   public <T> T addMetaData(Class<T> key, Object value)
+   {
+      return (T)metaData.put(key, value);
+   }
+
+   public <T> T getMetaData(Class<T> key)
+   {
+      return (T)metaData.get(key);
+   }
+
+   public <T> T removeMetaData(Class<T> key)
+   {
+      return (T)metaData.get(key);
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/KernelLocator.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/KernelLocator.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/KernelLocator.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+
+/**
+ * Locate the single instance of the kernel 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class KernelLocator 
+{
+   private static Kernel kernel;
+
+   public static Kernel getKernel()
+   {
+      return KernelLocator.kernel;
+   }
+
+   public void setKernel(Kernel kernel)
+   {
+      KernelLocator.kernel = kernel;
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/KernelLocator.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,77 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+/**
+ * Handles endpoint Lifecycle events
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface LifecycleHandler extends EndpointHandler
+{
+   /** Handle the create step of an endpoint */ 
+   void create(Endpoint endpoint);
+   
+   /** Handle the start step of an endpoint */ 
+   void start(Endpoint endpoint);
+
+   /** Handle the stop step of an endpoint */ 
+   void stop(Endpoint endpoint);
+
+   /** Handle the destroy step of an endpoint */ 
+   void destroy(Endpoint endpoint);
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.Endpoint.EndpointState;
+import org.jboss.ws.integration.invocation.InvocationHandler;
+
+/**
+ * A basic lifecycle handler
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 31-Oct-2006
+ */
+public class LifecycleHandlerImpl implements LifecycleHandler
+{
+   // provide logging
+   protected final Logger log = Logger.getLogger(getClass());
+
+   public void create(Endpoint endpoint)
+   {
+      log.debug("Create: " + endpoint.getName());
+
+      // Initialize the invoker
+      InvocationHandler invoker = endpoint.getInvocationHandler();
+      invoker.init(endpoint);
+
+      endpoint.setState(EndpointState.CREATED);
+   }
+
+   public void start(Endpoint endpoint)
+   {
+      log.debug("Start: " + endpoint.getName());
+
+      EndpointState state = endpoint.getState();
+      if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
+         throw new IllegalStateException("Cannot start endpoint in state: " + state);
+
+      endpoint.setState(EndpointState.STARTED);
+   }
+
+   public void stop(Endpoint endpoint)
+   {
+      log.debug("Stop: " + endpoint.getName());
+
+      EndpointState state = endpoint.getState();
+      if (state != EndpointState.STARTED)
+         throw new IllegalStateException("Cannot stop endpoint in state: " + state);
+
+      endpoint.setState(EndpointState.STOPED);
+   }
+
+   public void destroy(Endpoint endpoint)
+   {
+      log.debug("Destroy: " + endpoint.getName());
+      endpoint.setState(EndpointState.DESTROYED);
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration;
+
+import java.util.Hashtable;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+/**
+ * A simple factory for creating safe object names.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-May-2006
+ */
+public class ObjectNameFactory
+{
+   public static ObjectName create(String name)
+   {
+      try
+      {
+         return new ObjectName(name);
+      }
+      catch (MalformedObjectNameException e)
+      {
+         throw new Error("Invalid ObjectName: " + name + "; " + e);
+      }
+   }
+
+   public static ObjectName create(String domain, String key, String value)
+   {
+      try
+      {
+         return new ObjectName(domain, key, value);
+      }
+      catch (MalformedObjectNameException e)
+      {
+         throw new Error("Invalid ObjectName: " + domain + "," + key + "," + value + "; " + e);
+      }
+   }
+
+   public static ObjectName create(String domain, Hashtable table)
+   {
+      try
+      {
+         return new ObjectName(domain, table);
+      }
+      catch (MalformedObjectNameException e)
+      {
+         throw new Error("Invalid ObjectName: " + domain + "," + table + "; " + e);
+      }
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,78 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.jboss.ws.integration.invocation.InvocationContext;
+
+/**
+ * A general JAXWS request handler.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface RequestHandler extends EndpointHandler
+{
+   /** Handle a web service request */
+   void handleRequest(Endpoint endpoint, InputStream inputStream, OutputStream outputStream, InvocationContext context);
+   
+   /** Handle a wsdl request */
+   void handleWSDLRequest(Endpoint endpoint, OutputStream output, InvocationContext context);
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration;
+
+// $Id$
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+
+/**
+ * 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 at 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;
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/Service.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/Service.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/Service.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,85 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.util.List;
+
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A general service deployment.
+ * 
+ * Maintains a named set of EndpointDeployments 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface Service
+{
+   /** Get the deployment this service belongs to */
+   Deployment getDeployment();
+   
+   /** Set the deployment this service belongs to */
+   void setDeployment(Deployment dep);
+   
+   /** Add an endpoint to the service */
+   void addEndpoint(Endpoint endpoint);
+   
+   /** Get the list of endpoints */
+   List<Endpoint> getEndpoints();
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/Service.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,103 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A general service.
+ * 
+ * Maintains a named set of Endpoints 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class ServiceImpl implements Service
+{
+   private Deployment unit;
+   private List<Endpoint> endpoints = new LinkedList<Endpoint>();
+
+   public ServiceImpl(Deployment unit)
+   {
+      this.unit = unit;
+      this.unit.setService(this);
+   }
+
+   public Deployment getDeployment()
+   {
+      return unit;
+   }
+
+   public void setDeployment(Deployment unit)
+   {
+      this.unit = unit;
+   }
+   
+   public void addEndpoint(Endpoint endpoint)
+   {
+      endpoints.add(endpoint);
+   }
+
+   public List<Endpoint> getEndpoints()
+   {
+      return endpoints;
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefElement.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefElement.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefElement.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration;
+
+// $Id$
+
+import java.io.Serializable;
+
+/**
+ * A marker for all <service-ref> related objects.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-Mar-2007
+ */
+public abstract class ServiceRefElement implements Serializable
+{
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefElement.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * An implementation of this interface handles all service-ref binding concerns 
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2004
+ */
+public interface ServiceRefHandler
+{
+   String BEAN_NAME = "ServiceRefHandler";
+   
+   ServiceRefMetaData newServiceRefMetaData();
+
+   Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs);
+
+   void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value);
+   
+   void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException;
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -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.ws.integration;
+
+// $Id$
+
+import java.io.Serializable;
+
+import org.w3c.dom.Element;
+
+/**
+ * An abstract service-ref meta data object.
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-Mar-2007
+ */
+public abstract class ServiceRefMetaData extends ServiceRefElement implements Serializable
+{
+   public abstract String getServiceRefName();
+
+   public abstract void setServiceRefName(String name);
+   
+   public abstract Object getAnnotatedElement();
+
+   public abstract void setAnnotatedElement(Object anElement);
+
+   public abstract boolean isProcessed();
+
+   public abstract void setProcessed(boolean flag);
+   
+   public abstract void importStandardXml(Element element);
+
+   public abstract void importJBossXml(Element element);
+
+   public abstract void merge(ServiceRefMetaData targetRef);
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+/**
+ * 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 at 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)
+      {
+         ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+         loader = new URLClassLoader(new URL[]{rootURL}, ctxLoader);
+      }
+      return loader;
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+
+/**
+ * An adaptor to a VirtualFile from jboss-vfs.jar
+ * jboss-vfs cannot be used in jboss-4.x because of its dependeny on jboss-common-core.jar
+ *  
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public interface UnifiedVirtualFile extends Serializable
+{
+   UnifiedVirtualFile findChild(String child) throws IOException;
+
+   URL toURL();
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,89 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+
+/**
+ * An abstract deployer that does nothing.
+ * Overwrite the deployer methods appropriately. 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public abstract class AbstractDeployer implements Deployer
+{
+   // provide logging
+   protected final Logger log = Logger.getLogger(getClass());
+   
+   public void create(Deployment dep)
+   {
+   }
+
+   public void destroy(Deployment dep)
+   {
+   }
+
+   public void start(Deployment dep)
+   {
+   }
+
+   public void stop(Deployment dep)
+   {
+   }
+}
\ No newline at end of file


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployer.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployer.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,76 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+// $Id$
+
+/**
+ * A general web service deployer.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface Deployer
+{
+   void create (Deployment dep);
+   
+   void start (Deployment dep);
+   
+   void stop (Deployment dep);
+   
+   void destroy (Deployment dep);
+}
+


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManager.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManager.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManager.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,81 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+// $Id$
+
+import java.util.List;
+
+/**
+ * A general service deployment manger.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface DeployerManager
+{
+   /** Get the list of registered deployers */
+   List<Deployer> getDeployers();
+   
+   /** Set the list of registered deployers */
+   void setDeployers(List<Deployer> deployers);
+   
+   /** Deploy a web service */
+   void deploy(Deployment dep);
+   
+   /** Undeploy a web service */
+   void undeploy(Deployment dep);
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManager.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,184 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+// $Id$
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentState;
+
+/**
+ * A general service deployment manger.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class DeployerManagerImpl implements DeployerManager
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(DeployerManagerImpl.class);
+   
+   
+   private List<Deployer> deployers = new LinkedList<Deployer>();
+
+   public List<Deployer> getDeployers()
+   {
+      return deployers;
+   }
+
+   public void setDeployers(List<Deployer> deployers)
+   {
+      this.deployers = deployers;
+   }
+
+   /**
+    * Iterate over the registered deployers calls create on each.
+    * Iterate over the registered deployers again and calls start on each.
+    * If start fails it automaticall calls destroy in the reverse order 
+    * starting with the deployer that failed
+    */
+   public void deploy(Deployment dep)
+   {
+      // create the deployment
+      for (int i = 0; i < deployers.size(); i++)
+      {
+         Deployer deployer = deployers.get(i);
+         logInvocation(deployer, "Create");
+         deployer.create(dep);
+      }
+      
+      dep.setState(DeploymentState.CREATED);
+
+      // start the deployment
+      for (int i = 0; i < deployers.size(); i++)
+      {
+         Deployer deployer = deployers.get(i);
+         try
+         {
+            logInvocation(deployer, "Start");
+            deployer.start(dep);
+         }
+         catch (RuntimeException rte)
+         {
+            while (i-- >= 0)
+            {
+               // destroy the deployment
+               failsafeDestroy(deployer, dep);
+            }
+            throw rte;
+         }
+      }
+      
+      dep.setState(DeploymentState.STARTED);
+   }
+
+   public void undeploy(Deployment dep)
+   {
+      // stop the deployment
+      for (int i = deployers.size(); 0 < i; i--)
+      {
+         Deployer deployer = deployers.get(i - 1);
+         failsafeStop(deployer, dep);
+      }
+      
+      dep.setState(DeploymentState.STOPED);
+      
+      // destroy the deployment
+      for (int i = deployers.size(); 0 < i; i--)
+      {
+         Deployer deployer = deployers.get(i - 1);
+         failsafeDestroy(deployer, dep);
+      }
+
+      dep.setState(DeploymentState.DESTROYED);
+   }
+
+   private void failsafeStop(Deployer deployer, Deployment dep)
+   {
+      try
+      {
+         logInvocation(deployer, "Stop");
+         deployer.stop(dep);
+      }
+      catch (RuntimeException rte)
+      {
+         WSDeploymentException.rethrow(rte);
+      }
+   }
+
+   private void failsafeDestroy(Deployer deployer, Deployment dep)
+   {
+      try
+      {
+         logInvocation(deployer, "Destroy");
+         deployer.destroy(dep);
+      }
+      catch (RuntimeException rte)
+      {
+         WSDeploymentException.rethrow(rte);
+      }
+   }
+
+   private void logInvocation(Deployer deployer, String method)
+   {
+      String name = deployer.getClass().getName();
+      name = name.substring(name.lastIndexOf(".") + 1);
+      log.debug(name + ":" + method);
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployment.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployment.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployment.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,101 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+// $Id$
+
+import org.jboss.ws.integration.Service;
+
+/**
+ * A general web service deployment dep. 
+ * 
+ * It has no notion of J2EE deployment packages. 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface Deployment
+{
+   public enum DeploymentType
+   {
+      JAXRPC_CLIENT, JAXRPC_JSE, JAXRPC_EJB21, JAXRPC_EJB3, JAXWS_JSE, JAXWS_EJB3
+   };
+   
+   public enum DeploymentState
+   {
+      UNDEFINED, CREATED, STARTED, STOPED, DESTROYED
+   };
+   
+   ClassLoader getClassLoader();
+   
+   void setClassLoader(ClassLoader loader);
+   
+   DeploymentContext getContext();
+   
+   void setContext(DeploymentContext context);
+   
+   DeploymentType getType();
+   
+   void setType(DeploymentType type);
+   
+   DeploymentState getState();
+   
+   void setState(DeploymentState type);
+
+   Service getService();
+
+   void setService(Service service);
+}
\ No newline at end of file


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/Deployment.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContext.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContext.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContext.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,8 @@
+package org.jboss.ws.integration.deployment;
+
+public interface DeploymentContext
+{
+   <T> T getAttachment(Class<T> clazz);
+
+   <T> T addAttachment(Class<T> clazz, Object obj);
+}
\ No newline at end of file


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContext.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,82 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+//$Id$
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A general web service deployment context. 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class DeploymentContextImpl implements DeploymentContext
+{
+   private Map<Class, Object> attachments = new HashMap<Class, Object>();
+   
+   public <T> T getAttachment(Class<T> clazz)
+   {
+      return (T)attachments.get(clazz);
+   }
+   
+   public <T> T addAttachment(Class<T> clazz, Object obj)
+   {
+      return (T)attachments.put(clazz, obj);
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,140 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+//$Id$
+
+import org.jboss.ws.integration.ServiceImpl;
+import org.jboss.ws.integration.Service;
+
+/**
+ * A general web service deployment dep. 
+ * 
+ * It has no notion of J2EE deployment packages. 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class DeploymentImpl implements Deployment
+{
+   // The context for this deployment dep
+   private DeploymentContext context;
+   // A deployment has one service
+   private Service service;
+   // The type of this deployment
+   private DeploymentType type;
+   // The state for this deployment
+   private DeploymentState state;
+   // The deployment class loader
+   private ClassLoader classLoader;
+
+   public DeploymentImpl()
+   {
+      context = new DeploymentContextImpl();
+      service = new ServiceImpl(this);
+      state = DeploymentState.UNDEFINED;
+   }
+
+   public DeploymentContext getContext()
+   {
+      return context;
+   }
+
+   public void setContext(DeploymentContext context)
+   {
+      this.context = context;
+   }
+
+   public void setClassLoader(ClassLoader loader)
+   {
+      this.classLoader = loader;
+   }
+   
+   public ClassLoader getClassLoader()
+   {
+      return classLoader;
+   }
+   
+   public Service getService()
+   {
+      return service;
+   }
+
+   public void setService(Service service)
+   {
+      this.service = service;
+   }
+
+   public DeploymentState getState()
+   {
+      return state;
+   }
+
+   public void setState(DeploymentState deploymentState)
+   {
+      this.state = deploymentState;
+   }
+
+   public DeploymentType getType()
+   {
+      return type;
+   }
+
+   public void setType(DeploymentType deploymentType)
+   {
+      this.type = deploymentType;
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/EndpointRegistryDeployer.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/EndpointRegistryDeployer.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/EndpointRegistryDeployer.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,87 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.management.EndpointRegistry;
+import org.jboss.ws.integration.management.EndpointRegistryFactory;
+
+/**
+ * A deployer that registers the endpoints 
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class EndpointRegistryDeployer extends AbstractDeployer
+{
+   public void create(Deployment dep)
+   {
+      EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
+      for (Endpoint ep : dep.getService().getEndpoints())
+      {
+         registry.register(ep);
+      }
+   }
+
+   public void destroy(Deployment dep)
+   {
+      EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
+      for (Endpoint ep : dep.getService().getEndpoints())
+      {
+         registry.unregister(ep);
+      }
+   }
+}
\ No newline at end of file


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/EndpointRegistryDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/WSDeploymentException.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/WSDeploymentException.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/WSDeploymentException.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,90 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+// $Id$
+
+/**
+ * A general deployment exception
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class WSDeploymentException extends RuntimeException
+{
+   public WSDeploymentException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   public WSDeploymentException(String message)
+   {
+      super(message);
+   }
+
+   public WSDeploymentException(Throwable cause)
+   {
+      super(cause);
+   }
+
+   public static void rethrow(Throwable cause)
+   {
+      if (cause instanceof WSDeploymentException)
+         throw (WSDeploymentException)cause;
+
+      throw new WSDeploymentException(cause);
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/deployment/WSDeploymentException.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationContext.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationContext.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationContext.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,68 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.invocation;
+
+//$Id$
+
+/**
+ * A general endpoint invocation context.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface InvocationContext
+{
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationContext.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationHandler.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationHandler.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationHandler.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,75 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.invocation;
+
+//$Id$
+
+import org.jboss.ws.integration.Endpoint;
+
+/**
+ * A general endpoint invoker.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface InvocationHandler
+{
+   /** Initialize the invocation handler */
+   void init(Endpoint endpoint);
+   
+   /** Invoke the the service endpoint */
+   void invoke(InvocationContext reqContext) throws Exception;
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/invocation/InvocationHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,91 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.management;
+
+// $Id$
+
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.Endpoint;
+
+/**
+ * A general endpoint registry.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public interface EndpointRegistry
+{
+   /** The bean name in the kernel registry */
+   static String BEAN_NAME = "WSEndpointRegistry";
+
+   /** Get the list of registered endpoints */
+   Set<ObjectName> getEndpoints();
+
+   /** Get the registered endpoint */
+   Endpoint getEndpoint(ObjectName epName);
+   
+   /** True is an endpoint for that name is registered */
+   boolean isRegistered(ObjectName epName);
+   
+   /** Register an endpoint */
+   void register(Endpoint endpoint);
+   
+   /** Unregister an endpoint */
+   void unregister(Endpoint endpoint);
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,86 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.management;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.ws.integration.KernelLocator;
+
+/**
+ * Get the endpoint registry from the kernel
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class EndpointRegistryFactory
+{
+   private static EndpointRegistry epRegistry;
+
+   public static EndpointRegistry getEndpointRegistry()
+   {
+      if (epRegistry == null)
+      {
+         Kernel kernel = KernelLocator.getKernel();
+         KernelRegistry registry = kernel.getRegistry();
+         KernelRegistryEntry entry = registry.getEntry(EndpointRegistry.BEAN_NAME);
+         epRegistry = (EndpointRegistry)entry.getTarget();
+      }
+      return epRegistry;
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,135 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights 
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.management;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.Endpoint;
+
+/**
+ * A general endpoint registry.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007 
+ */
+public class EndpointRegistryImpl implements EndpointRegistry
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(EndpointRegistryImpl.class);
+   
+   private Map<ObjectName, Endpoint> endpoints = new HashMap<ObjectName, Endpoint>();
+
+   public Endpoint getEndpoint(ObjectName epName)
+   {
+      if (epName == null)
+         throw new IllegalArgumentException("Endpoint name cannot be null");
+      
+      if (isRegistered(epName) == false)
+         throw new IllegalStateException("Endpoint not registered: " + epName);
+      
+      Endpoint endpoint = endpoints.get(epName);
+      return endpoint;
+   }
+
+   public boolean isRegistered(ObjectName epName)
+   {
+      if (epName == null)
+         throw new IllegalArgumentException("Endpoint name cannot be null");
+      
+      return endpoints.get(epName) != null;
+   }
+
+   public Set<ObjectName> getEndpoints()
+   {
+      return endpoints.keySet();
+   }
+
+   public void register(Endpoint endpoint)
+   {
+      if (endpoint == null)
+         throw new IllegalArgumentException("Endpoint cannot be null");
+      
+      ObjectName epName = endpoint.getName();
+      if (epName == null)
+         throw new IllegalStateException("Endpoint name cannot be null for: " + endpoint);
+      
+      if (isRegistered(epName))
+         throw new IllegalStateException("Endpoint already registered: " + epName);
+      
+      log.info("register: " + epName);
+      endpoints.put(epName, endpoint);
+   }
+
+   public void unregister(Endpoint endpoint)
+   {
+      if (endpoint == null)
+         throw new IllegalArgumentException("Endpoint cannot be null");
+      
+      ObjectName epName = endpoint.getName();
+      if (isRegistered(epName) == false)
+         throw new IllegalStateException("Endpoint not registered: " + epName);
+      
+      log.info("remove: " + epName);
+      endpoints.remove(epName);
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.management;
+
+// $Id$
+
+import java.io.File;
+
+/**
+ * Interface to container independent config 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-May-2006
+ */
+public interface ServerConfig
+{
+   // The host name that is returned if there is no other defined
+   static String UNDEFINED_HOSTNAME = "jbossws.undefined.host";
+   
+   // The default bean name
+   static final String BEAN_NAME = "WSServerConfig";
+
+   File getServerTempDir();
+
+   File getServerDataDir();
+
+   String getWebServiceHost();
+   
+   int getWebServicePort();
+   
+   int getWebServiceSecurePort();
+
+   boolean isModifySOAPAddress();
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigFactory.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigFactory.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigFactory.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.management;
+
+import org.jboss.ws.integration.KernelLocator;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.logging.Logger;
+
+// $Id$
+
+/**
+ * Factory to container independent config 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-May-2006
+ */
+public class ServerConfigFactory
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(ServerConfigFactory.class);
+
+   private static ServerConfigFactory instance = new ServerConfigFactory();
+
+   // Hide ctor
+   protected ServerConfigFactory()
+   {
+   }
+
+   public static ServerConfigFactory getInstance()
+   {
+      return instance;
+   }
+
+   public ServerConfig getServerConfig()
+   {
+      KernelRegistry registry = KernelLocator.getKernel().getRegistry();
+      return (ServerConfig)registry.getEntry(ServerConfig.BEAN_NAME).getTarget();
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigFactory.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java
===================================================================
--- projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java	                        (rev 0)
+++ projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,218 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.management;
+
+//$Id$
+
+import java.io.File;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.ObjectNameFactory;
+
+/**
+ * JBoss specific implementation of a ServerConfig 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author darran.lofthouse at jboss.com
+ * @since 08-May-2006
+ */
+public class ServerConfigImpl implements ServerConfig
+{
+   private static final Logger log = Logger.getLogger(ServerConfigImpl.class);
+
+   // The webservice host name that will be used when updating the wsdl
+   private String webServiceHost = UNDEFINED_HOSTNAME;
+   // The webservice port that will be used when updating the wsdl
+   private int webServicePort;
+   // The webservice port that will be used when updating the wsdl
+   private int webServiceSecurePort;
+   // Whether we should always modify the soap address to the deployed endpoing location
+   private boolean modifySOAPAddress;
+   // The MBeanServer
+   private MBeanServer server;
+
+   public String getWebServiceHost()
+   {
+      return webServiceHost;
+   }
+
+   public void setWebServiceHost(String host) throws UnknownHostException
+   {
+      if (host == null || host.trim().length() == 0)
+      {
+         log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
+         host = UNDEFINED_HOSTNAME;
+      }
+      if ("0.0.0.0".equals(host))
+      {
+         InetAddress localHost = InetAddress.getLocalHost();
+         log.debug("Using local host: " + localHost.getHostName());
+         host = localHost.getHostName();
+      }
+      this.webServiceHost = host;
+   }
+
+   public void setWebServicePort(int port)
+   {
+      this.webServicePort = port;
+   }
+
+   public void setWebServiceSecurePort(int port)
+   {
+      this.webServiceSecurePort = port;
+   }
+
+   public boolean isModifySOAPAddress()
+   {
+      return modifySOAPAddress;
+   }
+
+   public void setModifySOAPAddress(boolean modify)
+   {
+      this.modifySOAPAddress = modify;
+   }
+
+   public File getServerTempDir()
+   {
+      try
+      {
+         MBeanServer server = getMBeanServer();
+         ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+         File tmpdir = (File)server.getAttribute(oname, "ServerTempDir");
+         return tmpdir;
+      }
+      catch (JMException e)
+      {
+         return null;
+      }
+   }
+
+   public File getServerDataDir()
+   {
+      try
+      {
+         MBeanServer server = getMBeanServer();
+         ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+         File tmpdir = (File)server.getAttribute(oname, "ServerDataDir");
+         return tmpdir;
+      }
+      catch (JMException e)
+      {
+         return null;
+      }
+   }
+
+   public int getWebServicePort()
+   {
+      if (webServicePort <= 0)
+         webServicePort = getConnectorPort("HTTP/1.1", false);
+
+      if (webServicePort <= 0)
+      {
+         log.warn("Unable to calculate 'WebServicePort', using default '8080'");
+         webServicePort = 8080;
+      }
+
+      return webServicePort;
+   }
+
+   public int getWebServiceSecurePort()
+   {
+      if (webServiceSecurePort <= 0)
+         webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
+
+      if (webServiceSecurePort <= 0)
+      {
+         log.warn("Unable to calculate 'WebServiceSecurePort', using default '8443'");
+         webServiceSecurePort = 8443;
+      }
+
+      return webServiceSecurePort;
+   }
+
+   private int getConnectorPort(final String protocol, final boolean secure)
+   {
+      int port = -1;
+
+      try
+      {
+         MBeanServer server = getMBeanServer();
+         ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
+
+         Set connectorNames = server.queryNames(connectors, null);
+         for (Object current : connectorNames)
+         {
+            ObjectName currentName = (ObjectName)current;
+
+            try
+            {
+               int connectorPort = (Integer)server.getAttribute(currentName, "port");
+               boolean connectorSecure = (Boolean)server.getAttribute(currentName, "secure");
+               String connectorProtocol = (String)server.getAttribute(currentName, "protocol");
+
+               if (protocol.equals(connectorProtocol) && secure == connectorSecure)
+               {
+                  if (port > -1)
+                  {
+                     log.warn("Found multiple connectors for protocol='" + protocol + "' and secure='" + secure + "', using first port found '" + port + "'");
+                  }
+                  else
+                  {
+                     port = connectorPort;
+                  }
+               }
+            }
+            catch (AttributeNotFoundException ignored)
+            {
+            }
+         }
+
+         return port;
+      }
+      catch (JMException e)
+      {
+         return -1;
+      }
+   }
+
+   private MBeanServer getMBeanServer()
+   {
+      if (server == null)
+      {
+         for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator(); i.hasNext();)
+         {
+            server = (MBeanServer)i.next();
+         }
+      }
+      return server;
+   }
+}


Property changes on: projects/spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/spi/trunk/version.properties
===================================================================
--- projects/spi/trunk/version.properties	                        (rev 0)
+++ projects/spi/trunk/version.properties	2007-05-09 11:11:25 UTC (rev 62942)
@@ -0,0 +1,75 @@
+
+# $Id: version.properties 2928 2007-04-26 10:53:56Z thomas.diesler at jboss.com $
+
+specification.title=JBossWS-SPI
+specification.vendor=JBoss (http://www.jboss.org)
+specification.version=jbossws-spi-2.1
+
+version.id=2.1.0.DEV
+repository.id=SNAPSHOT
+
+implementation.title=JBoss Web Services SPI (JBossWS-SPI)
+implementation.url=http://www.jboss.org/products/jbossws
+implementation.vendor=JBoss Inc.
+implementation.vendor.id=http://www.jboss.org
+
+
+# Thirdparty library versions
+jboss-common-core=2.0.2.GA
+jboss-common-logging-log4j=2.0.2.GA
+jboss-common-logging-spi=2.0.2.GA
+jboss-jbossxb=1.0.0.CR10
+jboss-microcontainer=2.0.0.Beta3
+
+
+
+
+
+
+
+
+
+
+
+
+apache-xmlsec=1.3.0
+ibm-wsdl4j=1.6.2
+javassist=3.5.0.CR1
+jbossws-wsconsume-impl=2.0.0
+jbpm-bpel=1.1.0.Beta5
+sun-jaxb=2.0.3jboss
+stax-api=1.0
+
+# Build and Tomcat
+jboss-jbossxb=1.0.0.CR10
+jboss-remoting=2.0.0.GA
+
+# thirdparty library versions
+apache-ant=1.6.5
+apache-collections=3.1
+apache-log4j=1.2.8
+apache-logging=1.1.0.jboss
+apache-tomcat=5.5.20
+apache-xalan=j_2.7.0
+apache-xerces=2.9.0
+dom4j=1.6.1
+eclipse-compiler=3.2.2
+gnu-getopt=1.0.10
+hibernate=3.2.1.GA
+jaxen=1.1-beta-10
+jboss-backport-concurrent=2.1.0.GA
+jboss-ejb3=1.0.0.CR9-jboss4.0.5
+jboss-jaxr=1.2.0.GA
+jboss-jbossretro=1.0.4.GA
+jboss-security=4.0.5.GA
+jboss-vfs=2.0.0.Beta2
+jbossas-core-libs=4.0.5.GA
+junit=3.8.1
+qdox=1.4
+sun-hudson=1.93
+sun-jaf=1.1
+sun-javamail=1.4
+sun-servlet=2.4
+woodstox=3.1.1
+wscommons-policy=1.0
+xmlunit=1.0




More information about the jboss-cvs-commits mailing list