[jbossws-commits] JBossWS SVN: r2959 - in trunk: integration-jboss40/src/java/org/jboss/ws/integration/jboss40 and 14 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri May 4 08:20:09 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-05-04 08:20:09 -0400 (Fri, 04 May 2007)
New Revision: 2959

Added:
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java
   trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/ServiceEndpointDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EagerInitializeDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointHandlerDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointLifecycleDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointNameDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXRPCClientDeployment.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXRPCDeployment.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXWSDeployment.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/PublishContractDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/ServiceEndpointPublisher.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedDeploymentInfo.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataAssociationDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/WSDLFilePublisher.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractInvocationHandler.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/InvocationHandlerJSE.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/LifecycleHandlerImpl.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/RequestHandlerImpl.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointServlet.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/JBossContextServlet.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/PortComponentLinkServlet.java
Removed:
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractInvocationHandler.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractServiceEndpointServlet.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EagerInitializeDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointHandlerDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointLifecycleDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointNameDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerJSE.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/LifecycleHandlerImpl.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/PublishContractDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/RequestHandlerImpl.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointServlet.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedMetaDataAssociationDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedMetaDataDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractInvocationHandler.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractServiceEndpointServlet.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EagerInitializeDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointHandlerDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointLifecycleDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointNameDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerJSE.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/JBossContextServlet.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/LifecycleHandlerImpl.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PortComponentLinkServlet.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PublishContractDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointServlet.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedMetaDataAssociationDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedMetaDataDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/JAXWSDeployment.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointPublisher.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/WSDLFilePublisher.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointDeployer.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointInvokerJSE.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientDeployment.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java
Modified:
   trunk/build/eclipse/jbossws.userlibraries
   trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java
   trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
   trunk/integration-jboss40/src/resources/jbossws.beans/META-INF/jboss-beans.xml
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java
   trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java
   trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java
   trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java
   trunk/integration-jboss50/src/resources/jbossws.sar/META-INF/jbossws-beans.xml
   trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java
   trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java
   trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
   trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/wspublish.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointGeneratorEJB.java
   trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointInfo.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
   trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
   trunk/jbossws-core/src/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java
Log:
Consolidate AS42, AS50 deployment

Modified: trunk/build/eclipse/jbossws.userlibraries
===================================================================
--- trunk/build/eclipse/jbossws.userlibraries	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/build/eclipse/jbossws.userlibraries	2007-05-04 12:20:09 UTC (rev 2959)
@@ -19,19 +19,19 @@
 <archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
 </library>
 <library name="jboss-5.0.x" systemlibrary="false">
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-aop-jdk50.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-deployers.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-j2se.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-security-spi.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-system.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-system-jmx.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-vfs.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jbosssx.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/lib/jboss.jar" source="/home/tdiesler/svn/jbossas/trunk/server/src/main"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/lib/jnpserver.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/deployers/jboss-aop-jboss5.deployer/jboss-aspect-library-jdk50.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-annotations-ejb3.jar"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-ejb3.jar" source="/home/tdiesler/svn/jbossas/branches/Branch_4_2/ejb3/src/main"/>
-<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-ejb3x.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-aop-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-deployers.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-j2se.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-security-spi.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-system.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-system-jmx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-vfs.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jbosssx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/server/default/lib/jboss.jar" source="/home/tdiesler/svn/jbossas/trunk/server/src/main"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/server/default/lib/jnpserver.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/server/default/deployers/jboss-aop-jboss5.deployer/jboss-aspect-library-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/server/default/deployers/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/server/default/deployers/ejb3.deployer/jboss-ejb3.jar" source="/home/tdiesler/svn/jbossas/branches/Branch_4_2/ejb3/src/main"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3/server/default/deployers/ejb3.deployer/jboss-ejb3x.jar"/>
 </library>
 </eclipse-userlibraries>

Modified: trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java
===================================================================
--- trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -35,7 +35,7 @@
 import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
 import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
 import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
 import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
 import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;

Modified: trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
===================================================================
--- trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -32,12 +32,12 @@
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.util.naming.Util;
 import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.ws.core.deployment.JAXRPCClientDeployment;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
 import org.jboss.ws.integration.URLLoaderAdapter;
 import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
 import org.jboss.ws.integration.jboss42.jbossws.DeploymentInfoAdapterFactory;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
 import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
 
 /**

Modified: trunk/integration-jboss40/src/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration-jboss40/src/resources/jbossws.beans/META-INF/jboss-beans.xml	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss40/src/resources/jbossws.beans/META-INF/jboss-beans.xml	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,26 +1,22 @@
 <?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">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer">
   
-  <bean name="KernelLocator" class="org.jboss.ws.integration.KernelLocator">
-    <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
-  </bean>
-  
-  <bean name="ServiceEndpointManager" class="org.jboss.ws.core.server.ServiceEndpointManager">
-    
+  <!-- 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 'alwaysModifySOAPAddress' is true.
-      If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
+        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 next line (webServiceHost) is commented, JBossWS uses requesters protocolo, host and port when rewriting the <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="alwaysModifySOAPAddress">true</property>
+    <property name="modifySOAPAddress">true</property>
     
     <!-- 
       Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
@@ -29,38 +25,186 @@
       <property name="webServiceSecurePort">8443</property>
       <property name="webServicePort">8080</property>
     -->
-    
-    <property name="serviceEndpointInvokerJSE">org.jboss.ws.core.server.ServiceEndpointInvokerJSE</property>
-    <property name="serviceEndpointInvokerEJB3">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB3</property>
-    <property name="serviceEndpointInvokerEJB21">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB21</property>
-    <property name="serviceEndpointInvokerMDB">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerMDB</property>
   </bean>
+
+  <!-- The registry for web service endpoints -->
+  <bean name="WSEndpointRegistry" class="org.jboss.ws.integration.management.EndpointRegistryImpl"/>
   
-  <bean name="ServiceEndpointDeployer" class="org.jboss.ws.core.server.ServiceEndpointDeployer">
-    <property name="serviceEndpointManager">
-      <inject bean="ServiceEndpointManager"/>
-    </property>
-  </bean>
+  <!-- A subscription manager for WS-Eventing -->
+  <bean name="WSSubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
   
-  <bean name="ServiceEndpointPublisher" class="org.jboss.ws.integration.jboss42.ServiceEndpointPublisher">
-    <property name="serviceEndpointServlet">org.jboss.ws.integration.jboss42.JBossServiceEndpointServlet</property>
+  <!-- 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>
   
-  <!-- A subscription manager for WS-Eventing -->
-  <bean name="SubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
+  <!-- 
+    ********************************************************************************************************************* 
+    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.
+    
+    ********************************************************************************************************************* 
+  -->
   
-  <bean name="ServerConfig" class="org.jboss.ws.integration.jboss42.ServerConfigImpl"/>
+  <!-- 
+    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>
   
-  <bean name="DeploymentInfoAdapter" class="org.jboss.ws.integration.jboss42.DeploymentInfoAdapter">
-    <property name="applicationMetaDataAdapter">
-      <inject bean="ApplicationMetaDataAdapter"/>
+  <!-- 
+    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>
-    <property name="webMetaDataAdapter">
-      <inject bean="WebMetaDataAdapter"/>
+  </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="WSEndpointValidationDeployer" class="org.jboss.ws.integration.deployment.EndpointValidationDeployer"/>
+  <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.jboss40.jbossws.ApplicationMetaDataAdapter"/>
+  <bean name="WSServiceRefMetaDataAdapter" class="org.jboss.ws.integration.jboss40.ServiceRefMetaDataAdapter"/>
+  <bean name="WSWebMetaDataAdapter" class="org.jboss.ws.integration.jboss40.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="ServiceRefMetaDataAdapter" class="org.jboss.ws.integration.jboss40.ServiceRefMetaDataAdapter"/>
-  <bean name="ApplicationMetaDataAdapter" class="org.jboss.ws.integration.jboss40.ApplicationMetaDataAdapter"/>
-  <bean name="WebMetaDataAdapter" class="org.jboss.ws.integration.jboss42.WebMetaDataAdapter"/>
+  <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>
+</deployment>
\ No newline at end of file

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -29,7 +29,7 @@
 
 import org.jboss.metadata.ApplicationMetaData;
 import org.jboss.metadata.BeanMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractInvocationHandler.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractInvocationHandler.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractInvocationHandler.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,431 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-// $Id$
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.util.HashMap;
-
-import javax.activation.DataHandler;
-import javax.management.MBeanException;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPBodyElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.ws.http.HTTPBinding;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.core.CommonBinding;
-import org.jboss.ws.core.CommonBindingProvider;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.CommonSOAPBinding;
-import org.jboss.ws.core.DirectionHolder;
-import org.jboss.ws.core.EndpointInvocation;
-import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.DirectionHolder.Direction;
-import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
-import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.server.ServerHandlerDelegate;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.soap.SOAPMessageImpl;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.invocation.InvocationContext;
-import org.jboss.ws.integration.invocation.InvocationHandler;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-
-/** An implementation handles invocations on the endpoint
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public abstract class AbstractInvocationHandler implements InvocationHandler
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(AbstractInvocationHandler.class);
-
-   protected Endpoint endpoint;
-   protected CommonBindingProvider bindingProvider;
-   protected ServerHandlerDelegate delegate;
-
-   /** Initialize the service endpoint */
-   public void init(Endpoint endpoint)
-   {
-      this.endpoint = endpoint;
-      
-      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      if (sepMetaData.getType() == EndpointMetaData.Type.JAXRPC)
-      {
-         bindingProvider = new CommonBindingProvider(sepMetaData);
-         delegate = new HandlerDelegateJAXRPC(sepMetaData);
-      }
-      else
-      {
-         bindingProvider = new BindingProviderImpl(sepMetaData);
-         delegate = new HandlerDelegateJAXWS(sepMetaData);
-      }
-   }
-
-   /** Load the SEI implementation bean if necessary */
-   protected abstract Class loadServiceEndpoint() throws ClassNotFoundException;
-
-   /** Create the instance of the SEI implementation bean if necessary */
-   protected abstract Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception;
-
-   /** Invoke the instance of the SEI implementation bean */
-   protected abstract void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception;
-
-   /** Destroy the instance of the SEI implementation bean if necessary */
-   protected abstract void destroyServiceEndpointInstance(Object seiImpl);
-
-   public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
-   {
-      return delegate.callRequestHandlerChain(sepMetaData, type);
-   }
-
-   public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
-   {
-      return delegate.callResponseHandlerChain(sepMetaData, type);
-   }
-
-   public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
-   {
-      delegate.closeHandlerChain(sepMetaData, type);
-   }
-
-   public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
-   {
-      return delegate.callFaultHandlerChain(sepMetaData, type, ex);
-   }
-
-   /** Invoke the the service endpoint */
-   public void invoke(InvocationContext reqContext) throws Exception
-   {
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)msgContext.getEndpointMetaData();
-      MessageAbstraction reqMessage = msgContext.getMessageAbstraction();
-
-      // Load the endpoint implementation bean
-      Class seImpl = loadServiceEndpoint();
-
-      // Create an instance of the endpoint implementation bean
-      Object seInstance = createServiceEndpointInstance(seImpl, reqContext);
-
-      // The direction of the message
-      DirectionHolder direction = new DirectionHolder(Direction.InBound);
-
-      // Get the order of pre/post handlerchains 
-      HandlerType[] handlerType = delegate.getHandlerTypeOrder();
-      HandlerType[] faultType = delegate.getHandlerTypeOrder();
-
-      // Set the required inbound context properties
-      setInboundContextProperties();
-
-      try
-      {
-         boolean oneway = false;
-         EndpointInvocation epInv = null;
-         OperationMetaData opMetaData = null;
-         CommonBinding binding = bindingProvider.getCommonBinding();
-         binding.setHeaderSource(delegate);
-
-         // call the request handler chain
-         boolean handlersPass = callRequestHandlerChain(sepMetaData, handlerType[0]);
-
-         // Unbind the request message
-         if (handlersPass)
-         {
-            // Get the operation meta data from the SOAP message
-            opMetaData = getDispatchDestination(sepMetaData, reqMessage);
-            msgContext.setOperationMetaData(opMetaData);
-            oneway = opMetaData.isOneWay();
-
-            /* 
-             * From JAX-WS 10.2.1 - "7. If the node does not understand how to process
-             * the message, then neither handlers nor the endpoint
-             * are invoked and instead the binding generates a SOAP must
-             * understand exception"
-             *
-             * Therefore, this must precede the ENDPOINT chain; however, The PRE
-             * chain still must happen first since the message may be encrypted, in which
-             * case the operation is still not known. Without knowing the operation, it 
-             * is not possible to determine what headers are understood by the endpoint.
-             */
-            if (binding instanceof CommonSOAPBinding)
-               ((CommonSOAPBinding)binding).checkMustUnderstand(opMetaData);
-
-            // Unbind the request message
-            epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
-         }
-
-         handlersPass = handlersPass && callRequestHandlerChain(sepMetaData, handlerType[1]);
-         handlersPass = handlersPass && callRequestHandlerChain(sepMetaData, handlerType[2]);
-
-         if (handlersPass)
-         {
-            msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
-            try
-            {
-               // Check if protocol handlers modified the payload
-               if (msgContext.isModified())
-               {
-                  log.debug("Handler modified payload, unbind message again");
-                  reqMessage = msgContext.getMessageAbstraction();
-                  epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
-               }
-
-               // Invoke the service endpoint
-               invokeServiceEndpointInstance(seInstance, epInv);
-            }
-            finally
-            {
-               msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
-            }
-
-            // Reverse the message direction
-            msgContext = processPivotInternal(msgContext, direction);
-
-            // Set the required outbound context properties
-            setOutboundContextProperties();
-
-            if (binding instanceof CommonSOAPBinding)
-               XOPContext.setMTOMEnabled(((CommonSOAPBinding)binding).isMTOMEnabled());
-
-            // Bind the response message
-            MessageAbstraction resMessage = binding.bindResponseMessage(opMetaData, epInv);
-            msgContext.setMessageAbstraction(resMessage);
-         }
-         else
-         {
-            // Reverse the message direction without calling the endpoint
-            MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-            msgContext = processPivotInternal(msgContext, direction);
-            msgContext.setMessageAbstraction(resMessage);
-         }
-
-         if (oneway == false)
-         {
-            // call the  response handler chain, removing the fault type entry will not call handleFault for that chain 
-            handlersPass = callResponseHandlerChain(sepMetaData, handlerType[2]);
-            faultType[2] = null;
-            handlersPass = handlersPass && callResponseHandlerChain(sepMetaData, handlerType[1]);
-            faultType[1] = null;
-            handlersPass = handlersPass && callResponseHandlerChain(sepMetaData, handlerType[0]);
-            faultType[0] = null;
-         }
-      }
-      catch (RuntimeException ex)
-      {
-         // Reverse the message direction
-         processPivotInternal(msgContext, direction);
-
-         try
-         {
-            CommonBinding binding = bindingProvider.getCommonBinding();
-            binding.bindFaultMessage(ex);
-
-            // call the fault handler chain
-            boolean handlersPass = true;
-            if (faultType[2] != null)
-               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[2], ex);
-            if (faultType[1] != null)
-               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[1], ex);
-            if (faultType[0] != null)
-               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[0], ex);
-         }
-         catch (RuntimeException subEx)
-         {
-            log.warn("Exception while processing handleFault: ", ex);
-            ex = subEx;
-         }
-         throw ex;
-      }
-      finally
-      {
-         closeHandlerChain(sepMetaData, handlerType[2]);
-         closeHandlerChain(sepMetaData, handlerType[1]);
-         closeHandlerChain(sepMetaData, handlerType[0]);
-
-         destroyServiceEndpointInstance(seInstance);
-      }
-   }
-
-   protected void setInboundContextProperties()
-   {
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      if (msgContext instanceof MessageContextJAXWS)
-      {
-         // Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler
-         msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
-      }
-   }
-
-   protected void setOutboundContextProperties()
-   {
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      if (msgContext instanceof MessageContextJAXWS)
-      {
-         // Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler
-         msgContext.put(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
-      }
-   }
-
-   private CommonMessageContext processPivotInternal(CommonMessageContext msgContext, DirectionHolder direction)
-   {
-      if (direction.getDirection() == Direction.InBound)
-      {
-         EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
-         if (epMetaData.getType() == EndpointMetaData.Type.JAXRPC)
-         {
-            msgContext = MessageContextJAXRPC.processPivot(msgContext);
-         }
-         else
-         {
-            msgContext = MessageContextJAXWS.processPivot(msgContext);
-         }
-         direction.setDirection(Direction.OutBound);
-      }
-      return msgContext;
-   }
-
-   private OperationMetaData getDispatchDestination(EndpointMetaData epMetaData, MessageAbstraction reqMessage) throws SOAPException
-   {
-      OperationMetaData opMetaData;
-
-      String bindingID = epMetaData.getBindingId();
-      if (HTTPBinding.HTTP_BINDING.equals(bindingID))
-      {
-         if (epMetaData.getOperations().size() != 1)
-            throw new IllegalStateException("Multiple operations not supported for HTTP binding");
-
-         opMetaData = epMetaData.getOperations().get(0);
-      }
-      else
-      {
-         SOAPMessageImpl soapMessage = (SOAPMessageImpl)reqMessage;
-
-         opMetaData = soapMessage.getOperationMetaData(epMetaData);
-         SOAPHeader soapHeader = soapMessage.getSOAPHeader();
-
-         // Report a MustUnderstand fault
-         if (opMetaData == null)
-         {
-            String faultString;
-            SOAPBody soapBody = soapMessage.getSOAPBody();
-            if (soapBody.getChildElements().hasNext())
-            {
-               SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
-               Name soapName = soapBodyElement.getElementName();
-               faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for: " + soapName;
-            }
-            else
-            {
-               faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for empty soap body";
-            }
-
-            // R2724 If an INSTANCE receives a message that is inconsistent with its WSDL description, it SHOULD generate a soap:Fault
-            // with a faultcode of "Client", unless a "MustUnderstand" or "VersionMismatch" fault is generated.
-            if (soapHeader != null && soapHeader.examineMustUnderstandHeaderElements(Constants.URI_SOAP11_NEXT_ACTOR).hasNext())
-            {
-               QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
-               throw new SOAPFaultException(faultCode, faultString, null, null);
-            }
-            else
-            {
-               QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
-               throw new SOAPFaultException(faultCode, faultString, null, null);
-            }
-         }
-      }
-      return opMetaData;
-   }
-
-   protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
-   {
-      String methodName = seiMethod.getName();
-      Class[] paramTypes = seiMethod.getParameterTypes();
-      for (int i = 0; i < paramTypes.length; i++)
-      {
-         Class paramType = paramTypes[i];
-         if (JavaUtils.isPrimitive(paramType) == false)
-         {
-            String paramTypeName = paramType.getName();
-            paramType = JavaUtils.loadJavaType(paramTypeName);
-            paramTypes[i] = paramType;
-         }
-      }
-
-      Method implMethod = implClass.getMethod(methodName, paramTypes);
-      return implMethod;
-   }
-
-   /** handle invocation exceptions */
-   public void handleInvocationException(Throwable th) throws Exception
-   {
-      if (th instanceof InvocationTargetException)
-      {
-         // unwrap the throwable raised by the service endpoint implementation
-         Throwable targetEx = ((InvocationTargetException)th).getTargetException();
-         handleInvocationThrowable(targetEx);
-      }
-
-      if (th instanceof MBeanException)
-      {
-         throw ((MBeanException)th).getTargetException();
-      }
-
-      handleInvocationThrowable(th);
-   }
-
-   private void handleInvocationThrowable(Throwable th) throws Exception
-   {
-      if (th instanceof Exception)
-      {
-         throw (Exception)th;
-      }
-      else if (th instanceof Error)
-      {
-         throw (Error)th;
-      }
-      else
-      {
-         throw new UndeclaredThrowableException(th);
-      }
-   }
-}

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractServiceEndpointServlet.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractServiceEndpointServlet.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/AbstractServiceEndpointServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,178 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.Writer;
-
-import javax.management.ObjectName;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.rpc.JAXRPCException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.ServletRequestContext;
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.ObjectNameFactory;
-import org.jboss.ws.integration.RequestHandler;
-import org.jboss.ws.integration.management.EndpointRegistry;
-import org.jboss.ws.integration.management.EndpointRegistryFactory;
-
-/**
- * A servlet that is installed for every web service endpoint.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public abstract class AbstractServiceEndpointServlet extends HttpServlet
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(AbstractServiceEndpointServlet.class);
-
-   protected Endpoint endpoint;
-   protected EndpointRegistry epRegistry;
-
-   public void init(ServletConfig config) throws ServletException
-   {
-      super.init(config);
-      epRegistry = EndpointRegistryFactory.getEndpointRegistry();
-   }
-
-   public void destroy()
-   {
-      super.destroy();
-   }
-
-   public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
-   {
-      if (endpoint == null)
-      {
-         String contextPath = req.getContextPath();
-         initServiceEndpoint(contextPath);
-      }
-      super.service(req, res);
-   }
-
-   public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
-   {
-      // Process a WSDL request
-      if (req.getParameter("wsdl") != null || req.getParameter("WSDL") != null)
-      {
-         res.setContentType("text/xml");
-         try
-         {
-            RequestHandler requestHandler = endpoint.getRequestHandler();
-            ServletRequestContext context = new ServletRequestContext(getServletContext(), req, res);
-            requestHandler.handleWSDLRequest(endpoint, res.getOutputStream(), context);
-         }
-         catch (Exception ex)
-         {
-            handleException(ex);
-         }
-      }
-      else
-      {
-         res.setStatus(405);
-         res.setContentType("text/plain");
-         Writer out = res.getWriter();
-         out.write("HTTP GET not supported");
-         out.flush();
-         out.close();
-      }
-   }
-
-   public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
-   {
-      log.debug("doPost: " + req.getRequestURI());
-
-      ServletInputStream inputStream = req.getInputStream();
-      ServletOutputStream outputStream = res.getOutputStream();
-      try
-      {
-         RequestHandler requestHandler = endpoint.getRequestHandler();
-         ServletRequestContext context = new ServletRequestContext(getServletContext(), req, res);
-         requestHandler.handleRequest(endpoint, inputStream, outputStream, context);
-      }
-      catch (Exception ex)
-      {
-         handleException(ex);
-      }
-      finally 
-      {
-         try
-         {
-            outputStream.flush();
-            outputStream.close();
-         }
-         catch (IOException ioex)
-         {
-            log.error("Cannot flush output stream");
-         }
-         
-      }
-   }
-
-   private void handleException(Exception ex) throws ServletException
-   {
-      log.error("Error processing web service request", ex);
-
-      if (ex instanceof JAXRPCException)
-         throw (JAXRPCException)ex;
-
-      throw new ServletException(ex);
-   }
-
-   /** Initialize the service endpoint
-    */
-   protected void initServiceEndpoint(String contextPath)
-   {
-      String servletName = getServletName();
-      if (contextPath.startsWith("/"))
-         contextPath = contextPath.substring(1);
-
-      for (ObjectName sepId : epRegistry.getEndpoints())
-      {
-         String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
-         String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
-         if (servletName.equals(propEndpoint) && contextPath.equals(propContext))
-         {
-            endpoint = epRegistry.getEndpoint(sepId);
-            break;
-         }
-      }
-
-      if (endpoint == null)
-      {
-         ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + ","
-               + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
-         throw new WSException("Cannot obtain endpoint for: " + oname);
-      }
-   }
-}

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -31,7 +31,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ApplicationMetaData;
 import org.jboss.metadata.WebMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.integration.ResourceLoaderAdapter;
 
 /**

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

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointHandlerDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointHandlerDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointHandlerDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,115 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-//$Id$
-
-import java.util.Map;
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.LifecycleHandler;
-import org.jboss.ws.integration.RequestHandler;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.invocation.InvocationHandler;
-
-/**
- * A deployer that assigns the handlers to the Endpoint 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointHandlerDeployer extends AbstractDeployer
-{
-   private String requestHandler;
-   private String lifecycleHandler;
-   private Map<String,String> invocationHandler;
-
-   public void setLifecycleHandler(String handler)
-   {
-      this.lifecycleHandler = handler;
-   }
-
-   public void setRequestHandler(String handler)
-   {
-      this.requestHandler = handler;
-   }
-
-   public void setInvocationHandler(Map<String,String> handlers)
-   {
-      this.invocationHandler = handlers;
-   }
-
-   @Override
-   public void create(Deployment dep)
-   {
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ep.setRequestHandler(getRequestHandler(dep));
-         ep.setLifecycleHandler(getLifecycleHandler(dep));
-         ep.setInvocationHandler(getInvocationHandler(dep));
-      }
-   }
-
-   private RequestHandler getRequestHandler(Deployment dep)
-   {
-      try
-      {
-         Class<?> handlerClass = dep.getClassLoader().loadClass(requestHandler);
-         return (RequestHandler)handlerClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Cannot load request handler: " + requestHandler);
-      }
-   }
-
-   private LifecycleHandler getLifecycleHandler(Deployment dep)
-   {
-      try
-      {
-         Class<?> handlerClass = dep.getClassLoader().loadClass(lifecycleHandler);
-         return (LifecycleHandler)handlerClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Cannot load lifecycle handler: " + lifecycleHandler);
-      }
-   }
-
-   private InvocationHandler getInvocationHandler(Deployment dep)
-   {
-      String className = invocationHandler.get(dep.getType().toString());
-      if (className == null)
-         throw new IllegalStateException("Cannot obtain invocation handler for: " + dep.getType());
-      
-      try
-      {
-         Class<?> handlerClass = dep.getClassLoader().loadClass(className);
-         return (InvocationHandler)handlerClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Cannot load invocation handler: " + className);
-      }
-   }
-}
\ No newline at end of file

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointLifecycleDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointLifecycleDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointLifecycleDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-//$Id$
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-
-/**
- * A deployer that that calls the endpoint lifecycle handler 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointLifecycleDeployer extends AbstractDeployer
-{
-   @Override
-   public void create(Deployment dep)
-   {
-      for (Endpoint ep : dep.getService().getEndpoints())
-         ep.getLifecycleHandler().create(ep);
-   }
-
-   @Override
-   public void start(Deployment dep)
-   {
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ep.getLifecycleHandler().start(ep);
-      }
-   }
-
-   @Override
-   public void stop(Deployment dep)
-   {
-      Service service = dep.getService();
-      if (service != null)
-      {
-         for (Endpoint ep : service.getEndpoints())
-         {
-            ep.getLifecycleHandler().stop(ep);
-         }
-      }
-   }
-
-   @Override
-   public void destroy(Deployment dep)
-   {
-      Service service = dep.getService();
-      if (service != null)
-      {
-         for (Endpoint ep : service.getEndpoints())
-         {
-            ep.getLifecycleHandler().destroy(ep);
-         }
-      }
-   }
-}

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointNameDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointNameDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/EndpointNameDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * A deployer that assigns the complete name to the Endpoint 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointNameDeployer extends AbstractDeployer
-{
-   @Override
-   public void create(Deployment dep)
-   {
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
-         if (sepMetaData == null)
-            throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-         ObjectName sepID = sepMetaData.getServiceEndpointID();
-         ep.setName(sepID);
-      }
-   }
-}
\ No newline at end of file

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -42,9 +42,10 @@
 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.UnifiedDeploymentInfo;
+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;

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -40,10 +40,11 @@
 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.UnifiedDeploymentInfo;
+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;

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerJSE.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerJSE.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerJSE.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-// $Id$
-
-import java.lang.reflect.Method;
-
-import javax.xml.rpc.ServiceException;
-import javax.xml.rpc.server.ServiceLifecycle;
-import javax.xml.rpc.server.ServletEndpointContext;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.WebServiceContext;
-
-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.jaxrpc.ServletEndpointContextImpl;
-import org.jboss.ws.core.jaxws.WebServiceContextInjector;
-import org.jboss.ws.core.jaxws.WebServiceContextJSE;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.server.ServletRequestContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.integration.invocation.InvocationContext;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * Handles invocations on JSE endpoints.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerJSE extends AbstractInvocationHandler
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(InvocationHandlerJSE.class);
-
-   /** Load the SEI implementation bean if necessary */
-   public Class loadServiceEndpoint() throws ClassNotFoundException
-   {
-      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      ClassLoader cl = sepMetaData.getClassLoader();
-      String seiImplName = sepMetaData.getServiceEndpointImplName();
-      Class seiImplClass = cl.loadClass(seiImplName);
-      return seiImplClass;
-   }
-
-   /** Create an instance of the SEI implementation bean if necessary */
-   public Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws IllegalAccessException, InstantiationException
-   {
-      Object seiImpl = seiImplClass.newInstance();
-      if (seiImpl instanceof ServiceLifecycle && context != null)
-      {
-         try
-         {
-            ServiceLifecycle serviceLifecycle = ((ServiceLifecycle)seiImpl);
-            ServletEndpointContext servletEndpointContext = new ServletEndpointContextImpl((ServletRequestContext)context);
-            serviceLifecycle.init(servletEndpointContext);
-         }
-         catch (ServiceException ex)
-         {
-            throw new WSException(ex);
-         }
-      }
-      return seiImpl;
-   }
-
-   /** Invoke an instance of the SEI implementation bean */
-   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws SOAPFaultException, Exception
-   {
-      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
-      try
-      {
-         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-         if (msgContext instanceof SOAPMessageContextJAXWS)
-         {
-            WebServiceContext wsContext = new WebServiceContextJSE((SOAPMessageContextJAXWS)msgContext);
-            new WebServiceContextInjector().injectContext(seiImpl, wsContext);
-         }
-
-         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);
-      }
-   }
-
-   /** Destroy an instance of the SEI implementation bean if necessary */
-   public void destroyServiceEndpointInstance(Object seiImpl)
-   {
-      if (seiImpl instanceof ServiceLifecycle)
-      {
-         ((ServiceLifecycle)seiImpl).destroy();
-      }
-   }
-}

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/LifecycleHandlerImpl.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/LifecycleHandlerImpl.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/LifecycleHandlerImpl.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-//$Id$
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * A lifecycle handler
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class LifecycleHandlerImpl extends org.jboss.ws.integration.LifecycleHandlerImpl
-{
-   public void start(Endpoint endpoint)
-   {
-      super.start(endpoint);
-      log.info("WebService started: " + getEndpointAddress(endpoint));
-   }
-
-   public void stop(Endpoint endpoint)
-   {
-      super.stop(endpoint);
-      log.info("WebService stoped: " + getEndpointAddress(endpoint));
-   }
-
-   private String getEndpointAddress(Endpoint ep)
-   {
-      ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      return sepMetaData.getEndpointAddress();
-   }
-}

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -23,8 +23,8 @@
 
 //$Id$
 
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;
 

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/PublishContractDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/PublishContractDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/PublishContractDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-//$Id$
-
-import java.io.IOException;
-
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.WSDLFilePublisher;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.WSDeploymentException;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer that publishes the wsdl 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class PublishContractDeployer 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");
-
-      try
-      {
-         WSDLFilePublisher publisher = new WSDLFilePublisher(udi);
-         publisher.publishWsdlFiles(umd);
-      }
-      catch (IOException ex)
-      {
-         throw new WSDeploymentException(ex);
-      }
-   }
-}
\ No newline at end of file

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/RequestHandlerImpl.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/RequestHandlerImpl.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/RequestHandlerImpl.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,415 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-//$Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.activation.DataHandler;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPPart;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.http.HTTPBinding;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.CommonBinding;
-import org.jboss.ws.core.CommonBindingProvider;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.HTTPMessageImpl;
-import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.MessageTrace;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
-import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
-import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.server.MimeHeaderSource;
-import org.jboss.ws.core.server.ServletHeaderSource;
-import org.jboss.ws.core.server.ServletRequestContext;
-import org.jboss.ws.core.server.WSDLRequestHandler;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.soap.MessageFactoryImpl;
-import org.jboss.ws.core.soap.SOAPConnectionImpl;
-import org.jboss.ws.core.soap.SOAPMessageImpl;
-import org.jboss.ws.core.utils.DOMWriter;
-import org.jboss.ws.core.utils.ThreadLocalAssociation;
-import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
-import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.RequestHandler;
-import org.jboss.ws.integration.Endpoint.EndpointState;
-import org.jboss.ws.integration.invocation.InvocationContext;
-import org.jboss.ws.integration.invocation.InvocationHandler;
-import org.jboss.ws.integration.management.ServerConfig;
-import org.jboss.ws.integration.management.ServerConfigFactory;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.w3c.dom.Document;
-
-/**
- * A request handler
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class RequestHandlerImpl implements RequestHandler
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(RequestHandlerImpl.class);
-
-   public void handleRequest(Endpoint endpoint, InputStream inputStream, OutputStream outputStream, InvocationContext context)
-   {
-      log.debug("handleRequest: " + endpoint.getName());
-
-      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      ServletRequestContext reqContext = (ServletRequestContext)context;
-
-      Type type = sepMetaData.getType();
-
-      ServletContext servletContext = reqContext.getServletContext();
-      HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
-      HttpServletResponse httpResponse = reqContext.getHttpServletResponse();
-      ServletHeaderSource headerSource = new ServletHeaderSource(httpRequest, httpResponse);
-
-      // Build the message context
-      CommonMessageContext msgContext;
-      if (type == EndpointMetaData.Type.JAXRPC)
-      {
-         msgContext = new SOAPMessageContextJAXRPC();
-         msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
-         msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
-         msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
-      }
-      else
-      {
-         msgContext = new SOAPMessageContextJAXWS();
-         msgContext.put(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, new Boolean(false));
-         msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
-         msgContext.put(MessageContextJAXWS.HTTP_REQUEST_HEADERS, headerSource.getHeaderMap());
-         msgContext.put(MessageContextJAXWS.HTTP_REQUEST_METHOD, httpRequest.getMethod());
-         msgContext.put(MessageContextJAXWS.QUERY_STRING, httpRequest.getQueryString());
-         msgContext.put(MessageContextJAXWS.PATH_INFO, httpRequest.getPathInfo());
-         msgContext.put(MessageContextJAXWS.SERVLET_CONTEXT, servletContext);
-         msgContext.put(MessageContextJAXWS.SERVLET_REQUEST, httpRequest);
-         msgContext.put(MessageContextJAXWS.SERVLET_RESPONSE, httpResponse);
-
-      }
-      msgContext.setEndpointMetaData(sepMetaData);
-
-      // Associate a message context with the current thread
-      MessageContextAssociation.pushMessageContext(msgContext);
-
-      try
-      {
-         MessageAbstraction resMessage = processRequest(endpoint, headerSource, reqContext, inputStream);
-
-         // Replace the message context with the response context
-         msgContext = MessageContextAssociation.peekMessageContext();
-
-         Map<String, List<String>> headers = (Map<String, List<String>>)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_HEADERS);
-         if (headers != null)
-            headerSource.setHeaderMap(headers);
-
-         Integer code = (Integer)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_CODE);
-         if (code != null)
-            httpResponse.setStatus(code.intValue());
-
-         boolean isFault = false;
-         if (resMessage instanceof SOAPMessage)
-         {
-            SOAPPart part = ((SOAPMessage)resMessage).getSOAPPart();
-            if (part == null)
-               throw new SOAPException("Cannot obtain SOAPPart from response message");
-
-            // R1126 An INSTANCE MUST return a "500 Internal Server Error" HTTP status code
-            // if the response envelope is a Fault.
-            //
-            // Also, a one-way operation must show up as empty content, and can be detected
-            // by a null envelope.
-            SOAPEnvelope soapEnv = part.getEnvelope();
-            isFault = soapEnv != null && soapEnv.getBody().hasFault();
-            if (isFault && httpResponse != null)
-            {
-               httpResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-            }
-         }
-
-         sendResponse(outputStream, msgContext, isFault);
-      }
-      catch (Exception ex)
-      {
-         WSException.rethrow(ex);
-      }
-      finally
-      {
-         // Reset the message context association
-         MessageContextAssociation.popMessageContext();
-
-         // clear thread local storage
-         ThreadLocalAssociation.clear();
-      }
-   }
-
-   private void sendResponse(OutputStream outputStream, CommonMessageContext msgContext, boolean isFault) throws SOAPException, IOException
-   {
-      MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-      String wsaTo = null;
-
-      // Get the destination from the AddressingProperties
-      AddressingProperties outProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND);
-      if (outProps != null && outProps.getTo() != null)
-      {
-         AddressingConstantsImpl ADDR = new AddressingConstantsImpl();
-         wsaTo = outProps.getTo().getURI().toString();
-         if (wsaTo.equals(ADDR.getAnonymousURI()))
-            wsaTo = null;
-      }
-      if (wsaTo != null)
-      {
-         log.debug("Sending response to addressing destination: " + wsaTo);
-         new SOAPConnectionImpl().callOneWay((SOAPMessage)resMessage, wsaTo);
-      }
-      else
-      {
-         resMessage.writeTo(outputStream);
-      }
-   }
-
-   /**
-    * Handle a request to this web service endpoint
-    */
-   private MessageAbstraction processRequest(Endpoint endpoint, MimeHeaderSource headerSource, ServletRequestContext reqContext, InputStream inputStream)
-         throws BindingException
-   {
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-
-      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      long beginProcessing = 0;
-      ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         EndpointState state = endpoint.getState();
-         if (state != EndpointState.STARTED)
-         {
-            QName faultCode = Constants.SOAP11_FAULT_CODE_SERVER;
-            String faultString = "Endpoint cannot handle requests in state: " + state;
-            throw new SOAPFaultException(faultCode, faultString, null, null);
-         }
-
-         log.debug("BEGIN handleRequest: " + endpoint.getName());
-         beginProcessing = initRequestMetrics(endpoint);
-
-         MimeHeaders headers = (headerSource != null ? headerSource.getMimeHeaders() : null);
-
-         MessageAbstraction reqMessage;
-
-         String bindingID = sepMetaData.getBindingId();
-         if (HTTPBinding.HTTP_BINDING.equals(bindingID))
-         {
-            reqMessage = new HTTPMessageImpl(headers, inputStream);
-         }
-         else
-         {
-            MessageFactoryImpl msgFactory = new MessageFactoryImpl();
-            msgFactory.setServiceMode(sepMetaData.getServiceMode());
-            msgFactory.setStyle(sepMetaData.getStyle());
-
-            reqMessage = (SOAPMessageImpl)msgFactory.createMessage(headers, inputStream);
-         }
-
-         // Associate current message with message context
-         msgContext.setMessageAbstraction(reqMessage);
-
-         // debug the incomming message
-         MessageTrace.traceMessage("Incoming Request Message", reqMessage);
-
-         // Set the thread context class loader
-         ClassLoader classLoader = sepMetaData.getClassLoader();
-         Thread.currentThread().setContextClassLoader(classLoader);
-
-         // Invoke the service endpoint
-         InvocationHandler invoker = endpoint.getInvocationHandler();
-         invoker.invoke(reqContext);
-
-         // Get the response message context
-         msgContext = MessageContextAssociation.peekMessageContext();
-
-         // Get the response message
-         MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-         if (resMessage != null)
-            postProcessResponse(headerSource, resMessage);
-
-         return resMessage;
-      }
-      catch (Exception ex)
-      {
-         MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-
-         // In case we have an exception before the invoker is called
-         // we create the fault message here.
-         if (resMessage == null || resMessage.isFaultMessage() == false)
-         {
-            CommonBindingProvider bindingProvider = new CommonBindingProvider(sepMetaData);
-            CommonBinding binding = bindingProvider.getCommonBinding();
-            resMessage = binding.bindFaultMessage(ex);
-         }
-
-         if (resMessage != null)
-            postProcessResponse(headerSource, resMessage);
-
-         return resMessage;
-      }
-      finally
-      {
-         try
-         {
-            MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-            if (resMessage != null)
-            {
-               if (resMessage.isFaultMessage())
-               {
-                  processFaultMetrics(endpoint, beginProcessing);
-               }
-               else
-               {
-                  processResponseMetrics(endpoint, beginProcessing);
-               }
-            }
-         }
-         catch (Exception ex)
-         {
-            log.error("Cannot process metrics", ex);
-         }
-
-         // Reset the thread context class loader
-         Thread.currentThread().setContextClassLoader(ctxClassLoader);
-         log.debug("END handleRequest: " + endpoint.getName());
-      }
-   }
-
-   private long initRequestMetrics(Endpoint endpoint)
-   {
-      return 0;
-   }
-
-   private void processResponseMetrics(Endpoint endpoint, long beginProcessing)
-   {
-   }
-
-   private void processFaultMetrics(Endpoint endpoint, long beginProcessing)
-   {
-   }
-
-   /** Set response mime headers
-    */
-   private void postProcessResponse(MimeHeaderSource headerSource, MessageAbstraction resMessage)
-   {
-      try
-      {
-         // Set the outbound headers
-         if (headerSource != null && resMessage instanceof SOAPMessage)
-         {
-            XOPContext.eagerlyCreateAttachments();
-            ((SOAPMessage)resMessage).saveChanges();
-            headerSource.setMimeHeaders(resMessage.getMimeHeaders());
-         }
-
-         // debug the outgoing message
-         MessageTrace.traceMessage("Outgoing Response Message", resMessage);
-      }
-      catch (Exception ex)
-      {
-         WSException.rethrow("Faild to post process response message", ex);
-      }
-   }
-
-   public void handleWSDLRequest(Endpoint endpoint, OutputStream outputStream, InvocationContext context)
-   {
-      log.debug("handleWSDLRequest: " + endpoint.getName());
-
-      ServerEndpointMetaData epMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (epMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      ServletRequestContext reqContext = (ServletRequestContext)context;
-      HttpServletRequest req = reqContext.getHttpServletRequest();
-
-      try
-      {
-         // For the base document the resourcePath should be null
-         String resPath = (String)req.getParameter("resource");
-         URL reqURL = new URL(req.getRequestURL().toString());
-
-         String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() + ":" + reqURL.getPort();
-
-         ServerConfigFactory factory = ServerConfigFactory.getInstance();
-         ServerConfig config = factory.getServerConfig();
-         if (config.getWebServiceHost().equals(ServerConfig.UNDEFINED_HOSTNAME) == false)
-         {
-            wsdlHost = config.getWebServiceHost();
-         }
-         log.debug("WSDL request, using host: " + wsdlHost);
-
-         WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
-         Document document = wsdlRequestHandler.getDocumentForPath(reqURL, wsdlHost, resPath);
-
-         OutputStreamWriter writer = new OutputStreamWriter(outputStream);
-         new DOMWriter(writer).setPrettyprint(true).print(document.getDocumentElement());
-         outputStream.flush();
-         outputStream.close();
-      }
-      catch (RuntimeException rte)
-      {
-         throw rte;
-      }
-      catch (IOException ex)
-      {
-         throw new WSException(ex);
-      }
-   }
-}

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -29,8 +29,8 @@
 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.server.UnifiedDeploymentInfo;
 import org.jboss.ws.core.utils.DOMUtils;
 import org.w3c.dom.Element;
 

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -34,8 +34,8 @@
 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.server.UnifiedDeploymentInfo;
 import org.jboss.ws.core.utils.DOMUtils;
 import org.w3c.dom.Element;
 

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointServlet.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointServlet.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-// $Id$
-
-import javax.servlet.ServletContext;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * A servlet that is installed for every web service endpoint.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class ServiceEndpointServlet extends AbstractServiceEndpointServlet
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(ServiceEndpointServlet.class);
-
-   /** Initialize the service endpoint
-    */
-   protected void initServiceEndpoint(String contextPath)
-   {
-      super.initServiceEndpoint(contextPath);
-
-      // read the config name/file from web.xml
-      ServletContext ctx = getServletContext();
-      String configName = ctx.getInitParameter("jbossws-config-name");
-      String configFile = ctx.getInitParameter("jbossws-config-file");
-      if (configName != null || configFile != null)
-      {
-         ServerEndpointMetaData epMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-         if (epMetaData == null)
-            throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-         log.debug("Updating service endpoint config\n  config-name: " + configName + "\n  config-file: " + configFile);
-         epMetaData.setConfigName(configName, configFile);
-      }
-   }
-}

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -24,12 +24,12 @@
 //$Id$
 
 import org.jboss.deployment.DeploymentInfo;
