[jbossws-commits] JBossWS SVN: r14242 - in stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf: deployment and 3 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed May 4 17:53:28 EDT 2011


Author: alessio.soldano at jboss.com
Date: 2011-05-04 17:53:28 -0400 (Wed, 04 May 2011)
New Revision: 14242

Modified:
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
   stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java
Log:
[JBWS-3282] Moving configuration processing in EndpointImpl to properly support both spring and non-spring cases


Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java	2011-05-04 12:03:07 UTC (rev 14241)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java	2011-05-04 21:53:28 UTC (rev 14242)
@@ -37,6 +37,7 @@
 import org.jboss.ws.Constants;
 import org.jboss.wsf.spi.binding.BindingCustomization;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
 import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
 import org.jboss.wsf.stack.cxf.interceptor.EnableOneWayDecoupledFaultInterceptor;
 import org.jboss.wsf.stack.cxf.interceptor.EndpointAssociationInterceptor;
@@ -117,7 +118,7 @@
     * @return                 The new jbossws cxf configurer
     */
    public abstract Configurer createServerConfigurer(BindingCustomization customization,
-         WSDLFilePublisher wsdlPublisher, List<Endpoint> depEndpoints);
+         WSDLFilePublisher wsdlPublisher, List<Endpoint> depEndpoints, UnifiedVirtualFile root);
    
    protected static void setInterceptors(Bus bus)
    {

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java	2011-05-04 12:03:07 UTC (rev 14241)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java	2011-05-04 21:53:28 UTC (rev 14242)
@@ -1,6 +1,6 @@
 /*
  * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  *
@@ -39,6 +39,7 @@
 import org.apache.cxf.ws.rm.RMManager;
 import org.jboss.wsf.spi.binding.BindingCustomization;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
 import org.jboss.wsf.stack.cxf.client.configuration.JBossWSNonSpringBusFactory;
 import org.jboss.wsf.stack.cxf.client.configuration.JBossWSNonSpringConfigurer;
 import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
@@ -123,21 +124,9 @@
    @SuppressWarnings("rawtypes")
    private static void setHandlers(EndpointImpl endpoint, DDEndpoint dde)
    {
-      List<String> handlers = new LinkedList<String>();
-      if (dde.getPreHandlers() != null)
+      List<String> handlers = dde.getHandlers();
+      if (handlers != null && !handlers.isEmpty())
       {
-         handlers.addAll(dde.getPreHandlers());
-      }
-      if (dde.getHandlers() != null)
-      {
-         handlers.addAll(dde.getHandlers());
-      }
-      if (dde.getPostHandlers() != null)
-      {
-         handlers.addAll(dde.getPostHandlers());
-      }
-      if (!handlers.isEmpty())
-      {
          List<Handler> handlerInstances = new LinkedList<Handler>();
          for (String handler : handlers)
          {
@@ -173,7 +162,7 @@
    {
       try
       {
-         Class<?> clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
+         Class<?> clazz = SecurityActions.getContextClassLoader().loadClass(className);
          return clazz.newInstance();
       }
       catch (Exception e)
@@ -184,12 +173,13 @@
 
    @Override
    public Configurer createServerConfigurer(BindingCustomization customization, WSDLFilePublisher wsdlPublisher,
-         List<Endpoint> depEndpoints)
+         List<Endpoint> depEndpoints, UnifiedVirtualFile root)
    {
       ServerBeanCustomizer customizer = new ServerBeanCustomizer();
       customizer.setBindingCustomization(customization);
       customizer.setWsdlPublisher(wsdlPublisher);
       customizer.setDeploymentEndpoints(depEndpoints);
+      customizer.setDeploymentRoot(root);
       return new JBossWSNonSpringConfigurer(customizer);
    }
 

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java	2011-05-04 12:03:07 UTC (rev 14241)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java	2011-05-04 21:53:28 UTC (rev 14242)
@@ -1,6 +1,6 @@
 /*
  * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  *
@@ -21,10 +21,15 @@
  */
 package org.jboss.wsf.stack.cxf.configuration;
 
+import java.io.IOException;
 import java.util.List;
 
 import org.apache.cxf.frontend.ServerFactoryBean;
+import org.jboss.wsf.spi.annotation.EndpointConfig;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.metadata.config.ConfigMetaDataParser;
+import org.jboss.wsf.spi.metadata.config.ConfigRoot;
 import org.jboss.wsf.stack.cxf.AbstractInvoker;
 import org.jboss.wsf.stack.cxf.client.configuration.BeanCustomizer;
 import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
@@ -40,7 +45,9 @@
    private WSDLFilePublisher wsdlPublisher;
 
    private List<Endpoint> depEndpoints;
-
+   
+   private UnifiedVirtualFile deploymentRoot;
+   
    @SuppressWarnings("unchecked")
    @Override
    public void customize(Object beanInstance)
@@ -78,7 +85,33 @@
       {
          endpoint.setWsdlPublisher(wsdlPublisher);
       }
+      //Configure according to the specified jaxws endpoint configuration
+      if (!endpoint.isPublished()) //before publishing, we set the jaxws conf
+      {
+         Object implementor = endpoint.getImplementor();
+         EndpointConfig epConfig = implementor.getClass().getAnnotation(EndpointConfig.class);
+         if (epConfig != null)
+         {
+            String configFile = epConfig.configFile();
+            try
+            {
+               UnifiedVirtualFile vf = deploymentRoot.findChild(configFile);
+               ConfigRoot config = ConfigMetaDataParser.parse(vf.toURL());
+               endpoint.setEndpointConfig(config.getEndpointConfigByName(epConfig.configName()));
+            }
+            catch (IOException e)
+            {
+               throw new RuntimeException("Could not find " + configFile);
+            }
+            //TODO [JBWS-3286] use default endpoint configuration as a fallback
+         }
+      }
    }