-import org.jboss.ws.core.server.JAXWSDeployment;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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.builder.jaxrpc.JAXRPCDeployment;
 import org.jboss.ws.metadata.webservices.WebservicesMetaData;
 
 /**

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedMetaDataAssociationDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedMetaDataAssociationDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedMetaDataAssociationDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,86 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer that assigns the EndpointMetaData to the Endpoint 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class UnifiedMetaDataAssociationDeployer extends AbstractDeployer
-{
-   @Override
-   public void create(Deployment dep)
-   {
-      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
-      if (umd == null)
-         throw new IllegalStateException("Cannot obtain unified meta data");
-
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
-         if (sepMetaData == null)
-         {
-            sepMetaData = getEndpointMetaData(umd, ep.getName());
-            sepMetaData.setServiceEndpointImplName(ep.getEndpointImpl().getName());
-            ep.addMetaData(ServerEndpointMetaData.class, sepMetaData);
-         }
-      }
-   }
-
-   private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, ObjectName epName)
-   {
-      String propEndpoint = epName.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
-
-      ServerEndpointMetaData epMetaData = null;
-      for (ServiceMetaData serviceMetaData : umd.getServices())
-      {
-         for (EndpointMetaData aux : serviceMetaData.getEndpoints())
-         {
-            String linkName = ((ServerEndpointMetaData)aux).getLinkName();
-            if (propEndpoint.equals(linkName))
-            {
-               epMetaData = (ServerEndpointMetaData)aux;
-               break;
-            }
-         }
-      }
-
-      if (epMetaData == null)
-         throw new IllegalStateException("Cannot find endpoint meta data for: " + epName);
-
-      return epMetaData;
-   }
-}
\ No newline at end of file

Deleted: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedMetaDataDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedMetaDataDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedMetaDataDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42.jbossws;
-
-//$Id$
-
-import org.jboss.ws.core.server.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.builder.jaxrpc.JAXRPCDeployment;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer that builds the UnifiedDeploymentInfo 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class UnifiedMetaDataDeployer extends AbstractDeployer
-{
-   @Override
-   public void create(Deployment dep)
-   {
-      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
-      if (umd == null)
-      {
-         UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
-         if (udi == null)
-            throw new IllegalStateException("Cannot obtain unified deployement info");
-         
-         if (udi.type == DeploymentType.JAXRPC_JSE)
-         {
-            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
-            umd = builder.buildMetaData((JAXRPCDeployment)udi);
-         }
-         else if (udi.type == DeploymentType.JAXRPC_EJB21)
-         {
-            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
-            umd = builder.buildMetaData((JAXRPCDeployment)udi);
-         }
-         else if (udi.type == DeploymentType.JAXWS_JSE)
-         {
-            JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
-            umd = builder.buildMetaData(udi);
-         }
-         else if (udi.type == DeploymentType.JAXWS_EJB3)
-         {
-            JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
-            umd = builder.buildMetaData(udi);
-         }
-         else
-         {
-            throw new IllegalStateException("Invalid type:  " + udi.type);
-         }
-         
-         dep.getContext().addAttachment(UnifiedMetaData.class, umd);
-      }
-   }
-}
\ No newline at end of file

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -33,8 +33,8 @@
 import org.jboss.mx.util.MBeanProxy;
 import org.jboss.mx.util.MBeanProxyCreationException;
 import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -23,7 +23,7 @@
 
 //$Id$
 
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;

Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -33,7 +33,7 @@
 import org.jboss.metadata.WebMetaData;
 import org.jboss.metadata.WebSecurityMetaData;
 import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;

Modified: trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml	2007-05-04 12:20:09 UTC (rev 2959)
@@ -44,26 +44,14 @@
     ********************************************************************************************************************* 
     Web Service deployment                                                                                                
     
-    There are three deployers registered with the JBoss Main Deployer. 
-    The order of which is important
+    There are three deployer interceptors registered with the JBoss Deployers. 
     
-    1) EJBDeployer < WebServiceDeployerEJB
-    2) WebServiceDeployerJSE < WarDeployer 
-    3) WebServiceMainDeployer
+    1) DeployerInterceptorJSE
+    2) DeployerInterceptorEJB21
+    3) DeployerInterceptorEJB3
     
-    Each WebServiceDeployer has a number of DeployerHooks registerd with it 
+    Each interceptor 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) 
@@ -128,40 +116,40 @@
     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.integration.jboss42.jbossws.EagerInitializeDeployer"/>
-  <bean name="WSEndpointHandlerDeployer" class="org.jboss.ws.integration.jboss42.jbossws.EndpointHandlerDeployer">
-    <property name="requestHandler">org.jboss.ws.integration.jboss42.jbossws.RequestHandlerImpl</property>
-    <property name="lifecycleHandler">org.jboss.ws.integration.jboss42.jbossws.LifecycleHandlerImpl</property>
+  <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.integration.jboss42.jbossws.InvocationHandlerJSE</value></entry>
+        <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.integration.jboss42.jbossws.InvocationHandlerJSE</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.integration.jboss42.jbossws.EndpointLifecycleDeployer"/>
-  <bean name="WSEndpointNameDeployer" class="org.jboss.ws.integration.jboss42.jbossws.EndpointNameDeployer"/>
+  <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="WSEndpointValidationDeployer" class="org.jboss.ws.integration.deployment.EndpointValidationDeployer"/>
   <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.integration.jboss42.jbossws.PublishContractDeployer"/>
+  <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.integration.jboss42.jbossws.UnifiedMetaDataAssociationDeployer"/>
-  <bean name="WSUnifiedMetaDataDeployer" class="org.jboss.ws.integration.jboss42.jbossws.UnifiedMetaDataDeployer"/>
+  <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.server.ServiceEndpointPublisher">
-    <property name="servletClass">org.jboss.ws.integration.jboss42.jbossws.ServiceEndpointServlet</property>
+  <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>

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractInvocationHandler.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractInvocationHandler.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractInvocationHandler.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,431 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-// $Id$
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.util.HashMap;
-
-import javax.activation.DataHandler;
-import javax.management.MBeanException;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPBodyElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.ws.http.HTTPBinding;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.core.CommonBinding;
-import org.jboss.ws.core.CommonBindingProvider;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.CommonSOAPBinding;
-import org.jboss.ws.core.DirectionHolder;
-import org.jboss.ws.core.EndpointInvocation;
-import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.DirectionHolder.Direction;
-import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
-import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.server.ServerHandlerDelegate;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.soap.SOAPMessageImpl;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.invocation.InvocationContext;
-import org.jboss.ws.integration.invocation.InvocationHandler;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-
-/** An implementation handles invocations on the endpoint
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public abstract class AbstractInvocationHandler implements InvocationHandler
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(AbstractInvocationHandler.class);
-
-   protected Endpoint endpoint;
-   protected CommonBindingProvider bindingProvider;
-   protected ServerHandlerDelegate delegate;
-
-   /** Initialize the service endpoint */
-   public void init(Endpoint endpoint)
-   {
-      this.endpoint = endpoint;
-      
-      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      if (sepMetaData.getType() == EndpointMetaData.Type.JAXRPC)
-      {
-         bindingProvider = new CommonBindingProvider(sepMetaData);
-         delegate = new HandlerDelegateJAXRPC(sepMetaData);
-      }
-      else
-      {
-         bindingProvider = new BindingProviderImpl(sepMetaData);
-         delegate = new HandlerDelegateJAXWS(sepMetaData);
-      }
-   }
-
-   /** Load the SEI implementation bean if necessary */
-   protected abstract Class loadServiceEndpoint() throws ClassNotFoundException;
-
-   /** Create the instance of the SEI implementation bean if necessary */
-   protected abstract Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception;
-
-   /** Invoke the instance of the SEI implementation bean */
-   protected abstract void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception;
-
-   /** Destroy the instance of the SEI implementation bean if necessary */
-   protected abstract void destroyServiceEndpointInstance(Object seiImpl);
-
-   public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
-   {
-      return delegate.callRequestHandlerChain(sepMetaData, type);
-   }
-
-   public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
-   {
-      return delegate.callResponseHandlerChain(sepMetaData, type);
-   }
-
-   public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
-   {
-      delegate.closeHandlerChain(sepMetaData, type);
-   }
-
-   public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
-   {
-      return delegate.callFaultHandlerChain(sepMetaData, type, ex);
-   }
-
-   /** Invoke the the service endpoint */
-   public void invoke(InvocationContext reqContext) throws Exception
-   {
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)msgContext.getEndpointMetaData();
-      MessageAbstraction reqMessage = msgContext.getMessageAbstraction();
-
-      // Load the endpoint implementation bean
-      Class seImpl = loadServiceEndpoint();
-
-      // Create an instance of the endpoint implementation bean
-      Object seInstance = createServiceEndpointInstance(seImpl, reqContext);
-
-      // The direction of the message
-      DirectionHolder direction = new DirectionHolder(Direction.InBound);
-
-      // Get the order of pre/post handlerchains 
-      HandlerType[] handlerType = delegate.getHandlerTypeOrder();
-      HandlerType[] faultType = delegate.getHandlerTypeOrder();
-
-      // Set the required inbound context properties
-      setInboundContextProperties();
-
-      try
-      {
-         boolean oneway = false;
-         EndpointInvocation epInv = null;
-         OperationMetaData opMetaData = null;
-         CommonBinding binding = bindingProvider.getCommonBinding();
-         binding.setHeaderSource(delegate);
-
-         // call the request handler chain
-         boolean handlersPass = callRequestHandlerChain(sepMetaData, handlerType[0]);
-
-         // Unbind the request message
-         if (handlersPass)
-         {
-            // Get the operation meta data from the SOAP message
-            opMetaData = getDispatchDestination(sepMetaData, reqMessage);
-            msgContext.setOperationMetaData(opMetaData);
-            oneway = opMetaData.isOneWay();
-
-            /* 
-             * From JAX-WS 10.2.1 - "7. If the node does not understand how to process
-             * the message, then neither handlers nor the endpoint
-             * are invoked and instead the binding generates a SOAP must
-             * understand exception"
-             *
-             * Therefore, this must precede the ENDPOINT chain; however, The PRE
-             * chain still must happen first since the message may be encrypted, in which
-             * case the operation is still not known. Without knowing the operation, it 
-             * is not possible to determine what headers are understood by the endpoint.
-             */
-            if (binding instanceof CommonSOAPBinding)
-               ((CommonSOAPBinding)binding).checkMustUnderstand(opMetaData);
-
-            // Unbind the request message
-            epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
-         }
-
-         handlersPass = handlersPass && callRequestHandlerChain(sepMetaData, handlerType[1]);
-         handlersPass = handlersPass && callRequestHandlerChain(sepMetaData, handlerType[2]);
-
-         if (handlersPass)
-         {
-            msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
-            try
-            {
-               // Check if protocol handlers modified the payload
-               if (msgContext.isModified())
-               {
-                  log.debug("Handler modified payload, unbind message again");
-                  reqMessage = msgContext.getMessageAbstraction();
-                  epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
-               }
-
-               // Invoke the service endpoint
-               invokeServiceEndpointInstance(seInstance, epInv);
-            }
-            finally
-            {
-               msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
-            }
-
-            // Reverse the message direction
-            msgContext = processPivotInternal(msgContext, direction);
-
-            // Set the required outbound context properties
-            setOutboundContextProperties();
-
-            if (binding instanceof CommonSOAPBinding)
-               XOPContext.setMTOMEnabled(((CommonSOAPBinding)binding).isMTOMEnabled());
-
-            // Bind the response message
-            MessageAbstraction resMessage = binding.bindResponseMessage(opMetaData, epInv);
-            msgContext.setMessageAbstraction(resMessage);
-         }
-         else
-         {
-            // Reverse the message direction without calling the endpoint
-            MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-            msgContext = processPivotInternal(msgContext, direction);
-            msgContext.setMessageAbstraction(resMessage);
-         }
-
-         if (oneway == false)
-         {
-            // call the  response handler chain, removing the fault type entry will not call handleFault for that chain 
-            handlersPass = callResponseHandlerChain(sepMetaData, handlerType[2]);
-            faultType[2] = null;
-            handlersPass = handlersPass && callResponseHandlerChain(sepMetaData, handlerType[1]);
-            faultType[1] = null;
-            handlersPass = handlersPass && callResponseHandlerChain(sepMetaData, handlerType[0]);
-            faultType[0] = null;
-         }
-      }
-      catch (RuntimeException ex)
-      {
-         // Reverse the message direction
-         processPivotInternal(msgContext, direction);
-
-         try
-         {
-            CommonBinding binding = bindingProvider.getCommonBinding();
-            binding.bindFaultMessage(ex);
-
-            // call the fault handler chain
-            boolean handlersPass = true;
-            if (faultType[2] != null)
-               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[2], ex);
-            if (faultType[1] != null)
-               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[1], ex);
-            if (faultType[0] != null)
-               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[0], ex);
-         }
-         catch (RuntimeException subEx)
-         {
-            log.warn("Exception while processing handleFault: ", ex);
-            ex = subEx;
-         }
-         throw ex;
-      }
-      finally
-      {
-         closeHandlerChain(sepMetaData, handlerType[2]);
-         closeHandlerChain(sepMetaData, handlerType[1]);
-         closeHandlerChain(sepMetaData, handlerType[0]);
-
-         destroyServiceEndpointInstance(seInstance);
-      }
-   }
-
-   protected void setInboundContextProperties()
-   {
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      if (msgContext instanceof MessageContextJAXWS)
-      {
-         // Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler
-         msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
-      }
-   }
-
-   protected void setOutboundContextProperties()
-   {
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      if (msgContext instanceof MessageContextJAXWS)
-      {
-         // Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler
-         msgContext.put(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
-      }
-   }
-
-   private CommonMessageContext processPivotInternal(CommonMessageContext msgContext, DirectionHolder direction)
-   {
-      if (direction.getDirection() == Direction.InBound)
-      {
-         EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
-         if (epMetaData.getType() == EndpointMetaData.Type.JAXRPC)
-         {
-            msgContext = MessageContextJAXRPC.processPivot(msgContext);
-         }
-         else
-         {
-            msgContext = MessageContextJAXWS.processPivot(msgContext);
-         }
-         direction.setDirection(Direction.OutBound);
-      }
-      return msgContext;
-   }
-
-   private OperationMetaData getDispatchDestination(EndpointMetaData epMetaData, MessageAbstraction reqMessage) throws SOAPException
-   {
-      OperationMetaData opMetaData;
-
-      String bindingID = epMetaData.getBindingId();
-      if (HTTPBinding.HTTP_BINDING.equals(bindingID))
-      {
-         if (epMetaData.getOperations().size() != 1)
-            throw new IllegalStateException("Multiple operations not supported for HTTP binding");
-
-         opMetaData = epMetaData.getOperations().get(0);
-      }
-      else
-      {
-         SOAPMessageImpl soapMessage = (SOAPMessageImpl)reqMessage;
-
-         opMetaData = soapMessage.getOperationMetaData(epMetaData);
-         SOAPHeader soapHeader = soapMessage.getSOAPHeader();
-
-         // Report a MustUnderstand fault
-         if (opMetaData == null)
-         {
-            String faultString;
-            SOAPBody soapBody = soapMessage.getSOAPBody();
-            if (soapBody.getChildElements().hasNext())
-            {
-               SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
-               Name soapName = soapBodyElement.getElementName();
-               faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for: " + soapName;
-            }
-            else
-            {
-               faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for empty soap body";
-            }
-
-            // R2724 If an INSTANCE receives a message that is inconsistent with its WSDL description, it SHOULD generate a soap:Fault
-            // with a faultcode of "Client", unless a "MustUnderstand" or "VersionMismatch" fault is generated.
-            if (soapHeader != null && soapHeader.examineMustUnderstandHeaderElements(Constants.URI_SOAP11_NEXT_ACTOR).hasNext())
-            {
-               QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
-               throw new SOAPFaultException(faultCode, faultString, null, null);
-            }
-            else
-            {
-               QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
-               throw new SOAPFaultException(faultCode, faultString, null, null);
-            }
-         }
-      }
-      return opMetaData;
-   }
-
-   protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
-   {
-      String methodName = seiMethod.getName();
-      Class[] paramTypes = seiMethod.getParameterTypes();
-      for (int i = 0; i < paramTypes.length; i++)
-      {
-         Class paramType = paramTypes[i];
-         if (JavaUtils.isPrimitive(paramType) == false)
-         {
-            String paramTypeName = paramType.getName();
-            paramType = JavaUtils.loadJavaType(paramTypeName);
-            paramTypes[i] = paramType;
-         }
-      }
-
-      Method implMethod = implClass.getMethod(methodName, paramTypes);
-      return implMethod;
-   }
-
-   /** handle invocation exceptions */
-   public void handleInvocationException(Throwable th) throws Exception
-   {
-      if (th instanceof InvocationTargetException)
-      {
-         // unwrap the throwable raised by the service endpoint implementation
-         Throwable targetEx = ((InvocationTargetException)th).getTargetException();
-         handleInvocationThrowable(targetEx);
-      }
-
-      if (th instanceof MBeanException)
-      {
-         throw ((MBeanException)th).getTargetException();
-      }
-
-      handleInvocationThrowable(th);
-   }
-
-   private void handleInvocationThrowable(Throwable th) throws Exception
-   {
-      if (th instanceof Exception)
-      {
-         throw (Exception)th;
-      }
-      else if (th instanceof Error)
-      {
-         throw (Error)th;
-      }
-      else
-      {
-         throw new UndeclaredThrowableException(th);
-      }
-   }
-}

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractServiceEndpointServlet.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractServiceEndpointServlet.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractServiceEndpointServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,178 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.Writer;
-
-import javax.management.ObjectName;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.rpc.JAXRPCException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.ServletRequestContext;
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.ObjectNameFactory;
-import org.jboss.ws.integration.RequestHandler;
-import org.jboss.ws.integration.management.EndpointRegistry;
-import org.jboss.ws.integration.management.EndpointRegistryFactory;
-
-/**
- * A servlet that is installed for every web service endpoint.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public abstract class AbstractServiceEndpointServlet extends HttpServlet
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(AbstractServiceEndpointServlet.class);
-
-   protected Endpoint endpoint;
-   protected EndpointRegistry epRegistry;
-
-   public void init(ServletConfig config) throws ServletException
-   {
-      super.init(config);
-      epRegistry = EndpointRegistryFactory.getEndpointRegistry();
-   }
-
-   public void destroy()
-   {
-      super.destroy();
-   }
-
-   public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
-   {
-      if (endpoint == null)
-      {
-         String contextPath = req.getContextPath();
-         initServiceEndpoint(contextPath);
-      }
-      super.service(req, res);
-   }
-
-   public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
-   {
-      // Process a WSDL request
-      if (req.getParameter("wsdl") != null || req.getParameter("WSDL") != null)
-      {
-         res.setContentType("text/xml");
-         try
-         {
-            RequestHandler requestHandler = endpoint.getRequestHandler();
-            ServletRequestContext context = new ServletRequestContext(getServletContext(), req, res);
-            requestHandler.handleWSDLRequest(endpoint, res.getOutputStream(), context);
-         }
-         catch (Exception ex)
-         {
-            handleException(ex);
-         }
-      }
-      else
-      {
-         res.setStatus(405);
-         res.setContentType("text/plain");
-         Writer out = res.getWriter();
-         out.write("HTTP GET not supported");
-         out.flush();
-         out.close();
-      }
-   }
-
-   public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
-   {
-      log.debug("doPost: " + req.getRequestURI());
-
-      ServletInputStream inputStream = req.getInputStream();
-      ServletOutputStream outputStream = res.getOutputStream();
-      try
-      {
-         RequestHandler requestHandler = endpoint.getRequestHandler();
-         ServletRequestContext context = new ServletRequestContext(getServletContext(), req, res);
-         requestHandler.handleRequest(endpoint, inputStream, outputStream, context);
-      }
-      catch (Exception ex)
-      {
-         handleException(ex);
-      }
-      finally 
-      {
-         try
-         {
-            outputStream.flush();
-            outputStream.close();
-         }
-         catch (IOException ioex)
-         {
-            log.error("Cannot flush output stream");
-         }
-         
-      }
-   }
-
-   private void handleException(Exception ex) throws ServletException
-   {
-      log.error("Error processing web service request", ex);
-
-      if (ex instanceof JAXRPCException)
-         throw (JAXRPCException)ex;
-
-      throw new ServletException(ex);
-   }
-
-   /** Initialize the service endpoint
-    */
-   protected void initServiceEndpoint(String contextPath)
-   {
-      String servletName = getServletName();
-      if (contextPath.startsWith("/"))
-         contextPath = contextPath.substring(1);
-
-      for (ObjectName sepId : epRegistry.getEndpoints())
-      {
-         String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
-         String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
-         if (servletName.equals(propEndpoint) && contextPath.equals(propContext))
-         {
-            endpoint = epRegistry.getEndpoint(sepId);
-            break;
-         }
-      }
-
-      if (endpoint == null)
-      {
-         ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + ","
-               + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
-         throw new WSException("Cannot obtain endpoint for: " + oname);
-      }
-   }
-}

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptor.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -36,7 +36,7 @@
 import org.jboss.metadata.SessionMetaData;
 import org.jboss.metadata.ApplicationMetaData.WebserviceDescription;
 import org.jboss.metadata.ApplicationMetaData.Webservices;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ApplicationMetaDataAdaptorEJB3.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -39,7 +39,7 @@
 import org.jboss.ejb3.metamodel.WebserviceDescription;
 import org.jboss.ejb3.metamodel.Webservices;
 import org.jboss.logging.Logger;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/DeploymentInfoAdapter.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -30,7 +30,7 @@
 import org.jboss.metadata.ApplicationMetaData;
 import org.jboss.metadata.WebMetaData;
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 
 // $Id$
 

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

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointHandlerDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointHandlerDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointHandlerDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,115 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import java.util.Map;
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.LifecycleHandler;
-import org.jboss.ws.integration.RequestHandler;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.invocation.InvocationHandler;
-
-/**
- * A deployer that assigns the handlers to the Endpoint 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointHandlerDeployer extends AbstractDeployer
-{
-   private String requestHandler;
-   private String lifecycleHandler;
-   private Map<String,String> invocationHandler;
-
-   public void setLifecycleHandler(String handler)
-   {
-      this.lifecycleHandler = handler;
-   }
-
-   public void setRequestHandler(String handler)
-   {
-      this.requestHandler = handler;
-   }
-
-   public void setInvocationHandler(Map<String,String> handlers)
-   {
-      this.invocationHandler = handlers;
-   }
-
-   @Override
-   public void create(Deployment dep)
-   {
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ep.setRequestHandler(getRequestHandler(dep));
-         ep.setLifecycleHandler(getLifecycleHandler(dep));
-         ep.setInvocationHandler(getInvocationHandler(dep));
-      }
-   }
-
-   private RequestHandler getRequestHandler(Deployment dep)
-   {
-      try
-      {
-         Class<?> handlerClass = dep.getClassLoader().loadClass(requestHandler);
-         return (RequestHandler)handlerClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Cannot load request handler: " + requestHandler);
-      }
-   }
-
-   private LifecycleHandler getLifecycleHandler(Deployment dep)
-   {
-      try
-      {
-         Class<?> handlerClass = dep.getClassLoader().loadClass(lifecycleHandler);
-         return (LifecycleHandler)handlerClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Cannot load lifecycle handler: " + lifecycleHandler);
-      }
-   }
-
-   private InvocationHandler getInvocationHandler(Deployment dep)
-   {
-      String className = invocationHandler.get(dep.getType().toString());
-      if (className == null)
-         throw new IllegalStateException("Cannot obtain invocation handler for: " + dep.getType());
-      
-      try
-      {
-         Class<?> handlerClass = dep.getClassLoader().loadClass(className);
-         return (InvocationHandler)handlerClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Cannot load invocation handler: " + className);
-      }
-   }
-}
\ No newline at end of file

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointLifecycleDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointLifecycleDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointLifecycleDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-
-/**
- * A deployer that that calls the endpoint lifecycle handler 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointLifecycleDeployer extends AbstractDeployer
-{
-   @Override
-   public void create(Deployment dep)
-   {
-      for (Endpoint ep : dep.getService().getEndpoints())
-         ep.getLifecycleHandler().create(ep);
-   }
-
-   @Override
-   public void start(Deployment dep)
-   {
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ep.getLifecycleHandler().start(ep);
-      }
-   }
-
-   @Override
-   public void stop(Deployment dep)
-   {
-      Service service = dep.getService();
-      if (service != null)
-      {
-         for (Endpoint ep : service.getEndpoints())
-         {
-            ep.getLifecycleHandler().stop(ep);
-         }
-      }
-   }
-
-   @Override
-   public void destroy(Deployment dep)
-   {
-      Service service = dep.getService();
-      if (service != null)
-      {
-         for (Endpoint ep : service.getEndpoints())
-         {
-            ep.getLifecycleHandler().destroy(ep);
-         }
-      }
-   }
-}

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointNameDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointNameDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/EndpointNameDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * A deployer that assigns the complete name to the Endpoint 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class EndpointNameDeployer extends AbstractDeployer
-{
-   @Override
-   public void create(Deployment dep)
-   {
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
-         if (sepMetaData == null)
-            throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-         ObjectName sepID = sepMetaData.getServiceEndpointID();
-         ep.setName(sepID);
-      }
-   }
-}
\ No newline at end of file

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,282 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.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.security.SecurityContext;
-import org.jboss.security.plugins.SecurityContextAssociation;
-import org.jboss.security.plugins.SecurityContextFactory;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.EndpointInvocation;
-import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
-import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-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.integration.jboss50.AbstractWebServiceDeployer;
-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);
-
-         // Copy the SecurityContext
-         if (principal != null)
-         {
-            SecurityContext sc = SecurityContextAssociation.getSecurityContext();
-            if (sc == null)
-            {
-               log.error("Cannot obtain SecurityContext from container that hosts the endpoint");
-               sc = SecurityContextFactory.createSecurityContext(principal, credential, null, null);
-            }
-            inv.setSecurityContext(sc);
-         }
-         
-         // 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);
-      }
-   }
-}

Added: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java	                        (rev 0)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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);
+      }
+   }
+}

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB3.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -40,10 +40,11 @@
 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.UnifiedDeploymentInfo;
+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;

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerJSE.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerJSE.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerJSE.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-// $Id$
-
-import java.lang.reflect.Method;
-
-import javax.xml.rpc.ServiceException;
-import javax.xml.rpc.server.ServiceLifecycle;
-import javax.xml.rpc.server.ServletEndpointContext;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.WebServiceContext;
-
-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.jaxrpc.ServletEndpointContextImpl;
-import org.jboss.ws.core.jaxws.WebServiceContextInjector;
-import org.jboss.ws.core.jaxws.WebServiceContextJSE;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.server.ServletRequestContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.integration.invocation.InvocationContext;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * Handles invocations on JSE endpoints.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerJSE extends AbstractInvocationHandler
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(InvocationHandlerJSE.class);
-
-   /** Load the SEI implementation bean if necessary */
-   public Class loadServiceEndpoint() throws ClassNotFoundException
-   {
-      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      ClassLoader cl = sepMetaData.getClassLoader();
-      String seiImplName = sepMetaData.getServiceEndpointImplName();
-      Class seiImplClass = cl.loadClass(seiImplName);
-      return seiImplClass;
-   }
-
-   /** Create an instance of the SEI implementation bean if necessary */
-   public Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws IllegalAccessException, InstantiationException
-   {
-      Object seiImpl = seiImplClass.newInstance();
-      if (seiImpl instanceof ServiceLifecycle && context != null)
-      {
-         try
-         {
-            ServiceLifecycle serviceLifecycle = ((ServiceLifecycle)seiImpl);
-            ServletEndpointContext servletEndpointContext = new ServletEndpointContextImpl((ServletRequestContext)context);
-            serviceLifecycle.init(servletEndpointContext);
-         }
-         catch (ServiceException ex)
-         {
-            throw new WSException(ex);
-         }
-      }
-      return seiImpl;
-   }
-
-   /** Invoke an instance of the SEI implementation bean */
-   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws SOAPFaultException, Exception
-   {
-      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
-      try
-      {
-         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-         if (msgContext instanceof SOAPMessageContextJAXWS)
-         {
-            WebServiceContext wsContext = new WebServiceContextJSE((SOAPMessageContextJAXWS)msgContext);
-            new WebServiceContextInjector().injectContext(seiImpl, wsContext);
-         }
-
-         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);
-      }
-   }
-
-   /** Destroy an instance of the SEI implementation bean if necessary */
-   public void destroyServiceEndpointInstance(Object seiImpl)
-   {
-      if (seiImpl instanceof ServiceLifecycle)
-      {
-         ((ServiceLifecycle)seiImpl).destroy();
-      }
-   }
-}

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/JBossContextServlet.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/JBossContextServlet.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/JBossContextServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.server.legacy.CommonContextServlet;
-import org.jboss.ws.core.server.legacy.ServiceEndpointManagerFactory;
-
-/**
- * The servlet that that is associated with context /jbossws
- *
- * @author Thomas.Diesler at jboss.org
- * @since 21-Mar-2005
- */
-public class JBossContextServlet extends CommonContextServlet
-{
-   // provide logging
-   protected final Logger log = Logger.getLogger(JBossContextServlet.class);
-
-   protected void initServiceEndpointManager()
-   {
-      ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
-      epManager = factory.getServiceEndpointManager();
-   }
-}

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/LifecycleHandlerImpl.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/LifecycleHandlerImpl.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/LifecycleHandlerImpl.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * A lifecycle handler
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class LifecycleHandlerImpl extends org.jboss.ws.integration.LifecycleHandlerImpl
-{
-   public void start(Endpoint endpoint)
-   {
-      super.start(endpoint);
-      log.info("WebService started: " + getEndpointAddress(endpoint));
-   }
-
-   public void stop(Endpoint endpoint)
-   {
-      super.stop(endpoint);
-      log.info("WebService stoped: " + getEndpointAddress(endpoint));
-   }
-
-   private String getEndpointAddress(Endpoint ep)
-   {
-      ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      return sepMetaData.getEndpointAddress();
-   }
-}

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -28,7 +28,7 @@
 import org.jboss.metadata.NameValuePair;
 import org.jboss.metadata.WebMetaData;
 import org.jboss.metadata.web.Servlet;
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
+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;

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PortComponentLinkServlet.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PortComponentLinkServlet.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PortComponentLinkServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.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();
-   }
-}

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PublishContractDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PublishContractDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PublishContractDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import java.io.IOException;
-
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.WSDLFilePublisher;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.WSDeploymentException;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer that publishes the wsdl 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class PublishContractDeployer 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");
-
-      try
-      {
-         WSDLFilePublisher publisher = new WSDLFilePublisher(udi);
-         publisher.publishWsdlFiles(umd);
-      }
-      catch (IOException ex)
-      {
-         throw new WSDeploymentException(ex);
-      }
-   }
-}
\ No newline at end of file

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,415 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.activation.DataHandler;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPPart;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.http.HTTPBinding;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.CommonBinding;
-import org.jboss.ws.core.CommonBindingProvider;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.HTTPMessageImpl;
-import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.MessageTrace;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
-import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
-import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.server.MimeHeaderSource;
-import org.jboss.ws.core.server.ServletHeaderSource;
-import org.jboss.ws.core.server.ServletRequestContext;
-import org.jboss.ws.core.server.WSDLRequestHandler;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.soap.MessageFactoryImpl;
-import org.jboss.ws.core.soap.SOAPConnectionImpl;
-import org.jboss.ws.core.soap.SOAPMessageImpl;
-import org.jboss.ws.core.utils.DOMWriter;
-import org.jboss.ws.core.utils.ThreadLocalAssociation;
-import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
-import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.RequestHandler;
-import org.jboss.ws.integration.Endpoint.EndpointState;
-import org.jboss.ws.integration.invocation.InvocationContext;
-import org.jboss.ws.integration.invocation.InvocationHandler;
-import org.jboss.ws.integration.management.ServerConfig;
-import org.jboss.ws.integration.management.ServerConfigFactory;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.w3c.dom.Document;
-
-/**
- * A request handler
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class RequestHandlerImpl implements RequestHandler
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(RequestHandlerImpl.class);
-
-   public void handleRequest(Endpoint endpoint, InputStream inputStream, OutputStream outputStream, InvocationContext context)
-   {
-      log.debug("handleRequest: " + endpoint.getName());
-
-      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      ServletRequestContext reqContext = (ServletRequestContext)context;
-
-      Type type = sepMetaData.getType();
-
-      ServletContext servletContext = reqContext.getServletContext();
-      HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
-      HttpServletResponse httpResponse = reqContext.getHttpServletResponse();
-      ServletHeaderSource headerSource = new ServletHeaderSource(httpRequest, httpResponse);
-
-      // Build the message context
-      CommonMessageContext msgContext;
-      if (type == EndpointMetaData.Type.JAXRPC)
-      {
-         msgContext = new SOAPMessageContextJAXRPC();
-         msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
-         msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
-         msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
-      }
-      else
-      {
-         msgContext = new SOAPMessageContextJAXWS();
-         msgContext.put(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, new Boolean(false));
-         msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
-         msgContext.put(MessageContextJAXWS.HTTP_REQUEST_HEADERS, headerSource.getHeaderMap());
-         msgContext.put(MessageContextJAXWS.HTTP_REQUEST_METHOD, httpRequest.getMethod());
-         msgContext.put(MessageContextJAXWS.QUERY_STRING, httpRequest.getQueryString());
-         msgContext.put(MessageContextJAXWS.PATH_INFO, httpRequest.getPathInfo());
-         msgContext.put(MessageContextJAXWS.SERVLET_CONTEXT, servletContext);
-         msgContext.put(MessageContextJAXWS.SERVLET_REQUEST, httpRequest);
-         msgContext.put(MessageContextJAXWS.SERVLET_RESPONSE, httpResponse);
-
-      }
-      msgContext.setEndpointMetaData(sepMetaData);
-
-      // Associate a message context with the current thread
-      MessageContextAssociation.pushMessageContext(msgContext);
-
-      try
-      {
-         MessageAbstraction resMessage = processRequest(endpoint, headerSource, reqContext, inputStream);
-
-         // Replace the message context with the response context
-         msgContext = MessageContextAssociation.peekMessageContext();
-
-         Map<String, List<String>> headers = (Map<String, List<String>>)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_HEADERS);
-         if (headers != null)
-            headerSource.setHeaderMap(headers);
-
-         Integer code = (Integer)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_CODE);
-         if (code != null)
-            httpResponse.setStatus(code.intValue());
-
-         boolean isFault = false;
-         if (resMessage instanceof SOAPMessage)
-         {
-            SOAPPart part = ((SOAPMessage)resMessage).getSOAPPart();
-            if (part == null)
-               throw new SOAPException("Cannot obtain SOAPPart from response message");
-
-            // R1126 An INSTANCE MUST return a "500 Internal Server Error" HTTP status code
-            // if the response envelope is a Fault.
-            //
-            // Also, a one-way operation must show up as empty content, and can be detected
-            // by a null envelope.
-            SOAPEnvelope soapEnv = part.getEnvelope();
-            isFault = soapEnv != null && soapEnv.getBody().hasFault();
-            if (isFault && httpResponse != null)
-            {
-               httpResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-            }
-         }
-
-         sendResponse(outputStream, msgContext, isFault);
-      }
-      catch (Exception ex)
-      {
-         WSException.rethrow(ex);
-      }
-      finally
-      {
-         // Reset the message context association
-         MessageContextAssociation.popMessageContext();
-
-         // clear thread local storage
-         ThreadLocalAssociation.clear();
-      }
-   }
-
-   private void sendResponse(OutputStream outputStream, CommonMessageContext msgContext, boolean isFault) throws SOAPException, IOException
-   {
-      MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-      String wsaTo = null;
-
-      // Get the destination from the AddressingProperties
-      AddressingProperties outProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND);
-      if (outProps != null && outProps.getTo() != null)
-      {
-         AddressingConstantsImpl ADDR = new AddressingConstantsImpl();
-         wsaTo = outProps.getTo().getURI().toString();
-         if (wsaTo.equals(ADDR.getAnonymousURI()))
-            wsaTo = null;
-      }
-      if (wsaTo != null)
-      {
-         log.debug("Sending response to addressing destination: " + wsaTo);
-         new SOAPConnectionImpl().callOneWay((SOAPMessage)resMessage, wsaTo);
-      }
-      else
-      {
-         resMessage.writeTo(outputStream);
-      }
-   }
-
-   /**
-    * Handle a request to this web service endpoint
-    */
-   private MessageAbstraction processRequest(Endpoint endpoint, MimeHeaderSource headerSource, ServletRequestContext reqContext, InputStream inputStream)
-         throws BindingException
-   {
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-
-      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (sepMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      long beginProcessing = 0;
-      ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         EndpointState state = endpoint.getState();
-         if (state != EndpointState.STARTED)
-         {
-            QName faultCode = Constants.SOAP11_FAULT_CODE_SERVER;
-            String faultString = "Endpoint cannot handle requests in state: " + state;
-            throw new SOAPFaultException(faultCode, faultString, null, null);
-         }
-
-         log.debug("BEGIN handleRequest: " + endpoint.getName());
-         beginProcessing = initRequestMetrics(endpoint);
-
-         MimeHeaders headers = (headerSource != null ? headerSource.getMimeHeaders() : null);
-
-         MessageAbstraction reqMessage;
-
-         String bindingID = sepMetaData.getBindingId();
-         if (HTTPBinding.HTTP_BINDING.equals(bindingID))
-         {
-            reqMessage = new HTTPMessageImpl(headers, inputStream);
-         }
-         else
-         {
-            MessageFactoryImpl msgFactory = new MessageFactoryImpl();
-            msgFactory.setServiceMode(sepMetaData.getServiceMode());
-            msgFactory.setStyle(sepMetaData.getStyle());
-
-            reqMessage = (SOAPMessageImpl)msgFactory.createMessage(headers, inputStream);
-         }
-
-         // Associate current message with message context
-         msgContext.setMessageAbstraction(reqMessage);
-
-         // debug the incomming message
-         MessageTrace.traceMessage("Incoming Request Message", reqMessage);
-
-         // Set the thread context class loader
-         ClassLoader classLoader = sepMetaData.getClassLoader();
-         Thread.currentThread().setContextClassLoader(classLoader);
-
-         // Invoke the service endpoint
-         InvocationHandler invoker = endpoint.getInvocationHandler();
-         invoker.invoke(reqContext);
-
-         // Get the response message context
-         msgContext = MessageContextAssociation.peekMessageContext();
-
-         // Get the response message
-         MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-         if (resMessage != null)
-            postProcessResponse(headerSource, resMessage);
-
-         return resMessage;
-      }
-      catch (Exception ex)
-      {
-         MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-
-         // In case we have an exception before the invoker is called
-         // we create the fault message here.
-         if (resMessage == null || resMessage.isFaultMessage() == false)
-         {
-            CommonBindingProvider bindingProvider = new CommonBindingProvider(sepMetaData);
-            CommonBinding binding = bindingProvider.getCommonBinding();
-            resMessage = binding.bindFaultMessage(ex);
-         }
-
-         if (resMessage != null)
-            postProcessResponse(headerSource, resMessage);
-
-         return resMessage;
-      }
-      finally
-      {
-         try
-         {
-            MessageAbstraction resMessage = msgContext.getMessageAbstraction();
-            if (resMessage != null)
-            {
-               if (resMessage.isFaultMessage())
-               {
-                  processFaultMetrics(endpoint, beginProcessing);
-               }
-               else
-               {
-                  processResponseMetrics(endpoint, beginProcessing);
-               }
-            }
-         }
-         catch (Exception ex)
-         {
-            log.error("Cannot process metrics", ex);
-         }
-
-         // Reset the thread context class loader
-         Thread.currentThread().setContextClassLoader(ctxClassLoader);
-         log.debug("END handleRequest: " + endpoint.getName());
-      }
-   }
-
-   private long initRequestMetrics(Endpoint endpoint)
-   {
-      return 0;
-   }
-
-   private void processResponseMetrics(Endpoint endpoint, long beginProcessing)
-   {
-   }
-
-   private void processFaultMetrics(Endpoint endpoint, long beginProcessing)
-   {
-   }
-
-   /** Set response mime headers
-    */
-   private void postProcessResponse(MimeHeaderSource headerSource, MessageAbstraction resMessage)
-   {
-      try
-      {
-         // Set the outbound headers
-         if (headerSource != null && resMessage instanceof SOAPMessage)
-         {
-            XOPContext.eagerlyCreateAttachments();
-            ((SOAPMessage)resMessage).saveChanges();
-            headerSource.setMimeHeaders(resMessage.getMimeHeaders());
-         }
-
-         // debug the outgoing message
-         MessageTrace.traceMessage("Outgoing Response Message", resMessage);
-      }
-      catch (Exception ex)
-      {
-         WSException.rethrow("Faild to post process response message", ex);
-      }
-   }
-
-   public void handleWSDLRequest(Endpoint endpoint, OutputStream outputStream, InvocationContext context)
-   {
-      log.debug("handleWSDLRequest: " + endpoint.getName());
-
-      ServerEndpointMetaData epMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-      if (epMetaData == null)
-         throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-      ServletRequestContext reqContext = (ServletRequestContext)context;
-      HttpServletRequest req = reqContext.getHttpServletRequest();
-
-      try
-      {
-         // For the base document the resourcePath should be null
-         String resPath = (String)req.getParameter("resource");
-         URL reqURL = new URL(req.getRequestURL().toString());
-
-         String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() + ":" + reqURL.getPort();
-
-         ServerConfigFactory factory = ServerConfigFactory.getInstance();
-         ServerConfig config = factory.getServerConfig();
-         if (config.getWebServiceHost().equals(ServerConfig.UNDEFINED_HOSTNAME) == false)
-         {
-            wsdlHost = config.getWebServiceHost();
-         }
-         log.debug("WSDL request, using host: " + wsdlHost);
-
-         WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
-         Document document = wsdlRequestHandler.getDocumentForPath(reqURL, wsdlHost, resPath);
-
-         OutputStreamWriter writer = new OutputStreamWriter(outputStream);
-         new DOMWriter(writer).setPrettyprint(true).print(document.getDocumentElement());
-         outputStream.flush();
-         outputStream.close();
-      }
-      catch (RuntimeException rte)
-      {
-         throw rte;
-      }
-      catch (IOException ex)
-      {
-         throw new WSException(ex);
-      }
-   }
-}

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB21.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -29,8 +29,8 @@
 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.server.UnifiedDeploymentInfo;
 import org.jboss.ws.core.utils.DOMUtils;
 import org.w3c.dom.Element;
 

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointGeneratorEJB3.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -30,8 +30,8 @@
 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.server.UnifiedDeploymentInfo;
 import org.jboss.ws.core.utils.DOMUtils;
 import org.w3c.dom.Element;
 

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointServlet.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointServlet.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-// $Id$
-
-import javax.servlet.ServletContext;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * A servlet that is installed for every web service endpoint.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class ServiceEndpointServlet extends AbstractServiceEndpointServlet
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(ServiceEndpointServlet.class);
-
-   /** Initialize the service endpoint
-    */
-   protected void initServiceEndpoint(String contextPath)
-   {
-      super.initServiceEndpoint(contextPath);
-
-      // read the config name/file from web.xml
-      ServletContext ctx = getServletContext();
-      String configName = ctx.getInitParameter("jbossws-config-name");
-      String configFile = ctx.getInitParameter("jbossws-config-file");
-      if (configName != null || configFile != null)
-      {
-         ServerEndpointMetaData epMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
-         if (epMetaData == null)
-            throw new IllegalStateException("Cannot obtain endpoint meta data");
-
-         log.debug("Updating service endpoint config\n  config-name: " + configName + "\n  config-file: " + configFile);
-         epMetaData.setConfigName(configName, configFile);
-      }
-   }
-}

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedDeploymentInfoDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -24,12 +24,12 @@
 //$Id$
 
 import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.ws.core.server.JAXWSDeployment;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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.builder.jaxrpc.JAXRPCDeployment;
 import org.jboss.ws.metadata.webservices.WebservicesMetaData;
 
 /**

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedMetaDataAssociationDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedMetaDataAssociationDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedMetaDataAssociationDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,86 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer that assigns the EndpointMetaData to the Endpoint 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class UnifiedMetaDataAssociationDeployer extends AbstractDeployer
-{
-   @Override
-   public void create(Deployment dep)
-   {
-      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
-      if (umd == null)
-         throw new IllegalStateException("Cannot obtain unified meta data");
-
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
-         if (sepMetaData == null)
-         {
-            sepMetaData = getEndpointMetaData(umd, ep.getName());
-            sepMetaData.setServiceEndpointImplName(ep.getEndpointImpl().getName());
-            ep.addMetaData(ServerEndpointMetaData.class, sepMetaData);
-         }
-      }
-   }
-
-   private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, ObjectName epName)
-   {
-      String propEndpoint = epName.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
-
-      ServerEndpointMetaData epMetaData = null;
-      for (ServiceMetaData serviceMetaData : umd.getServices())
-      {
-         for (EndpointMetaData aux : serviceMetaData.getEndpoints())
-         {
-            String linkName = ((ServerEndpointMetaData)aux).getLinkName();
-            if (propEndpoint.equals(linkName))
-            {
-               epMetaData = (ServerEndpointMetaData)aux;
-               break;
-            }
-         }
-      }
-
-      if (epMetaData == null)
-         throw new IllegalStateException("Cannot find endpoint meta data for: " + epName);
-
-      return epMetaData;
-   }
-}
\ No newline at end of file

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedMetaDataDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedMetaDataDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/UnifiedMetaDataDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import org.jboss.ws.core.server.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.builder.jaxrpc.JAXRPCDeployment;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer that builds the UnifiedDeploymentInfo 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class UnifiedMetaDataDeployer extends AbstractDeployer
-{
-   @Override
-   public void create(Deployment dep)
-   {
-      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
-      if (umd == null)
-      {
-         UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
-         if (udi == null)
-            throw new IllegalStateException("Cannot obtain unified deployement info");
-         
-         if (udi.type == DeploymentType.JAXRPC_JSE)
-         {
-            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
-            umd = builder.buildMetaData((JAXRPCDeployment)udi);
-         }
-         else if (udi.type == DeploymentType.JAXRPC_EJB21)
-         {
-            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
-            umd = builder.buildMetaData((JAXRPCDeployment)udi);
-         }
-         else if (udi.type == DeploymentType.JAXWS_JSE)
-         {
-            JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
-            umd = builder.buildMetaData(udi);
-         }
-         else if (udi.type == DeploymentType.JAXWS_EJB3)
-         {
-            JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
-            umd = builder.buildMetaData(udi);
-         }
-         else
-         {
-            throw new IllegalStateException("Invalid type:  " + udi.type);
-         }
-         
-         dep.getContext().addAttachment(UnifiedMetaData.class, umd);
-      }
-   }
-}
\ No newline at end of file

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppDeployerDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -34,8 +34,8 @@
 import org.jboss.logging.Logger;
 import org.jboss.virtual.VFS;
 import org.jboss.virtual.VirtualFile;
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;

Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import org.jboss.ws.core.server.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

Added: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java	                        (rev 0)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebAppGeneratorDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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

Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataAdaptor.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -35,7 +35,7 @@
 import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
 import org.jboss.metadata.web.Servlet;
 import org.jboss.metadata.web.ServletMapping;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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;

Modified: trunk/integration-jboss50/src/resources/jbossws.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration-jboss50/src/resources/jbossws.sar/META-INF/jbossws-beans.xml	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-jboss50/src/resources/jbossws.sar/META-INF/jbossws-beans.xml	2007-05-04 12:20:09 UTC (rev 2959)
@@ -128,30 +128,30 @@
     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.integration.jboss50.jbossws.EagerInitializeDeployer"/>
-  <bean name="WSEndpointHandlerDeployer" class="org.jboss.ws.integration.jboss50.jbossws.EndpointHandlerDeployer">
-    <property name="requestHandler">org.jboss.ws.integration.jboss50.jbossws.RequestHandlerImpl</property>
-    <property name="lifecycleHandler">org.jboss.ws.integration.jboss50.jbossws.LifecycleHandlerImpl</property>
+  <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.integration.jboss50.jbossws.InvocationHandlerJSE</value></entry>
+        <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.integration.jboss50.jbossws.InvocationHandlerJSE</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.integration.jboss50.jbossws.EndpointLifecycleDeployer"/>
-  <bean name="WSEndpointNameDeployer" class="org.jboss.ws.integration.jboss50.jbossws.EndpointNameDeployer"/>
+  <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="WSEndpointValidationDeployer" class="org.jboss.ws.integration.deployment.EndpointValidationDeployer"/>
   <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.integration.jboss50.jbossws.PublishContractDeployer"/>
+  <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.integration.jboss50.jbossws.UnifiedMetaDataAssociationDeployer"/>
-  <bean name="WSUnifiedMetaDataDeployer" class="org.jboss.ws.integration.jboss50.jbossws.UnifiedMetaDataDeployer"/>
+  <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>
@@ -159,8 +159,8 @@
   </bean>
   
   <!-- Deployer helper beans -->  
-  <bean name="WSServiceEndpointPublisher" class="org.jboss.ws.core.server.ServiceEndpointPublisher">
-    <property name="servletClass">org.jboss.ws.integration.jboss50.jbossws.ServiceEndpointServlet</property>
+  <bean name="WSServiceEndpointPublisher" class="org.jboss.ws.core.deployment.ServiceEndpointPublisher">
+    <property name="servletClass">org.jboss.ws.core.server.ServiceEndpointServlet</property>
   </bean>
   
   <!-- 

Modified: trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java
===================================================================
--- trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -37,8 +37,8 @@
 import javax.servlet.ServletContext;
 
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.ServiceEndpointPublisher;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.core.utils.DOMUtils;
 import org.jboss.ws.integration.Endpoint;
 import org.jboss.ws.integration.ResourceLoaderAdapter;

Copied: trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/ServiceEndpointDeployer.java (from rev 2953, trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointDeployer.java)
===================================================================
--- trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/ServiceEndpointDeployer.java	                        (rev 0)
+++ trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/ServiceEndpointDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,233 @@
+/*
+ * 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.tomcat;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.deployment.JAXRPCDeployment;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.WSDLFilePublisher;
+import org.jboss.ws.core.server.legacy.ServiceEndpointInfo;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManager;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
+import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
+import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * The POJO deployer for web service endpoints. This Deployer is already decoupled from the target
+ * container (i.e. JBoss, Tomcat). The containers deployer architecture should be used to populate
+ * the UnifiedDeploymentInfo object.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointDeployer
+{
+   // logging support
+   private static Logger log = Logger.getLogger(ServiceEndpointDeployer.class);
+
+   // default bean name
+   public static final String BEAN_NAME = "ServiceEndpointDeployer";
+
+   // The ServiceEndpointManger injected by the kernel
+   private ServiceEndpointManager epManager;
+
+   // Maps the deployment url to UMDM
+   private Map<String, UnifiedMetaData> metaDataMap = new ConcurrentHashMap<String, UnifiedMetaData>();
+
+   // Injected by the Microkernel
+   public void setServiceEndpointManager(ServiceEndpointManager epManager)
+   {
+      this.epManager = epManager;
+   }
+
+   public void create(UnifiedDeploymentInfo udi)
+   {
+      if(log.isDebugEnabled()) log.debug("create: " + udi.name);
+      try
+      {
+         UnifiedMetaData wsMetaData;
+         if (udi.type == DeploymentType.JAXRPC_JSE)
+         {
+            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
+            wsMetaData = builder.buildMetaData((JAXRPCDeployment)udi);
+         }
+         else if (udi.type == DeploymentType.JAXRPC_EJB21)
+         {
+            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
+            wsMetaData = builder.buildMetaData((JAXRPCDeployment)udi);
+         }
+         else if (udi.type == DeploymentType.JAXWS_JSE)
+         {
+            JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
+            wsMetaData = builder.buildMetaData(udi);
+         }
+         else if (udi.type == DeploymentType.JAXWS_EJB3)
+         {
+            JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
+            wsMetaData = builder.buildMetaData(udi);
+         }
+         else
+         {
+            throw new IllegalStateException("Invalid type:  " + udi.type);
+         }
+
+         metaDataMap.put(udi.name, wsMetaData);
+
+         for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
+         {
+            for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
+            {
+               ServiceEndpointInfo seInfo = new ServiceEndpointInfo(udi, (ServerEndpointMetaData)epMetaData);
+               epManager.createServiceEndpoint(seInfo);
+            }
+         }
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot create service endpoint", ex);
+         if (ex instanceof RuntimeException)
+            throw (RuntimeException)ex;
+
+         throw new WSException(ex);
+      }
+   }
+
+   public void start(UnifiedDeploymentInfo udi)
+   {
+      if(log.isDebugEnabled()) log.debug("start: " + udi.name);
+      try
+      {
+         UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
+         if (wsMetaData != null)
+         {
+            // late initialization of the web context loader
+            if (wsMetaData.getClassLoader() != udi.classLoader)
+               wsMetaData.setClassLoader(udi.classLoader);
+
+            // Publish the WSDL file
+            WSDLFilePublisher wsdlfp = new WSDLFilePublisher(udi);
+            wsdlfp.publishWsdlFiles(wsMetaData);
+            for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
+            {
+               for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
+               {
+                  ObjectName sepID = ((ServerEndpointMetaData)epMetaData).getServiceEndpointID();
+                  epManager.startServiceEndpoint(sepID);
+               }
+            }
+         }
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot start service endpoint", ex);
+         if (ex instanceof RuntimeException)
+            throw (RuntimeException)ex;
+
+         throw new WSException(ex);
+      }
+   }
+
+   public void stop(UnifiedDeploymentInfo udi)
+   {
+      if(log.isDebugEnabled()) log.debug("stop: " + udi.name);
+      try
+      {
+         UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
+         if (wsMetaData != null)
+         {
+            // Stop the service endpoints
+            for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
+            {
+               for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
+               {
+                  ObjectName sepID = ((ServerEndpointMetaData)epMetaData).getServiceEndpointID();
+                  epManager.stopServiceEndpoint(sepID);
+               }
+            }
+
+            // Unpublish the WSDL file
+            WSDLFilePublisher wsdlfp = new WSDLFilePublisher(udi);
+            wsdlfp.unpublishWsdlFiles();
+         }
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot stop service endpoint", ex);
+         if (ex instanceof RuntimeException)
+            throw (RuntimeException)ex;
+
+         throw new WSException(ex);
+      }
+   }
+
+   public void destroy(UnifiedDeploymentInfo udi)
+   {
+      if(log.isDebugEnabled()) log.debug("destroy: " + udi.name);
+      try
+      {
+         UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
+         if (wsMetaData != null)
+         {
+            // Destroy the service endpoints
+            for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
+            {
+               for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
+               {
+                  ObjectName sepID = ((ServerEndpointMetaData)epMetaData).getServiceEndpointID();
+                  epManager.destroyServiceEndpoint(sepID);
+               }
+            }
+            removeUnifiedMetaData(udi);
+         }
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot destroy service endpoint", ex);
+         if (ex instanceof RuntimeException)
+            throw (RuntimeException)ex;
+
+         throw new WSException(ex);
+      }
+   }
+
+   public UnifiedMetaData getUnifiedMetaData(UnifiedDeploymentInfo udi)
+   {
+      UnifiedMetaData wsMetaData = metaDataMap.get(udi.name);
+      return wsMetaData;
+   }
+   
+   public void removeUnifiedMetaData(UnifiedDeploymentInfo udi)
+   {
+      metaDataMap.remove(udi.name);
+   }
+}
\ No newline at end of file

Modified: trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java
===================================================================
--- trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -31,7 +31,7 @@
 import java.util.Set;
 
 import org.jboss.logging.Logger;
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
+import org.jboss.ws.core.deployment.ServiceEndpointPublisher;
 
 /**
  * Publish the HTTP service endpoint to Tomcat 

Modified: trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
===================================================================
--- trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -37,15 +37,14 @@
 import org.jboss.kernel.spi.registry.KernelRegistryEntry;
 import org.jboss.logging.Logger;
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.JAXWSDeployment;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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.core.server.legacy.AbstractServiceEndpointServlet;
-import org.jboss.ws.core.server.legacy.ServiceEndpointDeployer;
 import org.jboss.ws.integration.KernelLocator;
 import org.jboss.ws.integration.ResourceLoaderAdapter;
 import org.jboss.ws.integration.UnifiedVirtualFile;
 import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
 
 /**
  * A servlet that is installed for every web service endpoint.

Modified: trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/wspublish.java
===================================================================
--- trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/wspublish.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/wspublish.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -32,7 +32,7 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.util.file.JarUtils;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 
 /**
  * Publish a standard portable J2EE web service endpoint 

Added: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EagerInitializeDeployer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EagerInitializeDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EagerInitializeDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.deployment;
+
+//$Id$
+
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that initializes the UMDM 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class EagerInitializeDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+      if (umd == null)
+         throw new IllegalStateException("Cannot obtain unified meta data");
+      
+      umd.eagerInitialize();
+   }
+}
\ No newline at end of file


Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EagerInitializeDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointHandlerDeployer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointHandlerDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointHandlerDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,115 @@
+/*
+ * 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.core.deployment;
+
+//$Id$
+
+import java.util.Map;
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.LifecycleHandler;
+import org.jboss.ws.integration.RequestHandler;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.invocation.InvocationHandler;
+
+/**
+ * A deployer that assigns the handlers to the Endpoint 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class EndpointHandlerDeployer extends AbstractDeployer
+{
+   private String requestHandler;
+   private String lifecycleHandler;
+   private Map<String,String> invocationHandler;
+
+   public void setLifecycleHandler(String handler)
+   {
+      this.lifecycleHandler = handler;
+   }
+
+   public void setRequestHandler(String handler)
+   {
+      this.requestHandler = handler;
+   }
+
+   public void setInvocationHandler(Map<String,String> handlers)
+   {
+      this.invocationHandler = handlers;
+   }
+
+   @Override
+   public void create(Deployment dep)
+   {
+      for (Endpoint ep : dep.getService().getEndpoints())
+      {
+         ep.setRequestHandler(getRequestHandler(dep));
+         ep.setLifecycleHandler(getLifecycleHandler(dep));
+         ep.setInvocationHandler(getInvocationHandler(dep));
+      }
+   }
+
+   private RequestHandler getRequestHandler(Deployment dep)
+   {
+      try
+      {
+         Class<?> handlerClass = dep.getClassLoader().loadClass(requestHandler);
+         return (RequestHandler)handlerClass.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException("Cannot load request handler: " + requestHandler);
+      }
+   }
+
+   private LifecycleHandler getLifecycleHandler(Deployment dep)
+   {
+      try
+      {
+         Class<?> handlerClass = dep.getClassLoader().loadClass(lifecycleHandler);
+         return (LifecycleHandler)handlerClass.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException("Cannot load lifecycle handler: " + lifecycleHandler);
+      }
+   }
+
+   private InvocationHandler getInvocationHandler(Deployment dep)
+   {
+      String className = invocationHandler.get(dep.getType().toString());
+      if (className == null)
+         throw new IllegalStateException("Cannot obtain invocation handler for: " + dep.getType());
+      
+      try
+      {
+         Class<?> handlerClass = dep.getClassLoader().loadClass(className);
+         return (InvocationHandler)handlerClass.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException("Cannot load invocation handler: " + className);
+      }
+   }
+}
\ No newline at end of file


Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointHandlerDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointLifecycleDeployer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointLifecycleDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointLifecycleDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.deployment;
+
+//$Id$
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A deployer that that calls the endpoint lifecycle handler 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class EndpointLifecycleDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      for (Endpoint ep : dep.getService().getEndpoints())
+         ep.getLifecycleHandler().create(ep);
+   }
+
+   @Override
+   public void start(Deployment dep)
+   {
+      for (Endpoint ep : dep.getService().getEndpoints())
+      {
+         ep.getLifecycleHandler().start(ep);
+      }
+   }
+
+   @Override
+   public void stop(Deployment dep)
+   {
+      Service service = dep.getService();
+      if (service != null)
+      {
+         for (Endpoint ep : service.getEndpoints())
+         {
+            ep.getLifecycleHandler().stop(ep);
+         }
+      }
+   }
+
+   @Override
+   public void destroy(Deployment dep)
+   {
+      Service service = dep.getService();
+      if (service != null)
+      {
+         for (Endpoint ep : service.getEndpoints())
+         {
+            ep.getLifecycleHandler().destroy(ep);
+         }
+      }
+   }
+}


Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointLifecycleDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointNameDeployer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointNameDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointNameDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.deployment;
+
+//$Id$
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * A deployer that assigns the complete name to the Endpoint 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class EndpointNameDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      for (Endpoint ep : dep.getService().getEndpoints())
+      {
+         ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
+         if (sepMetaData == null)
+            throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+         ObjectName sepID = sepMetaData.getServiceEndpointID();
+         ep.setName(sepID);
+      }
+   }
+}
\ No newline at end of file


Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/EndpointNameDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXRPCClientDeployment.java (from rev 2953, trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientDeployment.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXRPCClientDeployment.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXRPCClientDeployment.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.deployment;
+
+//$Id$
+
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * The container independent deployment info. 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class JAXRPCClientDeployment extends UnifiedDeploymentInfo
+{
+
+   public JAXRPCClientDeployment(DeploymentType type)
+   {
+      super(type);
+   }
+}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXRPCDeployment.java (from rev 2953, trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXRPCDeployment.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXRPCDeployment.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,84 @@
+/*
+ * 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.core.deployment;
+
+import java.io.InputStream;
+import java.net.URL;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.integration.UnifiedVirtualFile;
+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;
+
+// $Id$
+
+/**
+ * The container independent deployment info. 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class JAXRPCDeployment extends UnifiedDeploymentInfo
+{
+   private WebservicesMetaData wsMetaData;
+
+   public JAXRPCDeployment(DeploymentType type, WebservicesMetaData wsMetaData)
+   {
+      super(type);
+      this.wsMetaData = wsMetaData;
+   }
+
+   public JAXRPCDeployment(DeploymentType type, UnifiedVirtualFile vfWebservices)
+   {
+      super(type);
+
+      try
+      {
+         // Unmarshall webservices.xml
+         URL webservicesURL = vfWebservices.toURL();
+         InputStream is = webservicesURL.openStream();
+         try
+         {
+            Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+            ObjectModelFactory factory = new WebservicesFactory(webservicesURL);
+            wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(is, factory, null);
+         }
+         finally
+         {
+            is.close();
+         }
+      }
+      catch (Exception ex)
+      {
+         WSException.rethrow(ex);
+      }
+   }
+
+   public WebservicesMetaData getWebservicesMetaData()
+   {
+      return wsMetaData;
+   }
+}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXWSDeployment.java (from rev 2953, trunk/jbossws-core/src/java/org/jboss/ws/core/server/JAXWSDeployment.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXWSDeployment.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/JAXWSDeployment.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.deployment;
+
+//$Id$
+
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * The container independent deployment info.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 29-Jun-2006
+ */
+public class JAXWSDeployment extends UnifiedDeploymentInfo
+{
+   public JAXWSDeployment(DeploymentType type)
+   {
+      super(type);
+   }
+}

Added: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/PublishContractDeployer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/PublishContractDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/PublishContractDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.deployment;
+
+//$Id$
+
+import java.io.IOException;
+
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that publishes the wsdl 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class PublishContractDeployer 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");
+
+      try
+      {
+         WSDLFilePublisher publisher = new WSDLFilePublisher(udi);
+         publisher.publishWsdlFiles(umd);
+      }
+      catch (IOException ex)
+      {
+         throw new WSDeploymentException(ex);
+      }
+   }
+}
\ No newline at end of file


Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/PublishContractDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/ServiceEndpointPublisher.java (from rev 2955, trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointPublisher.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/ServiceEndpointPublisher.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/ServiceEndpointPublisher.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,264 @@
+/*
+ * 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.core.deployment;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.Servlet;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.core.utils.IOUtils;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.integration.Endpoint;
+import org.w3c.dom.Element;
+
+/**
+ * The publisher for web service endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointPublisher
+{
+   // logging support
+   private static Logger log = Logger.getLogger(ServiceEndpointPublisher.class);
+
+   // The configured service endpoint servlet
+   private String servletClass;
+
+   // The results of the URL rewriting
+   public class RewriteResults
+   {
+      // The URL to the rewrittn web.xml
+      public URL webXML;
+      // Map<servlet-name, servlet-class> the servlet-class enties are the implementation beans 
+      public Map<String, String> sepTargetMap = new HashMap<String, String>();
+   }
+
+   public String getServletClass()
+   {
+      return servletClass;
+   }
+
+   public void setServletClass(String servletClass)
+   {
+      this.servletClass = servletClass;
+   }
+
+   public RewriteResults rewriteWebXml(UnifiedDeploymentInfo udi)
+   {
+      URL warURL = udi.webappURL;
+      File warFile = new File(warURL.getFile());
+      if (warFile.isDirectory() == false)
+         throw new WSException("Expected a war directory: " + warURL);
+
+      File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
+      if (webXML.isFile() == false)
+         throw new WSException("Cannot find web.xml: " + webXML);
+
+      try
+      {
+         // After redeployment there might be a stale copy of the original web.xml.org, we delete it
+         File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
+         orgWebXML.delete();
+
+         // Rename the web.xml
+         if (webXML.renameTo(orgWebXML) == false)
+            throw new WSException("Cannot rename web.xml: " + orgWebXML);
+
+         FileInputStream stream = new FileInputStream(orgWebXML);
+         return rewriteWebXml(stream, webXML, udi.classLoader);
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception e)
+      {
+         throw new WSException(e);
+      }
+   }
+
+   public RewriteResults rewriteWebXml(InputStream source, File dest, ClassLoader loader) throws Exception
+   {
+      if (dest == null)
+      {
+         dest = File.createTempFile("jbossws-alt-web", "xml", IOUtils.createTempDirectory());
+         dest.deleteOnExit();
+      }
+
+      Element root = DOMUtils.parse(source);
+      RewriteResults results = modifyServletConfig(root, loader);
+      results.webXML = dest.toURL();
+
+      FileOutputStream fos = new FileOutputStream(dest);
+      new DOMWriter(fos).setPrettyprint(true).print(root);
+      fos.flush();
+      fos.close();
+
+      return results;
+   }
+
+   private RewriteResults modifyServletConfig(Element root, ClassLoader loader) throws ClassNotFoundException
+   {
+      RewriteResults results = new RewriteResults();
+      Iterator itServlets = DOMUtils.getChildElements(root, "servlet");
+      while (itServlets.hasNext())
+      {
+         Element servletElement = (Element)itServlets.next();
+         String linkName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(servletElement, "servlet-name"));
+
+         // find the servlet-class
+         Element classElement = DOMUtils.getFirstChildElement(servletElement, "servlet-class");
+
+         // JSP
+         if (classElement == null)
+            continue;
+
+         String orgServletClassName = DOMUtils.getTextContent(classElement).trim();
+
+         // Get the servlet class
+         Class orgServletClass = null;
+         if (loader != null)
+         {
+            try
+            {
+               orgServletClass = loader.loadClass(orgServletClassName);
+            }
+            catch (ClassNotFoundException ex)
+            {
+               log.warn("Cannot load servlet class: " + orgServletClassName);
+            }
+         }
+
+         String targetBeanName = null;
+
+         // Nothing to do if we have an <init-param>
+         if (isAlreadyModified(servletElement))
+         {
+            Iterator itParams = DOMUtils.getChildElements(servletElement, "init-param");
+            while (itParams.hasNext())
+            {
+               Element elParam = (Element)itParams.next();
+               Element elParamName = DOMUtils.getFirstChildElement(elParam, "param-name");
+               Element elParamValue = DOMUtils.getFirstChildElement(elParam, "param-value");
+               if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(DOMUtils.getTextContent(elParamName)))
+               {
+                  targetBeanName = DOMUtils.getTextContent(elParamValue);
+               }
+            }
+         }
+         else
+         {
+            // Check if it is a real servlet that we can ignore
+            if (orgServletClass != null && JavaUtils.isAssignableFrom(Servlet.class, orgServletClass))
+            {
+               log.info("Ignore servlet: " + orgServletClassName);
+               continue;
+            }
+            else if (orgServletClassName.endsWith("Servlet"))
+            {
+               log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
+               continue;
+            }
+
+            // build a list of detached elements that come after <servlet-class>
+            boolean startDetach = false;
+            List<Element> detachedElements = new ArrayList<Element>();
+            Iterator itDetached = DOMUtils.getChildElements(servletElement);
+            while (itDetached.hasNext())
+            {
+               Element el = (Element)itDetached.next();
+               if (startDetach == true)
+               {
+                  detachedElements.add(el);
+                  servletElement.removeChild(el);
+               }
+               if (el.equals(classElement))
+               {
+                  servletElement.removeChild(el);
+                  startDetach = true;
+               }
+            }
+
+            // replace the class name
+            classElement = (Element)DOMUtils.createElement("servlet-class");
+            classElement.appendChild(DOMUtils.createTextNode(servletClass));
+            classElement = (Element)servletElement.getOwnerDocument().importNode(classElement, true);
+            servletElement.appendChild(classElement);
+
+            // add additional init params
+            if (orgServletClassName.equals(servletClass) == false)
+            {
+               Element paramElement = DOMUtils.createElement("init-param");
+               paramElement.appendChild(DOMUtils.createElement("param-name")).appendChild(DOMUtils.createTextNode(Endpoint.SEPID_DOMAIN_ENDPOINT));
+               paramElement.appendChild(DOMUtils.createElement("param-value")).appendChild(DOMUtils.createTextNode(orgServletClassName));
+               paramElement = (Element)servletElement.getOwnerDocument().importNode(paramElement, true);
+               servletElement.appendChild(paramElement);
+               targetBeanName = orgServletClassName;
+            }
+
+            // reattach the elements
+            itDetached = detachedElements.iterator();
+            while (itDetached.hasNext())
+            {
+               Element el = (Element)itDetached.next();
+               servletElement.appendChild(el);
+            }
+         }
+
+         if (targetBeanName == null)
+            throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
+
+         // remember the target bean name
+         results.sepTargetMap.put(linkName, targetBeanName.trim());
+      }
+
+      return results;
+   }
+
+   // Return true if the web.xml is already modified
+   private boolean isAlreadyModified(Element servletElement)
+   {
+      Iterator itParams = DOMUtils.getChildElements(servletElement, "init-param");
+      while (itParams.hasNext())
+      {
+         Element elParam = (Element)itParams.next();
+         Element elParamName = DOMUtils.getFirstChildElement(elParam, "param-name");
+         if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(DOMUtils.getTextContent(elParamName)))
+            return true;
+      }
+      return false;
+   }
+}
\ No newline at end of file

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedDeploymentInfo.java (from rev 2953, trunk/jbossws-core/src/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedDeploymentInfo.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedDeploymentInfo.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,144 @@
+/*
+ * 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.core.deployment;
+
+// $Id: UnifiedDeploymentInfo.java 2923 2007-04-25 14:23:29Z thomas.diesler at jboss.com $
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * The container independent deployment info.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedDeploymentInfo
+{
+   public UnifiedDeploymentInfo(DeploymentType type)
+   {
+      this.type = type;
+   }
+
+   /** The type of this deployment */
+   public DeploymentType type;
+   /** Sub deployments have a parent */
+   public UnifiedDeploymentInfo parent;
+   /** The suffix of the deployment url */
+   public String simpleName;
+   /** The URL for this deployment */
+   public URL url;
+   /** The virtual file for the deployment root */
+   public UnifiedVirtualFile vfRoot;
+   /** The string identifing this deployment **/
+   public String name;
+   /** The URL to the expanded webapp **/
+   public URL webappURL;
+   /** We can hold "typed" metadata */
+   public Object metaData;
+   /** The deployment classloader **/
+   public ClassLoader classLoader;
+   /** An optional ObjectName of the deployed object */
+   public ObjectName deployedObject;
+
+   /** An arbitrary map of state associated with the deployment */
+   private Map<Class, Object> attachments = new HashMap<Class, Object>();
+   
+   public <T> T getAttachment(Class<T> key)
+   {
+      return (T)attachments.get(key);
+   }
+   
+   public <T> T addAttachment(Class<T> key, T value)
+   {
+      return (T)attachments.put(key, value);
+   }
+   
+   /** The sortName concatenated with the canonical names of all parents. */
+   public String getCanonicalName()
+   {
+      String name = simpleName;
+      if (parent != null)
+         name = parent.getCanonicalName() + "/" + name;
+      return name;
+   }
+
+   public URL getMetaDataFileURL(String resourcePath) throws IOException
+   {
+      URL resourceURL = null;
+      if (resourcePath != null && resourcePath.length() > 0)
+      {
+         if (resourcePath.startsWith("/"))
+            resourcePath = resourcePath.substring(1);
+
+         try
+         {
+            // assign an absolute URL 
+            resourceURL = new URL(resourcePath);
+         }
+         catch (MalformedURLException ex)
+         {
+            // ignore
+         }
+
+         if (resourceURL == null && vfRoot != null)
+         {
+            UnifiedVirtualFile vfResource = vfRoot.findChild(resourcePath);
+            resourceURL = vfResource.toURL();
+         }
+
+         if (resourceURL == null)
+         {
+            String deploymentPath = url.toExternalForm();
+
+            if (deploymentPath.startsWith("jar:") && deploymentPath.endsWith("!/") == false)
+               deploymentPath += "!/";
+
+            if (deploymentPath.endsWith("/") == false)
+               deploymentPath += "/";
+
+            // assign a relative URL
+            resourceURL = new URL(deploymentPath + resourcePath);
+         }
+      }
+      return resourceURL;
+   }
+
+   public String toString()
+   {
+      StringBuilder builder = new StringBuilder();
+      builder.append("[");
+      builder.append("type=" + type);
+      builder.append(",simpleName=" + simpleName);
+      builder.append(",url=" + url);
+      builder.append("]");
+      return builder.toString();
+   }
+}