+   
+   public void setDeploymentRoot(UnifiedVirtualFile deploymentRoot)
+   {
+      this.deploymentRoot = deploymentRoot;
+   }
 
    public void setWsdlPublisher(WSDLFilePublisher wsdlPublisher)
    {
@@ -89,5 +122,4 @@
    {
       this.depEndpoints = endpoints;
    }
-
 }

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java	2011-05-04 12:03:07 UTC (rev 14241)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java	2011-05-04 21:53:28 UTC (rev 14242)
@@ -38,6 +38,7 @@
 import org.jboss.logging.Logger;
 import org.jboss.wsf.spi.binding.BindingCustomization;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
 import org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringBusFactory;
 import org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringConfigurer;
 import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
@@ -59,7 +60,7 @@
    private static final Logger log = Logger.getLogger(BusHolder.class);
 
    private boolean configured = false;
-
+   
    protected BusApplicationContext ctx;
 
    protected List<GenericApplicationContext> additionalCtx = new LinkedList<GenericApplicationContext>();
@@ -150,13 +151,14 @@
 
    @Override
    public Configurer createServerConfigurer(BindingCustomization customization, WSDLFilePublisher wsdlPublisher,
-         List<Endpoint> depEndpoints)
+         List<Endpoint> depEndpoints, UnifiedVirtualFile root)
    {
       ApplicationContext ctx = bus.getExtension(BusApplicationContext.class);
       ServerBeanCustomizer customizer = new ServerBeanCustomizer();
       customizer.setBindingCustomization(customization);
       customizer.setWsdlPublisher(wsdlPublisher);
       customizer.setDeploymentEndpoints(depEndpoints);
+      customizer.setDeploymentRoot(root);
       Configurer orig = bus.getExtension(Configurer.class);
       JBossWSSpringConfigurer serverConfigurer = (orig instanceof JBossWSSpringConfigurer) ? (JBossWSSpringConfigurer)orig : new JBossWSSpringConfigurer(orig);
       serverConfigurer.setApplicationContext(ctx);

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java	2011-05-04 12:03:07 UTC (rev 14241)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java	2011-05-04 21:53:28 UTC (rev 14242)
@@ -1,6 +1,6 @@
 /*
  * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  *
@@ -22,8 +22,13 @@
 package org.jboss.wsf.stack.cxf.deployment;
 
 import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.handler.Handler;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -32,6 +37,9 @@
 import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
 import org.apache.cxf.service.Service;
 import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.metadata.config.CommonConfig;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
 
 /**
  * An extension of @see org.apache.cxf.jaxws.EndpointImpl for dealing with
@@ -44,6 +52,7 @@
 public class EndpointImpl extends org.apache.cxf.jaxws22.EndpointImpl
 {
    private WSDLFilePublisher wsdlPublisher;
+   private CommonConfig config;
 
    public EndpointImpl(Object implementor)
    {
@@ -62,11 +71,143 @@
       super.doPublish(addr);
       //allow for configuration so that the wsdlPublisher can be set be the JBossWSCXFConfigurer
       configureObject(this);
+      sortConfigHandlers();
       //publish the wsdl to data/wsdl
       publishContractToFilesystem();
    }
 
    /**
+    * Sets the JAXWS endpoint config for the current endpoint. This is called by configurer when
+    * org.apache.cxf.jaxws.EndpointImpl#getServer(..) executes 'configureObject(this)'
+    * 
+    */
+   public void setEndpointConfig(CommonConfig config)
+   {
+      if (this.config == null)
+      {
+         this.config = config;
+         //setup using provided configuration
+         Map<String, String> epConfProps = config.getProperties();
+         if (!epConfProps.isEmpty())
+         {
+            if (getProperties() == null)
+            {
+               Map<String, Object> props = new HashMap<String, Object>();
+               props.putAll(epConfProps);
+               setProperties(props);
+            }
+            else
+            {
+               getProperties().putAll(epConfProps);
+            }
+         }
+         @SuppressWarnings("rawtypes")
+         List<Handler> handlers = convertToHandlers(config.getPreHandlerChains());
+         handlers.addAll(convertToHandlers(config.getPostHandlerChains()));
+         if (!handlers.isEmpty())
+         {
+            if (getHandlers() != null)
+            {
+               handlers.addAll(getHandlers());
+            }
+            setHandlers(handlers);
+         }
+      }
+   }
+   
+   @SuppressWarnings("rawtypes")
+   protected List<Handler> convertToHandlers(List<UnifiedHandlerChainMetaData> handlerChains)
+   {
+      List<Handler> handlers = new LinkedList<Handler>();
+      if (handlerChains != null && !handlerChains.isEmpty())
+      {
+         for (UnifiedHandlerChainMetaData handlerChain : handlerChains)
+         {
+            if (handlerChain.getPortNamePattern() != null || handlerChain.getProtocolBindings() != null
+                  || handlerChain.getServiceNamePattern() != null)
+            {
+               Logger.getLogger(this.getClass()).warn("PortNamePattern, ServiceNamePattern and ProtocolBindings filters not supported; adding handlers anyway.");
+            }
+            for (UnifiedHandlerMetaData uhmd : handlerChain.getHandlers())
+            {
+               if (uhmd.getInitParams() != null && !uhmd.getInitParams().isEmpty())
+               {
+                  Logger.getLogger(this.getClass()).warn("Init params not supported.");
+               }
+               Object h = newInstance(uhmd.getHandlerClass());
+               if (h instanceof Handler)
+               {
+                  handlers.add((Handler)h);
+               }
+               else
+               {
+                  throw new RuntimeException(h + " is not a JAX-WS Handler instance!");
+               }
+            }
+         }
+      }
+      return handlers;
+   }
+   
+   private static Object newInstance(String className)
+   {
+      try
+      {
+         Class<?> clazz = SecurityActions.getContextClassLoader().loadClass(className);
+         return clazz.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+   
+   /**
+    * JBWS-3282: sort handlers -> [PRE][ENDPOINT][POST]
+    * This is required after endpoint.doPublish() as that processes @HandlerChain
+    * and adds endpoint handlers after those specified before publishing
+    * (including post ones, if any).
+    */
+   @SuppressWarnings("rawtypes")
+   protected void sortConfigHandlers()
+   {
+      if (config != null)
+      {
+         //we need to move POST handlers to the end of the list
+         if (config.getPostHandlerChains() != null)
+         {
+            List<String> postHandlerNames = new LinkedList<String>();
+            for (UnifiedHandlerChainMetaData uhcm : config.getPostHandlerChains())
+            {
+               for (UnifiedHandlerMetaData uhm : uhcm.getHandlers())
+               {
+                  postHandlerNames.add(uhm.getHandlerClass());
+               }
+            }
+            if (!postHandlerNames.isEmpty())
+            {
+               List<Handler> newHandlers = new LinkedList<Handler>();
+               List<Handler> postHandlers = new LinkedList<Handler>();
+               List<Handler> handlers = getBinding().getHandlerChain();
+               for (Handler h : handlers)
+               {
+                  if (postHandlerNames.contains(h.getClass().getName()))
+                  {
+                     postHandlers.add(h);
+                  }
+                  else
+                  {
+                     newHandlers.add(h);
+                  }
+               }
+               newHandlers.addAll(postHandlers);
+               getBinding().setHandlerChain(newHandlers);
+            }
+         }
+      }
+   }
+
+   /**
     * Publish the contract to a file using the configured wsdl publisher
     * 
     * @param endpoint
@@ -102,7 +243,7 @@
          configurer.configureBean(instance);
       }
    }
-   
+
    @Override
    public String getBeanName()
    {

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java	2011-05-04 12:03:07 UTC (rev 14241)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java	2011-05-04 21:53:28 UTC (rev 14242)
@@ -1,6 +1,6 @@
 /*
  * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  *
@@ -91,7 +91,7 @@
             {
                holder = new SpringBusHolder(cxfServletURL, deploymentResolver.resolve(jbosswsCxfXml));
                Configurer configurer = holder.createServerConfigurer(dep.getAttachment(BindingCustomization.class),
-                     new WSDLFilePublisher(aDep), dep.getService().getEndpoints());
+                     new WSDLFilePublisher(aDep), dep.getService().getEndpoints(), aDep.getRootFile());
                holder.configure(new SoapTransportFactoryExt(), resolver, configurer);
             }
             catch (Exception e)
@@ -105,7 +105,7 @@
             DDBeans metadata = dep.getAttachment(DDBeans.class);
             holder = new NonSpringBusHolder(metadata);
             Configurer configurer = holder.createServerConfigurer(dep.getAttachment(BindingCustomization.class),
-                  new WSDLFilePublisher(aDep), dep.getService().getEndpoints());
+                  new WSDLFilePublisher(aDep), dep.getService().getEndpoints(), aDep.getRootFile());
             holder.configure(new SoapTransportFactoryExt(), resolver, configurer);
          }
          dep.addAttachment(BusHolder.class, holder);

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java	2011-05-04 12:03:07 UTC (rev 14241)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java	2011-05-04 21:53:28 UTC (rev 14242)
@@ -21,7 +21,6 @@
  */
 package org.jboss.wsf.stack.cxf.metadata;
 
-import java.io.IOException;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Stack;
@@ -36,14 +35,10 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.wsf.common.JavaUtils;
-import org.jboss.wsf.spi.annotation.EndpointConfig;
 import org.jboss.wsf.spi.deployment.ArchiveDeployment;
 import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
 import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
 import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.metadata.config.ConfigMetaDataParser;
-import org.jboss.wsf.spi.metadata.config.ConfigRoot;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
@@ -240,8 +235,6 @@
       if (portName.length() == 0)
          portName = name + "Port";
       
-      EndpointConfig epConfig = sepClass.getAnnotation(EndpointConfig.class);
-
       if (anWebService != null && anWebService.endpointInterface().length() > 0)
       {
          seiName = anWebService.endpointInterface();
@@ -265,10 +258,6 @@
          if (seiAnnotation.portName().length() > 0 || seiAnnotation.serviceName().length() > 0 || seiAnnotation.endpointInterface().length() > 0)
             throw new RuntimeException("@WebService cannot have attribute 'portName', 'serviceName', 'endpointInterface' on: " + seiName);
 
-         if (epConfig == null)
-         {
-            epConfig = seiClass.getAnnotation(EndpointConfig.class);
-         }
       }
       
       DDEndpoint result = new DDEndpoint();
@@ -280,44 +269,11 @@
       result.setEpClass(seiClass != null ? seiClass : sepClass);
       result.setPortName(new QName(serviceNS, portName));
       result.setServiceName(new QName(serviceNS, serviceName));
-      if (epConfig != null)
-      {
-         configureEndpoint(dep, result, epConfig.configFile(), epConfig.configName());
-      }
 
       return result;
    }
    
    /**
-    * Configures the endpoint definition according to the specified jaxws configuration
-    * (provided through @EndpointConfig annotation). The specified config file is looked
-    * for in the deployment. If it's not found, the specified config is searched in the
-    * global server endpoint configurations.
-    * 
-    * @param ep
-    * @param configFile
-    * @param configName
-    */
-   private void configureEndpoint(ArchiveDeployment dep, DDEndpoint ep, String configFile, String configName)
-   {
-      UnifiedVirtualFile vf = null;
-      try
-      {
-         vf = dep.getRootFile().findChild(configFile);
-         ConfigRoot config = ConfigMetaDataParser.parse(vf.toURL());
-         org.jboss.wsf.spi.metadata.config.EndpointConfig epConfig = config.getEndpointConfigByName(configName);
-         ep.setPreHandlers(convertEndpointHandlers(epConfig.getPreHandlerChains()));
-         ep.setPostHandlers(convertEndpointHandlers(epConfig.getPostHandlerChains()));
-         ep.setProperties(epConfig.getProperties());
-      }
-      catch (IOException e)
-      {
-         throw new RuntimeException("Could not find " + configFile);
-      }
-      //TODO [JBWS-3286] use default endpoint configuration as a fallback
-   }
-   
-   /**
     * Extracts the typeNS given the package name
     * Algorithm is based on the one specified in JAXWS v2.0 spec
     */

Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java	2011-05-04 12:03:07 UTC (rev 14241)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java	2011-05-04 21:53:28 UTC (rev 14242)
@@ -66,10 +66,6 @@
    
    private List<String> handlers;
    
-   private List<String> preHandlers;
-   
-   private List<String> postHandlers;
-   
    private Map<String, String> properties;
    
    //additional fields
@@ -157,16 +153,6 @@
       return handlers;
    }
 
-   public List<String> getPreHandlers()
-   {
-      return preHandlers;
-   }
-
-   public List<String> getPostHandlers()
-   {
-      return postHandlers;
-   }
-
    public boolean isMtomEnabled()
    {
       return mtomEnabled;
@@ -182,16 +168,6 @@
       this.handlers = handlers;
    }
 
-   public void setPreHandlers(List<String> preHandlers)
-   {
-      this.preHandlers = preHandlers;
-   }
-
-   public void setPostHandlers(List<String> postHandlers)
-   {
-      this.postHandlers = postHandlers;
-   }
-
    public void setMtomEnabled(boolean mtomEnabled)
    {
       this.mtomEnabled = mtomEnabled;
@@ -308,27 +284,10 @@
       if (this.handlers != null && !this.handlers.isEmpty())
       {
          writer.write("<jaxws:handlers>");
-         if (this.preHandlers != null)
+         for (String handler : this.handlers)
          {
-            for (String handler : this.preHandlers)
-            {
-               writer.write("<bean class='" + handler + "'/>");
-            }
+            writer.write("<bean class='" + handler + "'/>");
          }
-         if (this.handlers != null)
-         {
-            for (String handler : this.handlers)
-            {
-               writer.write("<bean class='" + handler + "'/>");
-            }
-         }
-         if (this.postHandlers != null)
-         {
-            for (String handler : this.postHandlers)
-            {
-               writer.write("<bean class='" + handler + "'/>");
-            }
-         }
          writer.write("</jaxws:handlers>");
       }
       



More information about the jbossws-commits mailing list