Added: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataAssociationDeployer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataAssociationDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataAssociationDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,86 @@
+/*
+ * 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.core.deployment;
+
+//$Id$
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that assigns the EndpointMetaData to the Endpoint 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class UnifiedMetaDataAssociationDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+      if (umd == null)
+         throw new IllegalStateException("Cannot obtain unified meta data");
+
+      for (Endpoint ep : dep.getService().getEndpoints())
+      {
+         ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
+         if (sepMetaData == null)
+         {
+            sepMetaData = getEndpointMetaData(umd, ep.getName());
+            sepMetaData.setServiceEndpointImplName(ep.getEndpointImpl().getName());
+            ep.addMetaData(ServerEndpointMetaData.class, sepMetaData);
+         }
+      }
+   }
+
+   private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, ObjectName epName)
+   {
+      String propEndpoint = epName.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+
+      ServerEndpointMetaData epMetaData = null;
+      for (ServiceMetaData serviceMetaData : umd.getServices())
+      {
+         for (EndpointMetaData aux : serviceMetaData.getEndpoints())
+         {
+            String linkName = ((ServerEndpointMetaData)aux).getLinkName();
+            if (propEndpoint.equals(linkName))
+            {
+               epMetaData = (ServerEndpointMetaData)aux;
+               break;
+            }
+         }
+      }
+
+      if (epMetaData == null)
+         throw new IllegalStateException("Cannot find endpoint meta data for: " + epName);
+
+      return epMetaData;
+   }
+}
\ No newline at end of file


Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataAssociationDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.deployment;
+
+//$Id$
+
+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.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
+import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
+import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that builds the UnifiedDeploymentInfo 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class UnifiedMetaDataDeployer extends AbstractDeployer
+{
+   @Override
+   public void create(Deployment dep)
+   {
+      UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+      if (umd == null)
+      {
+         UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+         if (udi == null)
+            throw new IllegalStateException("Cannot obtain unified deployement info");
+         
+         if (udi.type == DeploymentType.JAXRPC_JSE)
+         {
+            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
+            umd = builder.buildMetaData((JAXRPCDeployment)udi);
+         }
+         else if (udi.type == DeploymentType.JAXRPC_EJB21)
+         {
+            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
+            umd = builder.buildMetaData((JAXRPCDeployment)udi);
+         }
+         else if (udi.type == DeploymentType.JAXWS_JSE)
+         {
+            JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
+            umd = builder.buildMetaData(udi);
+         }
+         else if (udi.type == DeploymentType.JAXWS_EJB3)
+         {
+            JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
+            umd = builder.buildMetaData(udi);
+         }
+         else
+         {
+            throw new IllegalStateException("Invalid type:  " + udi.type);
+         }
+         
+         dep.getContext().addAttachment(UnifiedMetaData.class, umd);
+      }
+   }
+}
\ No newline at end of file


Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/WSDLFilePublisher.java (from rev 2953, trunk/jbossws-core/src/java/org/jboss/ws/core/server/WSDLFilePublisher.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/WSDLFilePublisher.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/deployment/WSDLFilePublisher.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,328 @@
+/*
+ * 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.core.deployment;
+
+// $Id$
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Import;
+import javax.wsdl.factory.WSDLFactory;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.IOUtils;
+import org.jboss.ws.core.utils.ResourceURL;
+import org.jboss.ws.integration.management.ServerConfig;
+import org.jboss.ws.integration.management.ServerConfigFactory;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/** A helper class that publishes the wsdl files and their imports to the server/data/wsdl directory.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 02-June-2004
+ */
+public class WSDLFilePublisher
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(WSDLFilePublisher.class);
+
+   // The deployment info for the web service archive
+   private UnifiedDeploymentInfo udi;
+   // The expected wsdl location in the deployment
+   private String expLocation;
+
+   public WSDLFilePublisher(UnifiedDeploymentInfo udi)
+   {
+      this.udi = udi;
+
+      if (udi.type.toString().endsWith("JSE"))
+      {
+         expLocation = "WEB-INF/wsdl/";
+      }
+      else
+      {
+         expLocation = "META-INF/wsdl/";
+      }
+   }
+
+   /** Publish the deployed wsdl file to the data directory
+    */
+   public void publishWsdlFiles(UnifiedMetaData wsMetaData) throws IOException
+   {
+      String deploymentName = udi.getCanonicalName();
+
+      // For each service
+      for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
+      {
+         File wsdlFile = getPublishLocation(deploymentName, serviceMetaData);
+         wsdlFile.getParentFile().mkdirs();
+
+         // Get the wsdl definition and write it to the wsdl publish location
+         try
+         {
+            Writer fWriter = IOUtils.getCharsetFileWriter(wsdlFile, Constants.DEFAULT_XML_CHARSET);
+            WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
+            new WSDLWriter(wsdlDefinitions).write(fWriter, Constants.DEFAULT_XML_CHARSET);
+
+            URL wsdlPublishURL = wsdlFile.toURL();
+            log.info("WSDL published to: " + wsdlPublishURL);
+
+            // udpate the wsdl file location 
+            serviceMetaData.setWsdlLocation(wsdlFile.toURL());
+
+            // Process the wsdl imports
+            Definition wsdl11Definition = wsdlDefinitions.getWsdlOneOneDefinition();
+            if (wsdl11Definition != null)
+            {
+               publishWsdlImports(wsdlFile.toURL(), wsdl11Definition);
+
+               // Publish XMLSchema imports
+               Document document = wsdlDefinitions.getWsdlDocument();
+               publishSchemaImports(wsdlFile.toURL(), document.getDocumentElement());
+            }
+            else
+            {
+               throw new NotImplementedException("WSDL-2.0 imports");
+            }
+         }
+         catch (RuntimeException rte)
+         {
+            throw rte;
+         }
+         catch (Exception e)
+         {
+            throw new WSException("Cannot publish wsdl to: " + wsdlFile, e);
+         }
+      }
+   }
+
+   /** Publish the wsdl imports for a given wsdl definition
+    */
+   private void publishWsdlImports(URL parentURL, Definition parentDefinition) throws Exception
+   {
+      String baseURI = parentURL.toExternalForm();
+
+      Iterator it = parentDefinition.getImports().values().iterator();
+      while (it.hasNext())
+      {
+         for (Import wsdlImport : (List<Import>)it.next())
+         {
+            String locationURI = wsdlImport.getLocationURI();
+            Definition subdef = wsdlImport.getDefinition();
+
+            // its an external import, don't publish locally
+            if (locationURI.startsWith("http://") == false)
+            {
+               URL targetURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + locationURI);
+               File targetFile = new File(targetURL.getPath());
+               targetFile.getParentFile().mkdirs();
+
+               WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+               javax.wsdl.xml.WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
+               FileWriter fw = new FileWriter(targetFile);
+               wsdlWriter.writeWSDL(subdef, fw);
+               fw.close();
+
+               if (log.isDebugEnabled())
+                  log.debug("WSDL import published to: " + targetURL);
+
+               // recursivly publish imports
+               publishWsdlImports(targetURL, subdef);
+
+               // Publish XMLSchema imports
+               Element subdoc = DOMUtils.parse(targetURL.openStream());
+               publishSchemaImports(targetURL, subdoc);
+            }
+         }
+      }
+   }
+
+   /** Publish the schema imports for a given wsdl definition
+    */
+   private void publishSchemaImports(URL parentURL, Element element) throws Exception
+   {
+      String baseURI = parentURL.toExternalForm();
+
+      Iterator it = DOMUtils.getChildElements(element);
+      while (it.hasNext())
+      {
+         Element childElement = (Element)it.next();
+         if ("import".equals(childElement.getLocalName()) || "include".equals(childElement.getLocalName()))
+         {
+            String schemaLocation = childElement.getAttribute("schemaLocation");
+            if (schemaLocation.length() > 0)
+            {
+               if (schemaLocation.startsWith("http://") == false)
+               {
+                  URL xsdURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + schemaLocation);
+                  File targetFile = new File(xsdURL.getPath());
+                  targetFile.getParentFile().mkdirs();
+
+                  String deploymentName = udi.getCanonicalName();
+
+                  // get the resource path
+                  int index = baseURI.indexOf(deploymentName);
+                  String resourcePath = baseURI.substring(index + deploymentName.length());
+                  resourcePath = resourcePath.substring(0, resourcePath.lastIndexOf("/"));
+                  if (resourcePath.length() > 0)
+                     resourcePath = resourcePath + "/";
+
+                  resourcePath = expLocation + resourcePath + schemaLocation;
+                  URL resourceURL = udi.getMetaDataFileURL(resourcePath);
+                  InputStream is = new ResourceURL(resourceURL).openStream();
+                  if (is == null)
+                     throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);
+
+                  FileOutputStream fos = new FileOutputStream(targetFile);
+                  IOUtils.copyStream(fos, is);
+                  fos.close();
+                  is.close();
+
+                  if (log.isDebugEnabled())
+                     log.debug("XMLSchema import published to: " + xsdURL);
+
+                  // recursivly publish imports
+                  Element subdoc = DOMUtils.parse(xsdURL.openStream());
+                  publishSchemaImports(xsdURL, subdoc);
+               }
+            }
+         }
+         else
+         {
+            publishSchemaImports(parentURL, childElement);
+         }
+      }
+   }
+
+   /**
+    * Delete the published wsdl
+    */
+   public void unpublishWsdlFiles() throws IOException
+   {
+      String deploymentDir = (udi.parent != null ? udi.parent.simpleName : udi.simpleName);
+      ServerConfig config = ServerConfigFactory.getInstance().getServerConfig();
+      File serviceDir = new File(config.getServerDataDir().getCanonicalPath() + "/wsdl/" + deploymentDir);
+      deleteWsdlPublishDirectory(serviceDir);
+   }
+
+   /**
+    * Delete the published wsdl document, traversing down the dir structure
+    */
+   private void deleteWsdlPublishDirectory(File dir) throws IOException
+   {
+      String[] files = dir.list();
+      for (int i = 0; files != null && i < files.length; i++)
+      {
+         String fileName = files[i];
+         File file = new File(dir + "/" + fileName);
+         if (file.isDirectory())
+         {
+            deleteWsdlPublishDirectory(file);
+         }
+         else
+         {
+            if (file.delete() == false)
+               log.warn("Cannot delete published wsdl document: " + file.toURL());
+         }
+      }
+
+      // delete the directory as well
+      dir.delete();
+   }
+
+   /**
+    * Get the file publish location
+    */
+   private File getPublishLocation(String archiveName, ServiceMetaData serviceMetaData) throws IOException
+   {
+      String wsdlLocation = null;
+      if (serviceMetaData.getWsdlLocation() != null)
+         wsdlLocation = serviceMetaData.getWsdlLocation().toExternalForm();
+      else if (serviceMetaData.getWsdlFile() != null)
+         wsdlLocation = serviceMetaData.getWsdlFile();
+
+      if (wsdlLocation == null)
+         throw new IllegalStateException("Cannot obtain wsdl location for: " + serviceMetaData.getServiceName());
+
+      if (log.isDebugEnabled())
+         log.debug("Publish WSDL file: " + wsdlLocation);
+
+      // Only file URLs are supported in <wsdl-publish-location>
+      String publishLocation = serviceMetaData.getWsdlPublishLocation();
+      boolean predefinedLocation = publishLocation != null && publishLocation.startsWith("file:");
+
+      File locationFile = null;
+      if (predefinedLocation == false)
+      {
+         ServerConfig config = ServerConfigFactory.getInstance().getServerConfig();
+         locationFile = new File(config.getServerDataDir().getCanonicalPath() + "/wsdl/" + archiveName);
+      }
+      else
+      {
+         try
+         {
+            locationFile = new File(new URL(publishLocation).getPath());
+         }
+         catch (MalformedURLException e)
+         {
+            throw new IllegalArgumentException("Invalid publish location: " + e.getMessage());
+         }
+      }
+
+      File wsdlFile;
+      if (wsdlLocation.indexOf(expLocation) >= 0)
+      {
+         wsdlLocation = wsdlLocation.substring(wsdlLocation.indexOf(expLocation) + expLocation.length());
+         wsdlFile = new File(locationFile + "/" + wsdlLocation);
+      }
+      else if (wsdlLocation.startsWith("vfsfile:") || wsdlLocation.startsWith("file:") || wsdlLocation.startsWith("jar:"))
+      {
+         wsdlLocation = wsdlLocation.substring(wsdlLocation.lastIndexOf("/") + 1);
+         wsdlFile = new File(locationFile + "/" + wsdlLocation);
+      }
+      else
+      {
+         throw new WSException("Invalid wsdlFile '" + wsdlLocation + "', expected in: " + expLocation);
+      }
+
+      return wsdlFile;
+   }
+}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractInvocationHandler.java (from rev 2953, trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractInvocationHandler.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractInvocationHandler.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractInvocationHandler.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,430 @@
+/*
+ * 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.core.server;
+
+// $Id$
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.UndeclaredThrowableException;
+import java.util.HashMap;
+
+import javax.activation.DataHandler;
+import javax.management.MBeanException;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.ws.http.HTTPBinding;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.CommonBinding;
+import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.CommonSOAPBinding;
+import org.jboss.ws.core.DirectionHolder;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.DirectionHolder.Direction;
+import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
+import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
+import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
+import org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS;
+import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.integration.invocation.InvocationHandler;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/** An implementation handles invocations on the endpoint
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractInvocationHandler implements InvocationHandler
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(AbstractInvocationHandler.class);
+
+   protected Endpoint endpoint;
+   protected CommonBindingProvider bindingProvider;
+   protected ServerHandlerDelegate delegate;
+
+   /** Initialize the service endpoint */
+   public void init(Endpoint endpoint)
+   {
+      this.endpoint = endpoint;
+      
+      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      if (sepMetaData.getType() == EndpointMetaData.Type.JAXRPC)
+      {
+         bindingProvider = new CommonBindingProvider(sepMetaData);
+         delegate = new HandlerDelegateJAXRPC(sepMetaData);
+      }
+      else
+      {
+         bindingProvider = new BindingProviderImpl(sepMetaData);
+         delegate = new HandlerDelegateJAXWS(sepMetaData);
+      }
+   }
+
+   /** Load the SEI implementation bean if necessary */
+   protected abstract Class loadServiceEndpoint() throws ClassNotFoundException;
+
+   /** Create the instance of the SEI implementation bean if necessary */
+   protected abstract Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception;
+
+   /** Invoke the instance of the SEI implementation bean */
+   protected abstract void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception;
+
+   /** Destroy the instance of the SEI implementation bean if necessary */
+   protected abstract void destroyServiceEndpointInstance(Object seiImpl);
+
+   public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+   {
+      return delegate.callRequestHandlerChain(sepMetaData, type);
+   }
+
+   public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+   {
+      return delegate.callResponseHandlerChain(sepMetaData, type);
+   }
+
+   public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+   {
+      delegate.closeHandlerChain(sepMetaData, type);
+   }
+
+   public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
+   {
+      return delegate.callFaultHandlerChain(sepMetaData, type, ex);
+   }
+
+   /** Invoke the the service endpoint */
+   public void invoke(InvocationContext reqContext) throws Exception
+   {
+      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+      ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)msgContext.getEndpointMetaData();
+      MessageAbstraction reqMessage = msgContext.getMessageAbstraction();
+
+      // Load the endpoint implementation bean
+      Class seImpl = loadServiceEndpoint();
+
+      // Create an instance of the endpoint implementation bean
+      Object seInstance = createServiceEndpointInstance(seImpl, reqContext);
+
+      // The direction of the message
+      DirectionHolder direction = new DirectionHolder(Direction.InBound);
+
+      // Get the order of pre/post handlerchains 
+      HandlerType[] handlerType = delegate.getHandlerTypeOrder();
+      HandlerType[] faultType = delegate.getHandlerTypeOrder();
+
+      // Set the required inbound context properties
+      setInboundContextProperties();
+
+      try
+      {
+         boolean oneway = false;
+         EndpointInvocation epInv = null;
+         OperationMetaData opMetaData = null;
+         CommonBinding binding = bindingProvider.getCommonBinding();
+         binding.setHeaderSource(delegate);
+
+         // call the request handler chain
+         boolean handlersPass = callRequestHandlerChain(sepMetaData, handlerType[0]);
+
+         // Unbind the request message
+         if (handlersPass)
+         {
+            // Get the operation meta data from the SOAP message
+            opMetaData = getDispatchDestination(sepMetaData, reqMessage);
+            msgContext.setOperationMetaData(opMetaData);
+            oneway = opMetaData.isOneWay();
+
+            /* 
+             * From JAX-WS 10.2.1 - "7. If the node does not understand how to process
+             * the message, then neither handlers nor the endpoint
+             * are invoked and instead the binding generates a SOAP must
+             * understand exception"
+             *
+             * Therefore, this must precede the ENDPOINT chain; however, The PRE
+             * chain still must happen first since the message may be encrypted, in which
+             * case the operation is still not known. Without knowing the operation, it 
+             * is not possible to determine what headers are understood by the endpoint.
+             */
+            if (binding instanceof CommonSOAPBinding)
+               ((CommonSOAPBinding)binding).checkMustUnderstand(opMetaData);
+
+            // Unbind the request message
+            epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
+         }
+
+         handlersPass = handlersPass && callRequestHandlerChain(sepMetaData, handlerType[1]);
+         handlersPass = handlersPass && callRequestHandlerChain(sepMetaData, handlerType[2]);
+
+         if (handlersPass)
+         {
+            msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
+            try
+            {
+               // Check if protocol handlers modified the payload
+               if (msgContext.isModified())
+               {
+                  log.debug("Handler modified payload, unbind message again");
+                  reqMessage = msgContext.getMessageAbstraction();
+                  epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
+               }
+
+               // Invoke the service endpoint
+               invokeServiceEndpointInstance(seInstance, epInv);
+            }
+            finally
+            {
+               msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
+            }
+
+            // Reverse the message direction
+            msgContext = processPivotInternal(msgContext, direction);
+
+            // Set the required outbound context properties
+            setOutboundContextProperties();
+
+            if (binding instanceof CommonSOAPBinding)
+               XOPContext.setMTOMEnabled(((CommonSOAPBinding)binding).isMTOMEnabled());
+
+            // Bind the response message
+            MessageAbstraction resMessage = binding.bindResponseMessage(opMetaData, epInv);
+            msgContext.setMessageAbstraction(resMessage);
+         }
+         else
+         {
+            // Reverse the message direction without calling the endpoint
+            MessageAbstraction resMessage = msgContext.getMessageAbstraction();
+            msgContext = processPivotInternal(msgContext, direction);
+            msgContext.setMessageAbstraction(resMessage);
+         }
+
+         if (oneway == false)
+         {
+            // call the  response handler chain, removing the fault type entry will not call handleFault for that chain 
+            handlersPass = callResponseHandlerChain(sepMetaData, handlerType[2]);
+            faultType[2] = null;
+            handlersPass = handlersPass && callResponseHandlerChain(sepMetaData, handlerType[1]);
+            faultType[1] = null;
+            handlersPass = handlersPass && callResponseHandlerChain(sepMetaData, handlerType[0]);
+            faultType[0] = null;
+         }
+      }
+      catch (RuntimeException ex)
+      {
+         // Reverse the message direction
+         processPivotInternal(msgContext, direction);
+
+         try
+         {
+            CommonBinding binding = bindingProvider.getCommonBinding();
+            binding.bindFaultMessage(ex);
+
+            // call the fault handler chain
+            boolean handlersPass = true;
+            if (faultType[2] != null)
+               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[2], ex);
+            if (faultType[1] != null)
+               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[1], ex);
+            if (faultType[0] != null)
+               handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, faultType[0], ex);
+         }
+         catch (RuntimeException subEx)
+         {
+            log.warn("Exception while processing handleFault: ", ex);
+            ex = subEx;
+         }
+         throw ex;
+      }
+      finally
+      {
+         closeHandlerChain(sepMetaData, handlerType[2]);
+         closeHandlerChain(sepMetaData, handlerType[1]);
+         closeHandlerChain(sepMetaData, handlerType[0]);
+
+         destroyServiceEndpointInstance(seInstance);
+      }
+   }
+
+   protected void setInboundContextProperties()
+   {
+      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+      if (msgContext instanceof MessageContextJAXWS)
+      {
+         // Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler
+         msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
+      }
+   }
+
+   protected void setOutboundContextProperties()
+   {
+      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+      if (msgContext instanceof MessageContextJAXWS)
+      {
+         // Map of attachments to a message for the outbound message, key is the MIME Content-ID, value is a DataHandler
+         msgContext.put(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
+      }
+   }
+
+   private CommonMessageContext processPivotInternal(CommonMessageContext msgContext, DirectionHolder direction)
+   {
+      if (direction.getDirection() == Direction.InBound)
+      {
+         EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
+         if (epMetaData.getType() == EndpointMetaData.Type.JAXRPC)
+         {
+            msgContext = MessageContextJAXRPC.processPivot(msgContext);
+         }
+         else
+         {
+            msgContext = MessageContextJAXWS.processPivot(msgContext);
+         }
+         direction.setDirection(Direction.OutBound);
+      }
+      return msgContext;
+   }
+
+   private OperationMetaData getDispatchDestination(EndpointMetaData epMetaData, MessageAbstraction reqMessage) throws SOAPException
+   {
+      OperationMetaData opMetaData;
+
+      String bindingID = epMetaData.getBindingId();
+      if (HTTPBinding.HTTP_BINDING.equals(bindingID))
+      {
+         if (epMetaData.getOperations().size() != 1)
+            throw new IllegalStateException("Multiple operations not supported for HTTP binding");
+
+         opMetaData = epMetaData.getOperations().get(0);
+      }
+      else
+      {
+         SOAPMessageImpl soapMessage = (SOAPMessageImpl)reqMessage;
+
+         opMetaData = soapMessage.getOperationMetaData(epMetaData);
+         SOAPHeader soapHeader = soapMessage.getSOAPHeader();
+
+         // Report a MustUnderstand fault
+         if (opMetaData == null)
+         {
+            String faultString;
+            SOAPBody soapBody = soapMessage.getSOAPBody();
+            if (soapBody.getChildElements().hasNext())
+            {
+               SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+               Name soapName = soapBodyElement.getElementName();
+               faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for: " + soapName;
+            }
+            else
+            {
+               faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for empty soap body";
+            }
+
+            // R2724 If an INSTANCE receives a message that is inconsistent with its WSDL description, it SHOULD generate a soap:Fault
+            // with a faultcode of "Client", unless a "MustUnderstand" or "VersionMismatch" fault is generated.
+            if (soapHeader != null && soapHeader.examineMustUnderstandHeaderElements(Constants.URI_SOAP11_NEXT_ACTOR).hasNext())
+            {
+               QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
+               throw new SOAPFaultException(faultCode, faultString, null, null);
+            }
+            else
+            {
+               QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
+               throw new SOAPFaultException(faultCode, faultString, null, null);
+            }
+         }
+      }
+      return opMetaData;
+   }
+
+   protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
+   {
+      String methodName = seiMethod.getName();
+      Class[] paramTypes = seiMethod.getParameterTypes();
+      for (int i = 0; i < paramTypes.length; i++)
+      {
+         Class paramType = paramTypes[i];
+         if (JavaUtils.isPrimitive(paramType) == false)
+         {
+            String paramTypeName = paramType.getName();
+            paramType = JavaUtils.loadJavaType(paramTypeName);
+            paramTypes[i] = paramType;
+         }
+      }
+
+      Method implMethod = implClass.getMethod(methodName, paramTypes);
+      return implMethod;
+   }
+
+   /** handle invocation exceptions */
+   public void handleInvocationException(Throwable th) throws Exception
+   {
+      if (th instanceof InvocationTargetException)
+      {
+         // unwrap the throwable raised by the service endpoint implementation
+         Throwable targetEx = ((InvocationTargetException)th).getTargetException();
+         handleInvocationThrowable(targetEx);
+      }
+
+      if (th instanceof MBeanException)
+      {
+         throw ((MBeanException)th).getTargetException();
+      }
+
+      handleInvocationThrowable(th);
+   }
+
+   private void handleInvocationThrowable(Throwable th) throws Exception
+   {
+      if (th instanceof Exception)
+      {
+         throw (Exception)th;
+      }
+      else if (th instanceof Error)
+      {
+         throw (Error)th;
+      }
+      else
+      {
+         throw new UndeclaredThrowableException(th);
+      }
+   }
+}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java (from rev 2953, trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractServiceEndpointServlet.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,177 @@
+/*
+ * 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.core.server;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletInputStream;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.rpc.JAXRPCException;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.RequestHandler;
+import org.jboss.ws.integration.management.EndpointRegistry;
+import org.jboss.ws.integration.management.EndpointRegistryFactory;
+
+/**
+ * A servlet that is installed for every web service endpoint.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractServiceEndpointServlet extends HttpServlet
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(AbstractServiceEndpointServlet.class);
+
+   protected Endpoint endpoint;
+   protected EndpointRegistry epRegistry;
+
+   public void init(ServletConfig config) throws ServletException
+   {
+      super.init(config);
+      epRegistry = EndpointRegistryFactory.getEndpointRegistry();
+   }
+
+   public void destroy()
+   {
+      super.destroy();
+   }
+
+   public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+   {
+      if (endpoint == null)
+      {
+         String contextPath = req.getContextPath();
+         initServiceEndpoint(contextPath);
+      }
+      super.service(req, res);
+   }
+
+   public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+   {
+      // Process a WSDL request
+      if (req.getParameter("wsdl") != null || req.getParameter("WSDL") != null)
+      {
+         res.setContentType("text/xml");
+         try
+         {
+            RequestHandler requestHandler = endpoint.getRequestHandler();
+            ServletRequestContext context = new ServletRequestContext(getServletContext(), req, res);
+            requestHandler.handleWSDLRequest(endpoint, res.getOutputStream(), context);
+         }
+         catch (Exception ex)
+         {
+            handleException(ex);
+         }
+      }
+      else
+      {
+         res.setStatus(405);
+         res.setContentType("text/plain");
+         Writer out = res.getWriter();
+         out.write("HTTP GET not supported");
+         out.flush();
+         out.close();
+      }
+   }
+
+   public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+   {
+      log.debug("doPost: " + req.getRequestURI());
+
+      ServletInputStream inputStream = req.getInputStream();
+      ServletOutputStream outputStream = res.getOutputStream();
+      try
+      {
+         RequestHandler requestHandler = endpoint.getRequestHandler();
+         ServletRequestContext context = new ServletRequestContext(getServletContext(), req, res);
+         requestHandler.handleRequest(endpoint, inputStream, outputStream, context);
+      }
+      catch (Exception ex)
+      {
+         handleException(ex);
+      }
+      finally 
+      {
+         try
+         {
+            outputStream.flush();
+            outputStream.close();
+         }
+         catch (IOException ioex)
+         {
+            log.error("Cannot flush output stream");
+         }
+         
+      }
+   }
+
+   private void handleException(Exception ex) throws ServletException
+   {
+      log.error("Error processing web service request", ex);
+
+      if (ex instanceof JAXRPCException)
+         throw (JAXRPCException)ex;
+
+      throw new ServletException(ex);
+   }
+
+   /** Initialize the service endpoint
+    */
+   protected void initServiceEndpoint(String contextPath)
+   {
+      String servletName = getServletName();
+      if (contextPath.startsWith("/"))
+         contextPath = contextPath.substring(1);
+
+      for (ObjectName sepId : epRegistry.getEndpoints())
+      {
+         String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
+         String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+         if (servletName.equals(propEndpoint) && contextPath.equals(propContext))
+         {
+            endpoint = epRegistry.getEndpoint(sepId);
+            break;
+         }
+      }
+
+      if (endpoint == null)
+      {
+         ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + ","
+               + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
+         throw new WSException("Cannot obtain endpoint for: " + oname);
+      }
+   }
+}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/server/InvocationHandlerJSE.java (from rev 2953, trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerJSE.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/InvocationHandlerJSE.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/InvocationHandlerJSE.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,125 @@
+/*
+ * 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.core.server;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.rpc.server.ServletEndpointContext;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.WebServiceContext;
+
+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.jaxrpc.ServletEndpointContextImpl;
+import org.jboss.ws.core.jaxws.WebServiceContextInjector;
+import org.jboss.ws.core.jaxws.WebServiceContextJSE;
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * Handles invocations on JSE endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerJSE extends AbstractInvocationHandler
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(InvocationHandlerJSE.class);
+
+   /** Load the SEI implementation bean if necessary */
+   public Class loadServiceEndpoint() throws ClassNotFoundException
+   {
+      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      ClassLoader cl = sepMetaData.getClassLoader();
+      String seiImplName = sepMetaData.getServiceEndpointImplName();
+      Class seiImplClass = cl.loadClass(seiImplName);
+      return seiImplClass;
+   }
+
+   /** Create an instance of the SEI implementation bean if necessary */
+   public Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws IllegalAccessException, InstantiationException
+   {
+      Object seiImpl = seiImplClass.newInstance();
+      if (seiImpl instanceof ServiceLifecycle && context != null)
+      {
+         try
+         {
+            ServiceLifecycle serviceLifecycle = ((ServiceLifecycle)seiImpl);
+            ServletEndpointContext servletEndpointContext = new ServletEndpointContextImpl((ServletRequestContext)context);
+            serviceLifecycle.init(servletEndpointContext);
+         }
+         catch (ServiceException ex)
+         {
+            throw new WSException(ex);
+         }
+      }
+      return seiImpl;
+   }
+
+   /** Invoke an instance of the SEI implementation bean */
+   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws SOAPFaultException, Exception
+   {
+      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+      try
+      {
+         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+         if (msgContext instanceof SOAPMessageContextJAXWS)
+         {
+            WebServiceContext wsContext = new WebServiceContextJSE((SOAPMessageContextJAXWS)msgContext);
+            new WebServiceContextInjector().injectContext(seiImpl, wsContext);
+         }
+
+         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);
+      }
+   }
+
+   /** Destroy an instance of the SEI implementation bean if necessary */
+   public void destroyServiceEndpointInstance(Object seiImpl)
+   {
+      if (seiImpl instanceof ServiceLifecycle)
+      {
+         ((ServiceLifecycle)seiImpl).destroy();
+      }
+   }
+}

Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/server/JAXWSDeployment.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/JAXWSDeployment.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/JAXWSDeployment.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.server;
-
-//$Id$
-
-import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
-
-/**
- * The container independent deployment info.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 29-Jun-2006
- */
-public class JAXWSDeployment extends UnifiedDeploymentInfo
-{
-   public JAXWSDeployment(DeploymentType type)
-   {
-      super(type);
-   }
-}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/server/LifecycleHandlerImpl.java (from rev 2953, trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/LifecycleHandlerImpl.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/LifecycleHandlerImpl.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/LifecycleHandlerImpl.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.server;
+
+//$Id: LifecycleHandlerImpl.java 2923 2007-04-25 14:23:29Z thomas.diesler at jboss.com $
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * A lifecycle handler
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class LifecycleHandlerImpl extends org.jboss.ws.integration.LifecycleHandlerImpl
+{
+   public void start(Endpoint endpoint)
+   {
+      super.start(endpoint);
+      log.info("WebService started: " + getEndpointAddress(endpoint));
+   }
+
+   public void stop(Endpoint endpoint)
+   {
+      super.stop(endpoint);
+      log.info("WebService stoped: " + getEndpointAddress(endpoint));
+   }
+
+   private String getEndpointAddress(Endpoint ep)
+   {
+      ServerEndpointMetaData sepMetaData = ep.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      return sepMetaData.getEndpointAddress();
+   }
+}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/server/RequestHandlerImpl.java (from rev 2953, trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/RequestHandlerImpl.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/RequestHandlerImpl.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,411 @@
+/*
+ * 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.core.server;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.activation.DataHandler;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.http.HTTPBinding;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonBinding;
+import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.HTTPMessageImpl;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.MessageTrace;
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPConnectionImpl;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.core.utils.ThreadLocalAssociation;
+import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
+import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.RequestHandler;
+import org.jboss.ws.integration.Endpoint.EndpointState;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.integration.invocation.InvocationHandler;
+import org.jboss.ws.integration.management.ServerConfig;
+import org.jboss.ws.integration.management.ServerConfigFactory;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
+import org.w3c.dom.Document;
+
+/**
+ * A request handler
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class RequestHandlerImpl implements RequestHandler
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(RequestHandlerImpl.class);
+
+   public void handleRequest(Endpoint endpoint, InputStream inputStream, OutputStream outputStream, InvocationContext context)
+   {
+      log.debug("handleRequest: " + endpoint.getName());
+
+      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      ServletRequestContext reqContext = (ServletRequestContext)context;
+
+      Type type = sepMetaData.getType();
+
+      ServletContext servletContext = reqContext.getServletContext();
+      HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
+      HttpServletResponse httpResponse = reqContext.getHttpServletResponse();
+      ServletHeaderSource headerSource = new ServletHeaderSource(httpRequest, httpResponse);
+
+      // Build the message context
+      CommonMessageContext msgContext;
+      if (type == EndpointMetaData.Type.JAXRPC)
+      {
+         msgContext = new SOAPMessageContextJAXRPC();
+         msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
+         msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
+         msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
+      }
+      else
+      {
+         msgContext = new SOAPMessageContextJAXWS();
+         msgContext.put(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, new Boolean(false));
+         msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new HashMap<String, DataHandler>());
+         msgContext.put(MessageContextJAXWS.HTTP_REQUEST_HEADERS, headerSource.getHeaderMap());
+         msgContext.put(MessageContextJAXWS.HTTP_REQUEST_METHOD, httpRequest.getMethod());
+         msgContext.put(MessageContextJAXWS.QUERY_STRING, httpRequest.getQueryString());
+         msgContext.put(MessageContextJAXWS.PATH_INFO, httpRequest.getPathInfo());
+         msgContext.put(MessageContextJAXWS.SERVLET_CONTEXT, servletContext);
+         msgContext.put(MessageContextJAXWS.SERVLET_REQUEST, httpRequest);
+         msgContext.put(MessageContextJAXWS.SERVLET_RESPONSE, httpResponse);
+
+      }
+      msgContext.setEndpointMetaData(sepMetaData);
+
+      // Associate a message context with the current thread
+      MessageContextAssociation.pushMessageContext(msgContext);
+
+      try
+      {
+         MessageAbstraction resMessage = processRequest(endpoint, headerSource, reqContext, inputStream);
+
+         // Replace the message context with the response context
+         msgContext = MessageContextAssociation.peekMessageContext();
+
+         Map<String, List<String>> headers = (Map<String, List<String>>)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_HEADERS);
+         if (headers != null)
+            headerSource.setHeaderMap(headers);
+
+         Integer code = (Integer)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_CODE);
+         if (code != null)
+            httpResponse.setStatus(code.intValue());
+
+         boolean isFault = false;
+         if (resMessage instanceof SOAPMessage)
+         {
+            SOAPPart part = ((SOAPMessage)resMessage).getSOAPPart();
+            if (part == null)
+               throw new SOAPException("Cannot obtain SOAPPart from response message");
+
+            // R1126 An INSTANCE MUST return a "500 Internal Server Error" HTTP status code
+            // if the response envelope is a Fault.
+            //
+            // Also, a one-way operation must show up as empty content, and can be detected
+            // by a null envelope.
+            SOAPEnvelope soapEnv = part.getEnvelope();
+            isFault = soapEnv != null && soapEnv.getBody().hasFault();
+            if (isFault && httpResponse != null)
+            {
+               httpResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+            }
+         }
+
+         sendResponse(outputStream, msgContext, isFault);
+      }
+      catch (Exception ex)
+      {
+         WSException.rethrow(ex);
+      }
+      finally
+      {
+         // Reset the message context association
+         MessageContextAssociation.popMessageContext();
+
+         // clear thread local storage
+         ThreadLocalAssociation.clear();
+      }
+   }
+
+   private void sendResponse(OutputStream outputStream, CommonMessageContext msgContext, boolean isFault) throws SOAPException, IOException
+   {
+      MessageAbstraction resMessage = msgContext.getMessageAbstraction();
+      String wsaTo = null;
+
+      // Get the destination from the AddressingProperties
+      AddressingProperties outProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND);
+      if (outProps != null && outProps.getTo() != null)
+      {
+         AddressingConstantsImpl ADDR = new AddressingConstantsImpl();
+         wsaTo = outProps.getTo().getURI().toString();
+         if (wsaTo.equals(ADDR.getAnonymousURI()))
+            wsaTo = null;
+      }
+      if (wsaTo != null)
+      {
+         log.debug("Sending response to addressing destination: " + wsaTo);
+         new SOAPConnectionImpl().callOneWay((SOAPMessage)resMessage, wsaTo);
+      }
+      else
+      {
+         resMessage.writeTo(outputStream);
+      }
+   }
+
+   /**
+    * Handle a request to this web service endpoint
+    */
+   private MessageAbstraction processRequest(Endpoint endpoint, MimeHeaderSource headerSource, ServletRequestContext reqContext, InputStream inputStream)
+         throws BindingException
+   {
+      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+
+      ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (sepMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      long beginProcessing = 0;
+      ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
+      try
+      {
+         EndpointState state = endpoint.getState();
+         if (state != EndpointState.STARTED)
+         {
+            QName faultCode = Constants.SOAP11_FAULT_CODE_SERVER;
+            String faultString = "Endpoint cannot handle requests in state: " + state;
+            throw new SOAPFaultException(faultCode, faultString, null, null);
+         }
+
+         log.debug("BEGIN handleRequest: " + endpoint.getName());
+         beginProcessing = initRequestMetrics(endpoint);
+
+         MimeHeaders headers = (headerSource != null ? headerSource.getMimeHeaders() : null);
+
+         MessageAbstraction reqMessage;
+
+         String bindingID = sepMetaData.getBindingId();
+         if (HTTPBinding.HTTP_BINDING.equals(bindingID))
+         {
+            reqMessage = new HTTPMessageImpl(headers, inputStream);
+         }
+         else
+         {
+            MessageFactoryImpl msgFactory = new MessageFactoryImpl();
+            msgFactory.setServiceMode(sepMetaData.getServiceMode());
+            msgFactory.setStyle(sepMetaData.getStyle());
+
+            reqMessage = (SOAPMessageImpl)msgFactory.createMessage(headers, inputStream);
+         }
+
+         // Associate current message with message context
+         msgContext.setMessageAbstraction(reqMessage);
+
+         // debug the incomming message
+         MessageTrace.traceMessage("Incoming Request Message", reqMessage);
+
+         // Set the thread context class loader
+         ClassLoader classLoader = sepMetaData.getClassLoader();
+         Thread.currentThread().setContextClassLoader(classLoader);
+
+         // Invoke the service endpoint
+         InvocationHandler invoker = endpoint.getInvocationHandler();
+         invoker.invoke(reqContext);
+
+         // Get the response message context
+         msgContext = MessageContextAssociation.peekMessageContext();
+
+         // Get the response message
+         MessageAbstraction resMessage = msgContext.getMessageAbstraction();
+         if (resMessage != null)
+            postProcessResponse(headerSource, resMessage);
+
+         return resMessage;
+      }
+      catch (Exception ex)
+      {
+         MessageAbstraction resMessage = msgContext.getMessageAbstraction();
+
+         // In case we have an exception before the invoker is called
+         // we create the fault message here.
+         if (resMessage == null || resMessage.isFaultMessage() == false)
+         {
+            CommonBindingProvider bindingProvider = new CommonBindingProvider(sepMetaData);
+            CommonBinding binding = bindingProvider.getCommonBinding();
+            resMessage = binding.bindFaultMessage(ex);
+         }
+
+         if (resMessage != null)
+            postProcessResponse(headerSource, resMessage);
+
+         return resMessage;
+      }
+      finally
+      {
+         try
+         {
+            MessageAbstraction resMessage = msgContext.getMessageAbstraction();
+            if (resMessage != null)
+            {
+               if (resMessage.isFaultMessage())
+               {
+                  processFaultMetrics(endpoint, beginProcessing);
+               }
+               else
+               {
+                  processResponseMetrics(endpoint, beginProcessing);
+               }
+            }
+         }
+         catch (Exception ex)
+         {
+            log.error("Cannot process metrics", ex);
+         }
+
+         // Reset the thread context class loader
+         Thread.currentThread().setContextClassLoader(ctxClassLoader);
+         log.debug("END handleRequest: " + endpoint.getName());
+      }
+   }
+
+   private long initRequestMetrics(Endpoint endpoint)
+   {
+      return 0;
+   }
+
+   private void processResponseMetrics(Endpoint endpoint, long beginProcessing)
+   {
+   }
+
+   private void processFaultMetrics(Endpoint endpoint, long beginProcessing)
+   {
+   }
+
+   /** Set response mime headers
+    */
+   private void postProcessResponse(MimeHeaderSource headerSource, MessageAbstraction resMessage)
+   {
+      try
+      {
+         // Set the outbound headers
+         if (headerSource != null && resMessage instanceof SOAPMessage)
+         {
+            XOPContext.eagerlyCreateAttachments();
+            ((SOAPMessage)resMessage).saveChanges();
+            headerSource.setMimeHeaders(resMessage.getMimeHeaders());
+         }
+
+         // debug the outgoing message
+         MessageTrace.traceMessage("Outgoing Response Message", resMessage);
+      }
+      catch (Exception ex)
+      {
+         WSException.rethrow("Faild to post process response message", ex);
+      }
+   }
+
+   public void handleWSDLRequest(Endpoint endpoint, OutputStream outputStream, InvocationContext context)
+   {
+      log.debug("handleWSDLRequest: " + endpoint.getName());
+
+      ServerEndpointMetaData epMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+      if (epMetaData == null)
+         throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+      ServletRequestContext reqContext = (ServletRequestContext)context;
+      HttpServletRequest req = reqContext.getHttpServletRequest();
+
+      try
+      {
+         // For the base document the resourcePath should be null
+         String resPath = (String)req.getParameter("resource");
+         URL reqURL = new URL(req.getRequestURL().toString());
+
+         String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() + ":" + reqURL.getPort();
+
+         ServerConfigFactory factory = ServerConfigFactory.getInstance();
+         ServerConfig config = factory.getServerConfig();
+         if (config.getWebServiceHost().equals(ServerConfig.UNDEFINED_HOSTNAME) == false)
+         {
+            wsdlHost = config.getWebServiceHost();
+         }
+         log.debug("WSDL request, using host: " + wsdlHost);
+
+         WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
+         Document document = wsdlRequestHandler.getDocumentForPath(reqURL, wsdlHost, resPath);
+
+         OutputStreamWriter writer = new OutputStreamWriter(outputStream);
+         new DOMWriter(writer).setPrettyprint(true).print(document.getDocumentElement());
+         outputStream.flush();
+         outputStream.close();
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (IOException ex)
+      {
+         throw new WSException(ex);
+      }
+   }
+}

Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointGeneratorEJB.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointGeneratorEJB.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointGeneratorEJB.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -33,7 +33,7 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.core.utils.DOMUtils;
 import org.jboss.ws.core.utils.DOMWriter;
 import org.jboss.ws.integration.management.ServerConfig;

Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointPublisher.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointPublisher.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointPublisher.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,267 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.server;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.Servlet;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.core.utils.DOMWriter;
-import org.jboss.ws.core.utils.IOUtils;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.integration.Endpoint;
-import org.w3c.dom.Element;
-
-/**
- * The publisher for web service endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 12-May-2006
- */
-public class ServiceEndpointPublisher
-{
-   // logging support
-   private static Logger log = Logger.getLogger(ServiceEndpointPublisher.class);
-
-   // The default bean name
-   public static final String BEAN_NAME = "ServiceEndpointPublisher";
-
-   // The configured service endpoint servlet
-   private String servletClass;
-
-   // The results of the URL rewriting
-   public class RewriteResults
-   {
-      // The URL to the rewrittn web.xml
-      public URL webXML;
-      // Map<servlet-name, servlet-class> the servlet-class enties are the implementation beans 
-      public Map<String, String> sepTargetMap = new HashMap<String, String>();
-   }
-
-   public String getServletClass()
-   {
-      return servletClass;
-   }
-
-   public void setServletClass(String servletClass)
-   {
-      this.servletClass = servletClass;
-   }
-
-   public RewriteResults rewriteWebXml(UnifiedDeploymentInfo udi)
-   {
-      URL warURL = udi.webappURL;
-      File warFile = new File(warURL.getFile());
-      if (warFile.isDirectory() == false)
-         throw new WSException("Expected a war directory: " + warURL);
-
-      File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
-      if (webXML.isFile() == false)
-         throw new WSException("Cannot find web.xml: " + webXML);
-
-      try
-      {
-         // After redeployment there might be a stale copy of the original web.xml.org, we delete it
-         File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
-         orgWebXML.delete();
-
-         // Rename the web.xml
-         if (webXML.renameTo(orgWebXML) == false)
-            throw new WSException("Cannot rename web.xml: " + orgWebXML);
-
-         FileInputStream stream = new FileInputStream(orgWebXML);
-         return rewriteWebXml(stream, webXML, udi.classLoader);
-      }
-      catch (RuntimeException rte)
-      {
-         throw rte;
-      }
-      catch (Exception e)
-      {
-         throw new WSException(e);
-      }
-   }
-
-   public RewriteResults rewriteWebXml(InputStream source, File dest, ClassLoader loader) throws Exception
-   {
-      if (dest == null)
-      {
-         dest = File.createTempFile("jbossws-alt-web", "xml", IOUtils.createTempDirectory());
-         dest.deleteOnExit();
-      }
-
-      Element root = DOMUtils.parse(source);
-      RewriteResults results = modifyServletConfig(root, loader);
-      results.webXML = dest.toURL();
-
-      FileOutputStream fos = new FileOutputStream(dest);
-      new DOMWriter(fos).setPrettyprint(true).print(root);
-      fos.flush();
-      fos.close();
-
-      return results;
-   }
-
-   private RewriteResults modifyServletConfig(Element root, ClassLoader loader) throws ClassNotFoundException
-   {
-      RewriteResults results = new RewriteResults();
-      Iterator itServlets = DOMUtils.getChildElements(root, "servlet");
-      while (itServlets.hasNext())
-      {
-         Element servletElement = (Element)itServlets.next();
-         String linkName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(servletElement, "servlet-name"));
-
-         // find the servlet-class
-         Element classElement = DOMUtils.getFirstChildElement(servletElement, "servlet-class");
-
-         // JSP
-         if (classElement == null)
-            continue;
-
-         String orgServletClassName = DOMUtils.getTextContent(classElement).trim();
-
-         // Get the servlet class
-         Class orgServletClass = null;
-         if (loader != null)
-         {
-            try
-            {
-               orgServletClass = loader.loadClass(orgServletClassName);
-            }
-            catch (ClassNotFoundException ex)
-            {
-               log.warn("Cannot load servlet class: " + orgServletClassName);
-            }
-         }
-
-         String targetBeanName = null;
-
-         // Nothing to do if we have an <init-param>
-         if (isAlreadyModified(servletElement))
-         {
-            Iterator itParams = DOMUtils.getChildElements(servletElement, "init-param");
-            while (itParams.hasNext())
-            {
-               Element elParam = (Element)itParams.next();
-               Element elParamName = DOMUtils.getFirstChildElement(elParam, "param-name");
-               Element elParamValue = DOMUtils.getFirstChildElement(elParam, "param-value");
-               if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(DOMUtils.getTextContent(elParamName)))
-               {
-                  targetBeanName = DOMUtils.getTextContent(elParamValue);
-               }
-            }
-         }
-         else
-         {
-            // Check if it is a real servlet that we can ignore
-            if (orgServletClass != null && JavaUtils.isAssignableFrom(Servlet.class, orgServletClass))
-            {
-               log.info("Ignore servlet: " + orgServletClassName);
-               continue;
-            }
-            else if (orgServletClassName.endsWith("Servlet"))
-            {
-               log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
-               continue;
-            }
-
-            // build a list of detached elements that come after <servlet-class>
-            boolean startDetach = false;
-            List<Element> detachedElements = new ArrayList<Element>();
-            Iterator itDetached = DOMUtils.getChildElements(servletElement);
-            while (itDetached.hasNext())
-            {
-               Element el = (Element)itDetached.next();
-               if (startDetach == true)
-               {
-                  detachedElements.add(el);
-                  servletElement.removeChild(el);
-               }
-               if (el.equals(classElement))
-               {
-                  servletElement.removeChild(el);
-                  startDetach = true;
-               }
-            }
-
-            // replace the class name
-            classElement = (Element)DOMUtils.createElement("servlet-class");
-            classElement.appendChild(DOMUtils.createTextNode(servletClass));
-            classElement = (Element)servletElement.getOwnerDocument().importNode(classElement, true);
-            servletElement.appendChild(classElement);
-
-            // add additional init params
-            if (orgServletClassName.equals(servletClass) == false)
-            {
-               Element paramElement = DOMUtils.createElement("init-param");
-               paramElement.appendChild(DOMUtils.createElement("param-name")).appendChild(DOMUtils.createTextNode(Endpoint.SEPID_DOMAIN_ENDPOINT));
-               paramElement.appendChild(DOMUtils.createElement("param-value")).appendChild(DOMUtils.createTextNode(orgServletClassName));
-               paramElement = (Element)servletElement.getOwnerDocument().importNode(paramElement, true);
-               servletElement.appendChild(paramElement);
-               targetBeanName = orgServletClassName;
-            }
-
-            // reattach the elements
-            itDetached = detachedElements.iterator();
-            while (itDetached.hasNext())
-            {
-               Element el = (Element)itDetached.next();
-               servletElement.appendChild(el);
-            }
-         }
-
-         if (targetBeanName == null)
-            throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
-
-         // remember the target bean name
-         results.sepTargetMap.put(linkName, targetBeanName.trim());
-      }
-
-      return results;
-   }
-
-   // Return true if the web.xml is already modified
-   private boolean isAlreadyModified(Element servletElement)
-   {
-      Iterator itParams = DOMUtils.getChildElements(servletElement, "init-param");
-      while (itParams.hasNext())
-      {
-         Element elParam = (Element)itParams.next();
-         Element elParamName = DOMUtils.getFirstChildElement(elParam, "param-name");
-         if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(DOMUtils.getTextContent(elParamName)))
-            return true;
-      }
-      return false;
-   }
-}
\ No newline at end of file

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointServlet.java (from rev 2953, trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ServiceEndpointServlet.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointServlet.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.server;
+
+// $Id$
+
+import javax.servlet.ServletContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * A servlet that is installed for every web service endpoint.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class ServiceEndpointServlet extends AbstractServiceEndpointServlet
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(ServiceEndpointServlet.class);
+
+   /** Initialize the service endpoint
+    */
+   protected void initServiceEndpoint(String contextPath)
+   {
+      super.initServiceEndpoint(contextPath);
+
+      // read the config name/file from web.xml
+      ServletContext ctx = getServletContext();
+      String configName = ctx.getInitParameter("jbossws-config-name");
+      String configFile = ctx.getInitParameter("jbossws-config-file");
+      if (configName != null || configFile != null)
+      {
+         ServerEndpointMetaData epMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+         if (epMetaData == null)
+            throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+         log.debug("Updating service endpoint config\n  config-name: " + configName + "\n  config-file: " + configFile);
+         epMetaData.setConfigName(configName, configFile);
+      }
+   }
+}

Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,144 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.server;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.management.ObjectName;
-
-import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
-
-/**
- * The container independent deployment info.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 05-May-2006
- */
-public class UnifiedDeploymentInfo
-{
-   public UnifiedDeploymentInfo(DeploymentType type)
-   {
-      this.type = type;
-   }
-
-   /** The type of this deployment */
-   public DeploymentType type;
-   /** Sub deployments have a parent */
-   public UnifiedDeploymentInfo parent;
-   /** The suffix of the deployment url */
-   public String simpleName;
-   /** The URL for this deployment */
-   public URL url;
-   /** The virtual file for the deployment root */
-   public UnifiedVirtualFile vfRoot;
-   /** The string identifing this deployment **/
-   public String name;
-   /** The URL to the expanded webapp **/
-   public URL webappURL;
-   /** We can hold "typed" metadata */
-   public Object metaData;
-   /** The deployment classloader **/
-   public ClassLoader classLoader;
-   /** An optional ObjectName of the deployed object */
-   public ObjectName deployedObject;
-
-   /** An arbitrary map of state associated with the deployment */
-   private Map<Class, Object> attachments = new HashMap<Class, Object>();
-   
-   public <T> T getAttachment(Class<T> key)
-   {
-      return (T)attachments.get(key);
-   }
-   
-   public <T> T addAttachment(Class<T> key, T value)
-   {
-      return (T)attachments.put(key, value);
-   }
-   
-   /** The sortName concatenated with the canonical names of all parents. */
-   public String getCanonicalName()
-   {
-      String name = simpleName;
-      if (parent != null)
-         name = parent.getCanonicalName() + "/" + name;
-      return name;
-   }
-
-   public URL getMetaDataFileURL(String resourcePath) throws IOException
-   {
-      URL resourceURL = null;
-      if (resourcePath != null && resourcePath.length() > 0)
-      {
-         if (resourcePath.startsWith("/"))
-            resourcePath = resourcePath.substring(1);
-
-         try
-         {
-            // assign an absolute URL 
-            resourceURL = new URL(resourcePath);
-         }
-         catch (MalformedURLException ex)
-         {
-            // ignore
-         }
-
-         if (resourceURL == null && vfRoot != null)
-         {
-            UnifiedVirtualFile vfResource = vfRoot.findChild(resourcePath);
-            resourceURL = vfResource.toURL();
-         }
-
-         if (resourceURL == null)
-         {
-            String deploymentPath = url.toExternalForm();
-
-            if (deploymentPath.startsWith("jar:") && deploymentPath.endsWith("!/") == false)
-               deploymentPath += "!/";
-
-            if (deploymentPath.endsWith("/") == false)
-               deploymentPath += "/";
-
-            // assign a relative URL
-            resourceURL = new URL(deploymentPath + resourcePath);
-         }
-      }
-      return resourceURL;
-   }
-
-   public String toString()
-   {
-      StringBuilder builder = new StringBuilder();
-      builder.append("[");
-      builder.append("type=" + type);
-      builder.append(",simpleName=" + simpleName);
-      builder.append(",url=" + url);
-      builder.append("]");
-      return builder.toString();
-   }
-}

Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/server/WSDLFilePublisher.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/WSDLFilePublisher.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/WSDLFilePublisher.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,328 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.server;
-
-// $Id$
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Writer;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Import;
-import javax.wsdl.factory.WSDLFactory;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.core.utils.IOUtils;
-import org.jboss.ws.core.utils.ResourceURL;
-import org.jboss.ws.integration.management.ServerConfig;
-import org.jboss.ws.integration.management.ServerConfigFactory;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLWriter;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/** A helper class that publishes the wsdl files and their imports to the server/data/wsdl directory.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 02-June-2004
- */
-public class WSDLFilePublisher
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(WSDLFilePublisher.class);
-
-   // The deployment info for the web service archive
-   private UnifiedDeploymentInfo udi;
-   // The expected wsdl location in the deployment
-   private String expLocation;
-
-   public WSDLFilePublisher(UnifiedDeploymentInfo udi)
-   {
-      this.udi = udi;
-
-      if (udi.type.toString().endsWith("_JSE"))
-      {
-         expLocation = "WEB-INF/wsdl/";
-      }
-      else
-      {
-         expLocation = "META-INF/wsdl/";
-      }
-   }
-
-   /** Publish the deployed wsdl file to the data directory
-    */
-   public void publishWsdlFiles(UnifiedMetaData wsMetaData) throws IOException
-   {
-      String deploymentName = udi.getCanonicalName();
-
-      // For each service
-      for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
-      {
-         File wsdlFile = getPublishLocation(deploymentName, serviceMetaData);
-         wsdlFile.getParentFile().mkdirs();
-
-         // Get the wsdl definition and write it to the wsdl publish location
-         try
-         {
-            Writer fWriter = IOUtils.getCharsetFileWriter(wsdlFile, Constants.DEFAULT_XML_CHARSET);
-            WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
-            new WSDLWriter(wsdlDefinitions).write(fWriter, Constants.DEFAULT_XML_CHARSET);
-
-            URL wsdlPublishURL = wsdlFile.toURL();
-            log.info("WSDL published to: " + wsdlPublishURL);
-
-            // udpate the wsdl file location 
-            serviceMetaData.setWsdlLocation(wsdlFile.toURL());
-
-            // Process the wsdl imports
-            Definition wsdl11Definition = wsdlDefinitions.getWsdlOneOneDefinition();
-            if (wsdl11Definition != null)
-            {
-               publishWsdlImports(wsdlFile.toURL(), wsdl11Definition);
-
-               // Publish XMLSchema imports
-               Document document = wsdlDefinitions.getWsdlDocument();
-               publishSchemaImports(wsdlFile.toURL(), document.getDocumentElement());
-            }
-            else
-            {
-               throw new NotImplementedException("WSDL-2.0 imports");
-            }
-         }
-         catch (RuntimeException rte)
-         {
-            throw rte;
-         }
-         catch (Exception e)
-         {
-            throw new WSException("Cannot publish wsdl to: " + wsdlFile, e);
-         }
-      }
-   }
-
-   /** Publish the wsdl imports for a given wsdl definition
-    */
-   private void publishWsdlImports(URL parentURL, Definition parentDefinition) throws Exception
-   {
-      String baseURI = parentURL.toExternalForm();
-
-      Iterator it = parentDefinition.getImports().values().iterator();
-      while (it.hasNext())
-      {
-         for (Import wsdlImport : (List<Import>)it.next())
-         {
-            String locationURI = wsdlImport.getLocationURI();
-            Definition subdef = wsdlImport.getDefinition();
-
-            // its an external import, don't publish locally
-            if (locationURI.startsWith("http://") == false)
-            {
-               URL targetURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + locationURI);
-               File targetFile = new File(targetURL.getPath());
-               targetFile.getParentFile().mkdirs();
-
-               WSDLFactory wsdlFactory = WSDLFactory.newInstance();
-               javax.wsdl.xml.WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
-               FileWriter fw = new FileWriter(targetFile);
-               wsdlWriter.writeWSDL(subdef, fw);
-               fw.close();
-
-               if (log.isDebugEnabled())
-                  log.debug("WSDL import published to: " + targetURL);
-
-               // recursivly publish imports
-               publishWsdlImports(targetURL, subdef);
-
-               // Publish XMLSchema imports
-               Element subdoc = DOMUtils.parse(targetURL.openStream());
-               publishSchemaImports(targetURL, subdoc);
-            }
-         }
-      }
-   }
-
-   /** Publish the schema imports for a given wsdl definition
-    */
-   private void publishSchemaImports(URL parentURL, Element element) throws Exception
-   {
-      String baseURI = parentURL.toExternalForm();
-
-      Iterator it = DOMUtils.getChildElements(element);
-      while (it.hasNext())
-      {
-         Element childElement = (Element)it.next();
-         if ("import".equals(childElement.getLocalName()) || "include".equals(childElement.getLocalName()))
-         {
-            String schemaLocation = childElement.getAttribute("schemaLocation");
-            if (schemaLocation.length() > 0)
-            {
-               if (schemaLocation.startsWith("http://") == false)
-               {
-                  URL xsdURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + schemaLocation);
-                  File targetFile = new File(xsdURL.getPath());
-                  targetFile.getParentFile().mkdirs();
-
-                  String deploymentName = udi.getCanonicalName();
-
-                  // get the resource path
-                  int index = baseURI.indexOf(deploymentName);
-                  String resourcePath = baseURI.substring(index + deploymentName.length());
-                  resourcePath = resourcePath.substring(0, resourcePath.lastIndexOf("/"));
-                  if (resourcePath.length() > 0)
-                     resourcePath = resourcePath + "/";
-
-                  resourcePath = expLocation + resourcePath + schemaLocation;
-                  URL resourceURL = udi.getMetaDataFileURL(resourcePath);
-                  InputStream is = new ResourceURL(resourceURL).openStream();
-                  if (is == null)
-                     throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);
-
-                  FileOutputStream fos = new FileOutputStream(targetFile);
-                  IOUtils.copyStream(fos, is);
-                  fos.close();
-                  is.close();
-
-                  if (log.isDebugEnabled())
-                     log.debug("XMLSchema import published to: " + xsdURL);
-
-                  // recursivly publish imports
-                  Element subdoc = DOMUtils.parse(xsdURL.openStream());
-                  publishSchemaImports(xsdURL, subdoc);
-               }
-            }
-         }
-         else
-         {
-            publishSchemaImports(parentURL, childElement);
-         }
-      }
-   }
-
-   /**
-    * Delete the published wsdl
-    */
-   public void unpublishWsdlFiles() throws IOException
-   {
-      String deploymentDir = (udi.parent != null ? udi.parent.simpleName : udi.simpleName);
-      ServerConfig config = ServerConfigFactory.getInstance().getServerConfig();
-      File serviceDir = new File(config.getServerDataDir().getCanonicalPath() + "/wsdl/" + deploymentDir);
-      deleteWsdlPublishDirectory(serviceDir);
-   }
-
-   /**
-    * Delete the published wsdl document, traversing down the dir structure
-    */
-   private void deleteWsdlPublishDirectory(File dir) throws IOException
-   {
-      String[] files = dir.list();
-      for (int i = 0; files != null && i < files.length; i++)
-      {
-         String fileName = files[i];
-         File file = new File(dir + "/" + fileName);
-         if (file.isDirectory())
-         {
-            deleteWsdlPublishDirectory(file);
-         }
-         else
-         {
-            if (file.delete() == false)
-               log.warn("Cannot delete published wsdl document: " + file.toURL());
-         }
-      }
-
-      // delete the directory as well
-      dir.delete();
-   }
-
-   /**
-    * Get the file publish location
-    */
-   private File getPublishLocation(String archiveName, ServiceMetaData serviceMetaData) throws IOException
-   {
-      String wsdlLocation = null;
-      if (serviceMetaData.getWsdlLocation() != null)
-         wsdlLocation = serviceMetaData.getWsdlLocation().toExternalForm();
-      else if (serviceMetaData.getWsdlFile() != null)
-         wsdlLocation = serviceMetaData.getWsdlFile();
-
-      if (wsdlLocation == null)
-         throw new IllegalStateException("Cannot obtain wsdl location for: " + serviceMetaData.getServiceName());
-
-      if (log.isDebugEnabled())
-         log.debug("Publish WSDL file: " + wsdlLocation);
-
-      // Only file URLs are supported in <wsdl-publish-location>
-      String publishLocation = serviceMetaData.getWsdlPublishLocation();
-      boolean predefinedLocation = publishLocation != null && publishLocation.startsWith("file:");
-
-      File locationFile = null;
-      if (predefinedLocation == false)
-      {
-         ServerConfig config = ServerConfigFactory.getInstance().getServerConfig();
-         locationFile = new File(config.getServerDataDir().getCanonicalPath() + "/wsdl/" + archiveName);
-      }
-      else
-      {
-         try
-         {
-            locationFile = new File(new URL(publishLocation).getPath());
-         }
-         catch (MalformedURLException e)
-         {
-            throw new IllegalArgumentException("Invalid publish location: " + e.getMessage());
-         }
-      }
-
-      File wsdlFile;
-      if (wsdlLocation.indexOf(expLocation) >= 0)
-      {
-         wsdlLocation = wsdlLocation.substring(wsdlLocation.indexOf(expLocation) + expLocation.length());
-         wsdlFile = new File(locationFile + "/" + wsdlLocation);
-      }
-      else if (wsdlLocation.startsWith("vfsfile:") || wsdlLocation.startsWith("file:") || wsdlLocation.startsWith("jar:"))
-      {
-         wsdlLocation = wsdlLocation.substring(wsdlLocation.lastIndexOf("/") + 1);
-         wsdlFile = new File(locationFile + "/" + wsdlLocation);
-      }
-      else
-      {
-         throw new WSException("Invalid wsdlFile '" + wsdlLocation + "', expected in: " + expLocation);
-      }
-
-      return wsdlFile;
-   }
-}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/JBossContextServlet.java (from rev 2953, trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/JBossContextServlet.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/JBossContextServlet.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/JBossContextServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -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.core.server.legacy;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-Mar-2005
+ */
+public class JBossContextServlet extends CommonContextServlet
+{
+   // provide logging
+   protected final Logger log = Logger.getLogger(JBossContextServlet.class);
+
+   protected void initServiceEndpointManager()
+   {
+      ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+      epManager = factory.getServiceEndpointManager();
+   }
+}

Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/PortComponentLinkServlet.java (from rev 2953, trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PortComponentLinkServlet.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/PortComponentLinkServlet.java	                        (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/PortComponentLinkServlet.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -0,0 +1,90 @@
+/*
+ * 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.core.server.legacy;
+
+// $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;
+
+/**
+ * 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();
+   }
+}

Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointDeployer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointDeployer.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointDeployer.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,231 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.server.legacy;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.management.ObjectName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.WSDLFilePublisher;
-import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * The POJO deployer for web service endpoints. This Deployer is already decoupled from the target
- * container (i.e. JBoss, Tomcat). The containers deployer architecture should be used to populate
- * the UnifiedDeploymentInfo object.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 12-May-2006
- */
-public class ServiceEndpointDeployer
-{
-   // logging support
-   private static Logger log = Logger.getLogger(ServiceEndpointDeployer.class);
-
-   // default bean name
-   public static final String BEAN_NAME = "ServiceEndpointDeployer";
-
-   // The ServiceEndpointManger injected by the kernel
-   private ServiceEndpointManager epManager;
-
-   // Maps the deployment url to UMDM
-   private Map<String, UnifiedMetaData> metaDataMap = new ConcurrentHashMap<String, UnifiedMetaData>();
-
-   // Injected by the Microkernel
-   public void setServiceEndpointManager(ServiceEndpointManager epManager)
-   {
-      this.epManager = epManager;
-   }
-
-   public void create(UnifiedDeploymentInfo udi)
-   {
-      if(log.isDebugEnabled()) log.debug("create: " + udi.name);
-      try
-      {
-         UnifiedMetaData wsMetaData;
-         if (udi.type == DeploymentType.JAXRPC_JSE)
-         {
-            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
-            wsMetaData = builder.buildMetaData((JAXRPCDeployment)udi);
-         }
-         else if (udi.type == DeploymentType.JAXRPC_EJB21)
-         {
-            JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
-            wsMetaData = builder.buildMetaData((JAXRPCDeployment)udi);
-         }
-         else if (udi.type == DeploymentType.JAXWS_JSE)
-         {
-            JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
-            wsMetaData = builder.buildMetaData(udi);
-         }
-         else if (udi.type == DeploymentType.JAXWS_EJB3)
-         {
-            JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
-            wsMetaData = builder.buildMetaData(udi);
-         }
-         else
-         {
-            throw new IllegalStateException("Invalid type:  " + udi.type);
-         }
-
-         metaDataMap.put(udi.name, wsMetaData);
-
-         for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
-         {
-            for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
-            {
-               ServiceEndpointInfo seInfo = new ServiceEndpointInfo(udi, (ServerEndpointMetaData)epMetaData);
-               epManager.createServiceEndpoint(seInfo);
-            }
-         }
-      }
-      catch (Exception ex)
-      {
-         log.error("Cannot create service endpoint", ex);
-         if (ex instanceof RuntimeException)
-            throw (RuntimeException)ex;
-
-         throw new WSException(ex);
-      }
-   }
-
-   public void start(UnifiedDeploymentInfo udi)
-   {
-      if(log.isDebugEnabled()) log.debug("start: " + udi.name);
-      try
-      {
-         UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
-         if (wsMetaData != null)
-         {
-            // late initialization of the web context loader
-            if (wsMetaData.getClassLoader() != udi.classLoader)
-               wsMetaData.setClassLoader(udi.classLoader);
-
-            // Publish the WSDL file
-            WSDLFilePublisher wsdlfp = new WSDLFilePublisher(udi);
-            wsdlfp.publishWsdlFiles(wsMetaData);
-            for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
-            {
-               for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
-               {
-                  ObjectName sepID = ((ServerEndpointMetaData)epMetaData).getServiceEndpointID();
-                  epManager.startServiceEndpoint(sepID);
-               }
-            }
-         }
-      }
-      catch (Exception ex)
-      {
-         log.error("Cannot start service endpoint", ex);
-         if (ex instanceof RuntimeException)
-            throw (RuntimeException)ex;
-
-         throw new WSException(ex);
-      }
-   }
-
-   public void stop(UnifiedDeploymentInfo udi)
-   {
-      if(log.isDebugEnabled()) log.debug("stop: " + udi.name);
-      try
-      {
-         UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
-         if (wsMetaData != null)
-         {
-            // Stop the service endpoints
-            for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
-            {
-               for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
-               {
-                  ObjectName sepID = ((ServerEndpointMetaData)epMetaData).getServiceEndpointID();
-                  epManager.stopServiceEndpoint(sepID);
-               }
-            }
-
-            // Unpublish the WSDL file
-            WSDLFilePublisher wsdlfp = new WSDLFilePublisher(udi);
-            wsdlfp.unpublishWsdlFiles();
-         }
-      }
-      catch (Exception ex)
-      {
-         log.error("Cannot stop service endpoint", ex);
-         if (ex instanceof RuntimeException)
-            throw (RuntimeException)ex;
-
-         throw new WSException(ex);
-      }
-   }
-
-   public void destroy(UnifiedDeploymentInfo udi)
-   {
-      if(log.isDebugEnabled()) log.debug("destroy: " + udi.name);
-      try
-      {
-         UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
-         if (wsMetaData != null)
-         {
-            // Destroy the service endpoints
-            for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
-            {
-               for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
-               {
-                  ObjectName sepID = ((ServerEndpointMetaData)epMetaData).getServiceEndpointID();
-                  epManager.destroyServiceEndpoint(sepID);
-               }
-            }
-            removeUnifiedMetaData(udi);
-         }
-      }
-      catch (Exception ex)
-      {
-         log.error("Cannot destroy service endpoint", ex);
-         if (ex instanceof RuntimeException)
-            throw (RuntimeException)ex;
-
-         throw new WSException(ex);
-      }
-   }
-
-   public UnifiedMetaData getUnifiedMetaData(UnifiedDeploymentInfo udi)
-   {
-      UnifiedMetaData wsMetaData = metaDataMap.get(udi.name);
-      return wsMetaData;
-   }
-   
-   public void removeUnifiedMetaData(UnifiedDeploymentInfo udi)
-   {
-      metaDataMap.remove(udi.name);
-   }
-}
\ No newline at end of file

Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointInfo.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointInfo.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointInfo.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -26,7 +26,7 @@
 import javax.management.ObjectName;
 
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
 import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
 import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;

Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointInvokerJSE.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointInvokerJSE.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/legacy/ServiceEndpointInvokerJSE.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,122 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.server.legacy;
-
-// $Id: $
-
-import java.lang.reflect.Method;
-
-import javax.xml.rpc.ServiceException;
-import javax.xml.rpc.server.ServiceLifecycle;
-import javax.xml.rpc.server.ServletEndpointContext;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.WebServiceContext;
-
-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.jaxrpc.ServletEndpointContextImpl;
-import org.jboss.ws.core.jaxws.WebServiceContextInjector;
-import org.jboss.ws.core.jaxws.WebServiceContextJSE;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.server.ServletRequestContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-
-/**
- * Handles invocations on JSE endpoints.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 19-Jan-2005
- */
-public class ServiceEndpointInvokerJSE extends AbstractServiceEndpointInvoker implements ServiceEndpointInvoker
-{
-   // provide logging
-   private Logger log = Logger.getLogger(ServiceEndpointInvokerJSE.class);
-
-   /** Load the SEI implementation bean if necessary */
-   public Class loadServiceEndpoint() throws ClassNotFoundException
-   {
-      ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
-      ClassLoader cl = epMetaData.getClassLoader();
-      String seiImplName = epMetaData.getServiceEndpointImplName();
-      Class seiImplClass = cl.loadClass(seiImplName);
-      return seiImplClass;
-   }
-
-   /** Create an instance of the SEI implementation bean if necessary */
-   public Object createServiceEndpointInstance(Object context, Class seiImplClass) throws IllegalAccessException, InstantiationException
-   {
-      Object seiImpl = seiImplClass.newInstance();
-      if (seiImpl instanceof ServiceLifecycle && context != null)
-      {
-         try
-         {
-            ServiceLifecycle serviceLifecycle = ((ServiceLifecycle)seiImpl);
-            ServletEndpointContext servletEndpointContext = new ServletEndpointContextImpl((ServletRequestContext)context);
-            serviceLifecycle.init(servletEndpointContext);
-         }
-         catch (ServiceException ex)
-         {
-            throw new WSException(ex);
-         }
-      }
-      return seiImpl;
-   }
-
-   /** Invoke an instance of the SEI implementation bean */
-   public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws SOAPFaultException, Exception
-   {
-      log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
-      try
-      {
-         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-         if (msgContext instanceof SOAPMessageContextJAXWS)
-         {
-            WebServiceContext wsContext = new WebServiceContextJSE((SOAPMessageContextJAXWS)msgContext);
-            new WebServiceContextInjector().injectContext(seiImpl, wsContext);
-         }
-         
-         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);
-      }
-   }
-
-   /** Destroy an instance of the SEI implementation bean if necessary */
-   public void destroyServiceEndpointInstance(Object seiImpl)
-   {
-      if (seiImpl instanceof ServiceLifecycle)
-      {
-         ((ServiceLifecycle)seiImpl).destroy();
-      }
-   }
-}

Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -46,8 +46,8 @@
 import org.jboss.logging.Logger;
 import org.jboss.ws.Constants;
 import org.jboss.ws.WSException;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.core.jaxrpc.Use;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
 import org.jboss.ws.core.server.legacy.ServiceEndpointManager;
 import org.jboss.ws.core.server.legacy.ServiceEndpointManagerFactory;
 import org.jboss.ws.integration.ObjectNameFactory;

Deleted: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientDeployment.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientDeployment.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientDeployment.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.metadata.builder.jaxrpc;
-
-//$Id$
-
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
-
-/**
- * The container independent deployment info. 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 05-May-2006
- */
-public class JAXRPCClientDeployment extends UnifiedDeploymentInfo
-{
-
-   public JAXRPCClientDeployment(DeploymentType type)
-   {
-      super(type);
-   }
-}

Deleted: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCDeployment.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.metadata.builder.jaxrpc;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.integration.UnifiedVirtualFile;
-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;
-
-// $Id$
-
-/**
- * The container independent deployment info. 
- *
- * @author Thomas.Diesler at jboss.org
- * @since 05-May-2006
- */
-public class JAXRPCDeployment extends UnifiedDeploymentInfo
-{
-   private WebservicesMetaData wsMetaData;
-
-   public JAXRPCDeployment(DeploymentType type, WebservicesMetaData wsMetaData)
-   {
-      super(type);
-      this.wsMetaData = wsMetaData;
-   }
-
-   public JAXRPCDeployment(DeploymentType type, UnifiedVirtualFile vfWebservices)
-   {
-      super(type);
-
-      try
-      {
-         // Unmarshall webservices.xml
-         URL webservicesURL = vfWebservices.toURL();
-         InputStream is = webservicesURL.openStream();
-         try
-         {
-            Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
-            ObjectModelFactory factory = new WebservicesFactory(webservicesURL);
-            wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(is, factory, null);
-         }
-         finally
-         {
-            is.close();
-         }
-      }
-      catch (Exception ex)
-      {
-         WSException.rethrow(ex);
-      }
-   }
-
-   public WebservicesMetaData getWebservicesMetaData()
-   {
-      return wsMetaData;
-   }
-}

Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -29,6 +29,7 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.WSException;
+import org.jboss.ws.core.deployment.JAXRPCDeployment;
 import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
 import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
 import org.jboss.ws.metadata.j2ee.UnifiedEjbPortComponentMetaData;

Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -30,7 +30,7 @@
 import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.logging.Logger;
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+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.umdm.UnifiedMetaData;

Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -26,7 +26,7 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
 import org.jboss.ws.metadata.umdm.UnifiedMetaData;
 

Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -37,8 +37,8 @@
 import javax.xml.ws.Service.Mode;
 
 import org.jboss.ws.Constants;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.core.jaxrpc.Style;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
 import org.jboss.ws.core.soap.SOAPContentElement;
 import org.jboss.ws.core.utils.JavaUtils;
 import org.jboss.ws.metadata.builder.MetaDataBuilder;

Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -28,7 +28,7 @@
 
 import org.jboss.ws.annotation.EndpointConfig;
 import org.jboss.ws.annotation.WebContext;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
 import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
 import org.jboss.ws.metadata.umdm.UnifiedMetaData;

Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -34,7 +34,7 @@
 
 import org.jboss.ws.Constants;
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.core.utils.IOUtils;
 import org.jboss.ws.metadata.builder.MetaDataBuilder;
 import org.jboss.ws.metadata.umdm.*;

Modified: trunk/jbossws-core/src/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java	2007-05-04 10:28:42 UTC (rev 2958)
+++ trunk/jbossws-core/src/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java	2007-05-04 12:20:09 UTC (rev 2959)
@@ -30,7 +30,7 @@
 import javax.ejb.Stateless;
 
 import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
 import org.jboss.ws.integration.ResourceLoaderAdapter;
 import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
 import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;




More information about the jbossws-commits mailing list