Author: asoldano
Date: 2015-03-03 06:21:37 -0500 (Tue, 03 Mar 2015)
New Revision: 19509
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFInstanceProvider.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SecurityActions.java
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/aspect/BusDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2634/JBWS2634TestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java
Log:
[JBWS-3846] Get endpoint configuration from container when available; update
CXFInstanceProvider to build component instances for configuration endpoints too; cleanup
ServerBeancustomizer
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -35,7 +35,6 @@
import org.jboss.logging.MessageBundle;
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
/**
* JBossWS-CXF exception messages
@@ -207,9 +206,6 @@
@Message(id = 24088, value = "Cannot load additional config from null
location")
IllegalArgumentException unableToLoadAdditionalConfigFromNull();
- @Message(id = 24090, value = "Could not read from config file: %s")
- RuntimeException couldNotReadConfigFile(String file);
-
@Message(id = 24093, value = "Error parsing policy attachment: %s")
RuntimeException errorParsingPolicyAttachment(String uri, @Cause Throwable cause);
@@ -219,9 +215,6 @@
@Message(id = 24096, value = "Multiple incompatible JAXWS client Bus features
provided")
IllegalArgumentException incompatibleJAXWSClientBusFeatureProvided();
- @Message(id = 24101, value = "Could not find endpoint config name: %s")
- WSFDeploymentException couldNotFindEndpointConfigName(String name);
-
@Message(id = 24104, value = "Service class %s is missing required JAX-WS 2.2
additional constructors")
WSFException missingJAXWS22ServiceConstructor(String className, @Cause Throwable
cause);
}
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFInstanceProvider.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFInstanceProvider.java 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFInstanceProvider.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2015, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -30,6 +30,7 @@
import org.apache.cxf.frontend.ServerFactoryBean;
import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
+import org.jboss.ws.common.configuration.ConfigDelegateHandler;
import org.jboss.ws.common.deployment.ReferenceFactory;
import org.jboss.wsf.spi.deployment.InstanceProvider;
import org.jboss.wsf.spi.deployment.Reference;
@@ -38,6 +39,7 @@
* CXF instance provider.
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:alessio.soldano@jboss.com">Alessio
Soldano</a>
*/
public final class CXFInstanceProvider implements InstanceProvider {
@@ -58,14 +60,21 @@
}
if (instance == null)
{
- List<Handler> chain = ((JaxWsEndpointImpl)
factory.getServer().getEndpoint()).getJaxwsBinding().getHandlerChain();
- if (chain != null) {
- for (Handler handler : chain) {
- if (className.equals(handler.getClass().getName())) {
- cache.put(className, instance =
ReferenceFactory.newUninitializedReference(handler));
- }
- }
- }
+ List<Handler> chain = ((JaxWsEndpointImpl)
factory.getServer().getEndpoint()).getJaxwsBinding().getHandlerChain();
+ if (chain != null)
+ {
+ for (Handler handler : chain)
+ {
+ if (handler instanceof ConfigDelegateHandler)
+ {
+ handler = ((ConfigDelegateHandler)handler).getDelegate();
+ }
+ if (className.equals(handler.getClass().getName()))
+ {
+ cache.put(className, instance =
ReferenceFactory.newUninitializedReference(handler));
+ }
+ }
+ }
}
}
if (instance == null)
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SecurityActions.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SecurityActions.java 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SecurityActions.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -78,5 +78,4 @@
});
}
}
-
}
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 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -23,7 +23,6 @@
import java.util.Collections;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -59,16 +58,14 @@
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.AnnotationsInfo;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
import org.jboss.wsf.stack.cxf.Loggers;
import org.jboss.wsf.stack.cxf.addressRewrite.SoapAddressRewriteHelper;
import org.jboss.wsf.stack.cxf.client.Constants;
-import org.jboss.wsf.stack.cxf.client.configuration.CXFClientConfigurer;
import org.jboss.wsf.stack.cxf.client.configuration.InterceptorUtils;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
import org.jboss.wsf.stack.cxf.extensions.policy.PolicySetsAnnotationListener;
@@ -195,13 +192,11 @@
*
* @param customization The binding customization to set in the configurer, if any
* @param wsdlPublisher The wsdl file publisher to set in the configurer, if any
- * @param depEndpoints The list of deployment endpoints
- * @param epConfigName The endpoint configuration name, if any
- * @param epConfigFile The endpoint configuration file, if any
+ * @param dep The deployment
* @return The new jbossws cxf configurer
*/
public abstract Configurer createServerConfigurer(BindingCustomization customization,
- WSDLFilePublisher wsdlPublisher, List<Endpoint> depEndpoints,
UnifiedVirtualFile root, String epConfigName, String epConfigFile);
+ WSDLFilePublisher wsdlPublisher, ArchiveDeployment dep);
protected void setInterceptors(Bus bus, Deployment dep, Map<String, String>
props)
{
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 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -37,9 +37,8 @@
import org.apache.cxf.ws.addressing.WSAddressingFeature;
import org.apache.cxf.ws.rm.RMManager;
import org.jboss.ws.api.binding.BindingCustomization;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.config.SOAPAddressRewriteMetadata;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.stack.cxf.Messages;
@@ -179,16 +178,12 @@
}
@Override
- public Configurer createServerConfigurer(BindingCustomization customization,
WSDLFilePublisher wsdlPublisher,
- List<Endpoint> depEndpoints, UnifiedVirtualFile root, String epConfigName,
String epConfigFile)
+ public Configurer createServerConfigurer(BindingCustomization customization,
WSDLFilePublisher wsdlPublisher, ArchiveDeployment dep)
{
ServerBeanCustomizer customizer = new ServerBeanCustomizer();
customizer.setBindingCustomization(customization);
customizer.setWsdlPublisher(wsdlPublisher);
- customizer.setDeploymentEndpoints(depEndpoints);
- customizer.setDeploymentRoot(root);
- customizer.setEpConfigFile(epConfigFile);
- customizer.setEpConfigName(epConfigName);
+ customizer.setDeployment(dep);
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 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2014, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2015, 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,28 +21,20 @@
*/
package org.jboss.wsf.stack.cxf.configuration;
-import java.io.IOException;
-import java.net.URL;
-import java.security.AccessController;
import java.util.List;
import java.util.Locale;
import org.apache.cxf.frontend.ServerFactoryBean;
import org.apache.cxf.transport.http.DestinationRegistry;
import org.apache.cxf.transport.http.HTTPTransportFactory;
-import org.jboss.ws.api.annotation.EndpointConfig;
import org.jboss.ws.api.util.ServiceLoader;
-import org.jboss.ws.common.management.AbstractServerConfig;
+import org.jboss.ws.common.configuration.BasicConfigResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.metadata.config.ConfigMetaDataParser;
-import org.jboss.wsf.spi.metadata.config.ConfigRoot;
import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
import org.jboss.wsf.stack.cxf.JBossWSInvoker;
import org.jboss.wsf.stack.cxf.Loggers;
-import org.jboss.wsf.stack.cxf.Messages;
import org.jboss.wsf.stack.cxf.client.configuration.BeanCustomizer;
import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
@@ -58,14 +50,8 @@
{
private WSDLFilePublisher wsdlPublisher;
- private List<Endpoint> depEndpoints;
+ private ArchiveDeployment dep;
- private UnifiedVirtualFile deploymentRoot;
-
- private String epConfigName;
-
- private String epConfigFile;
-
@Override
public void customize(Object beanInstance)
{
@@ -81,6 +67,7 @@
{
((JBossWSInvoker)
factory.getInvoker()).setTargetBean(factory.getServiceBean());
}
+ List<Endpoint> depEndpoints = dep.getService().getEndpoints();
if (depEndpoints != null)
{
final String targetBeanName = factory.getServiceBean().getClass().getName();
@@ -113,7 +100,7 @@
//Configure according to the specified jaxws endpoint configuration
if (!endpoint.isPublished()) //before publishing, we set the jaxws conf
{
- Object implementor = endpoint.getImplementor();
+ final Object implementor = endpoint.getImplementor();
// setup our invoker for http endpoints if invoker is not configured in
jbossws-cxf.xml DD
boolean isHttpEndpoint = endpoint.getAddress() != null &&
endpoint.getAddress().substring(0,
5).toLowerCase(Locale.ENGLISH).startsWith("http");
@@ -121,97 +108,27 @@
{
endpoint.setInvoker(new JBossWSInvoker());
}
-
+
// ** Endpoint configuration setup **
- // 1) default values
- //String configName =
org.jboss.wsf.spi.metadata.config.EndpointConfig.STANDARD_ENDPOINT_CONFIG;
- String configName = implementor.getClass().getName();
- String configFile =
org.jboss.wsf.spi.metadata.config.EndpointConfig.DEFAULT_ENDPOINT_CONFIG_FILE;
- boolean specifiedConfig = false;
- // 2) annotation contribution
- EndpointConfig epConfigAnn =
implementor.getClass().getAnnotation(EndpointConfig.class);
- if (epConfigAnn != null)
- {
- if (!epConfigAnn.configName().isEmpty())
- {
- configName = epConfigAnn.configName();
- }
- if (!epConfigAnn.configFile().isEmpty())
- {
- configFile = epConfigAnn.configFile();
- }
- specifiedConfig = true;
- }
- // 3) descriptor overrides (jboss-webservices.xml or web.xml)
- if (epConfigName != null && !epConfigName.isEmpty())
- {
- configName = epConfigName;
- specifiedConfig = true;
- }
- if (epConfigFile != null && !epConfigFile.isEmpty())
- {
- configFile = epConfigFile;
- }
- // 4) setup of configuration
- if (configFile !=
org.jboss.wsf.spi.metadata.config.EndpointConfig.DEFAULT_ENDPOINT_CONFIG_FILE) {
- //look for provided endpoint config file
- try
- {
- UnifiedVirtualFile vf = deploymentRoot.findChild(configFile);
- ConfigRoot configRoot = ConfigMetaDataParser.parse(vf.toURL());
- org.jboss.wsf.spi.metadata.config.EndpointConfig config =
configRoot.getEndpointConfigByName(configName);
- if (config == null && !specifiedConfig) {
- config =
configRoot.getEndpointConfigByName(org.jboss.wsf.spi.metadata.config.EndpointConfig.STANDARD_ENDPOINT_CONFIG);
+ final String endpointClassName = implementor.getClass().getName();
+ final List<Endpoint> depEndpoints = dep.getService().getEndpoints();
+ for (Endpoint depEndpoint : depEndpoints) {
+ if (endpointClassName.equals(depEndpoint.getTargetBeanName())) {
+ org.jboss.wsf.spi.metadata.config.EndpointConfig config =
depEndpoint.getEndpointConfig();
+ if (config == null) {
+ //the ASIL did not set the endpoint configuration, perhaps because
we're processing an
+ //Endpoint.publish() API started endpoint or because we're on
WildFly 8.0.0.Final or
+ //previous version. We compute the config here then (clearly no
container injection
+ //will be performed on optional handlers attached to the config)
+ BasicConfigResolver bcr = new BasicConfigResolver(dep,
implementor.getClass());
+ config = bcr.resolveEndpointConfig();
+ depEndpoint.setEndpointConfig(config);
}
if (config != null) {
endpoint.setEndpointConfig(config);
}
}
- catch (IOException e)
- {
- throw Messages.MESSAGES.couldNotReadConfigFile(configFile);
- }
}
- else
- {
- org.jboss.wsf.spi.metadata.config.EndpointConfig config = null;
- URL url = implementor.getClass().getResource("/" + configFile);
- if (url == null) {
- UnifiedVirtualFile vf = deploymentRoot.findChildFailSafe(configFile);
- if (vf != null) {
- url = vf.toURL();
- }
- }
- if (url != null) {
- //the default file exists
- try
- {
- ConfigRoot configRoot = ConfigMetaDataParser.parse(url);
- config = configRoot.getEndpointConfigByName(configName);
- if (config == null && !specifiedConfig) {
- config =
configRoot.getEndpointConfigByName(org.jboss.wsf.spi.metadata.config.EndpointConfig.STANDARD_ENDPOINT_CONFIG);
- }
- }
- catch (IOException e)
- {
- throw Messages.MESSAGES.couldNotReadConfigFile(configFile);
- }
- }
- if (config == null) {
- //use endpoint configs from AS domain
- ServerConfig sc = getServerConfig();
- config = sc.getEndpointConfig(configName);
- if (config == null && !specifiedConfig) {
- config =
sc.getEndpointConfig(org.jboss.wsf.spi.metadata.config.EndpointConfig.STANDARD_ENDPOINT_CONFIG);
- }
- if (config == null && specifiedConfig) {
- throw Messages.MESSAGES.couldNotFindEndpointConfigName(configName);
- }
- }
- if (config != null) {
- endpoint.setEndpointConfig(config);
- }
- }
//JASPI
final JASPIAuthenticationProvider jaspiProvider = (JASPIAuthenticationProvider)
ServiceLoader.loadService(
@@ -230,38 +147,13 @@
}
}
- private static ServerConfig getServerConfig() {
- if(System.getSecurityManager() == null) {
- return AbstractServerConfig.getServerIntegrationServerConfig();
- }
- return
AccessController.doPrivileged(AbstractServerConfig.GET_SERVER_INTEGRATION_SERVER_CONFIG);
- }
-
- public void setDeploymentRoot(UnifiedVirtualFile deploymentRoot)
- {
- this.deploymentRoot = deploymentRoot;
- }
-
public void setWsdlPublisher(WSDLFilePublisher wsdlPublisher)
{
this.wsdlPublisher = wsdlPublisher;
}
- public void setDeploymentEndpoints(List<Endpoint> endpoints)
+ public void setDeployment(ArchiveDeployment dep)
{
- this.depEndpoints = endpoints;
+ this.dep = dep;
}
-
- public void setEpConfigName(String epConfigName)
- {
- this.epConfigName = epConfigName;
- }
-
- public void setEpConfigFile(String epConfigFile)
- {
- this.epConfigFile = epConfigFile;
- }
-
-
-
}
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 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SpringBusHolder.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -39,9 +39,9 @@
import org.apache.cxf.transport.http.HttpDestinationFactory;
import org.apache.cxf.transport.servlet.ServletDestinationFactory;
import org.jboss.ws.api.binding.BindingCustomization;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringBusFactory;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringConfigurer;
@@ -166,21 +166,22 @@
}
}
bus.setProperty(Deployment.class.getName(), null);
+
+ for (Endpoint endpoint : dep.getService().getEndpoints())
+ {
+ endpoint.setProperty("SpringBus", true);
+ }
configured = true;
}
@Override
- public Configurer createServerConfigurer(BindingCustomization customization,
WSDLFilePublisher wsdlPublisher,
- List<Endpoint> depEndpoints, UnifiedVirtualFile root, String epConfigName,
String epConfigFile)
+ public Configurer createServerConfigurer(BindingCustomization customization,
WSDLFilePublisher wsdlPublisher, ArchiveDeployment dep)
{
ApplicationContext ctx = bus.getExtension(BusApplicationContext.class);
ServerBeanCustomizer customizer = new ServerBeanCustomizer();
customizer.setBindingCustomization(customization);
customizer.setWsdlPublisher(wsdlPublisher);
- customizer.setDeploymentEndpoints(depEndpoints);
- customizer.setDeploymentRoot(root);
- customizer.setEpConfigFile(epConfigFile);
- customizer.setEpConfigName(epConfigName);
+ customizer.setDeployment(dep);
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/aspect/BusDeploymentAspect.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -35,9 +35,7 @@
import org.jboss.ws.common.utils.DelegateClassLoader;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.ResourceResolver;
-import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
import org.jboss.wsf.stack.cxf.configuration.BusHolder;
@@ -118,30 +116,9 @@
holder = new NonSpringBusHolder(metadata);
}
- String epConfigName = null;
- String epConfigFile = null;
- JSEArchiveMetaData jsemd = dep.getAttachment(JSEArchiveMetaData.class);
- JBossWebservicesMetaData wsmd =
dep.getAttachment(JBossWebservicesMetaData.class);
- //first check JSEArchiveMetaData as that has the actual merged value for POJO
deployments
- if (jsemd != null) {
- epConfigName = jsemd.getConfigName();
- epConfigFile = jsemd.getConfigFile();
- } else if (wsmd != null) {
- epConfigName = wsmd.getConfigName();
- epConfigFile = wsmd.getConfigFile();
- }
-
- Configurer configurer =
holder.createServerConfigurer(dep.getAttachment(BindingCustomization.class),
- new WSDLFilePublisher(aDep), dep.getService().getEndpoints(),
aDep.getRootFile(), epConfigName, epConfigFile);
- holder.configure(resolver, configurer, wsmd, dep);
+ Configurer configurer =
holder.createServerConfigurer(dep.getAttachment(BindingCustomization.class), new
WSDLFilePublisher(aDep), aDep);
+ holder.configure(resolver, configurer,
dep.getAttachment(JBossWebservicesMetaData.class), dep);
dep.addAttachment(BusHolder.class, holder);
- if (holder instanceof SpringBusHolder)
- {
- for (Endpoint endpoint : dep.getService().getEndpoints())
- {
- endpoint.setProperty("SpringBus", true);
- }
- }
}
finally
{
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -37,6 +37,7 @@
import org.apache.cxf.frontend.ServerFactoryBean;
import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.ws.common.configuration.ConfigDelegateHandler;
import org.jboss.ws.common.injection.InjectionHelper;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
@@ -100,6 +101,10 @@
{
for (Handler<?> handler : chain)
{
+ if (handler instanceof ConfigDelegateHandler)
+ {
+ handler = ((ConfigDelegateHandler<?>) handler).getDelegate();
+ }
final Reference handlerReference =
endpoint.getInstanceProvider().getInstance(handler.getClass().getName());
if (!handlerReference.isInitialized()) {
final Object handlerInstance = handlerReference.getValue();
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2634/JBWS2634TestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2634/JBWS2634TestCase.java 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2634/JBWS2634TestCase.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -115,9 +115,12 @@
@Test
@RunAsClient
- @Ignore(value = "[JBWS-3846] Refactor creation process of jaxws handlers from
predefined configurations")
public void testPojoEndpoint2Injection() throws Exception
{
+ if (JBossWSTestHelper.isTargetWildFly80()) {
+ System.out.println("FIXME: [JBWS-3846] Refactor creation process of jaxws
handlers from predefined configurations");
+ return;
+ }
QName serviceName = new
QName("http://jbossws.org/JBWS2634",
"POJOService2");
URL wsdlURL = new URL(baseURL + "/POJOService2?wsdl");
@@ -128,9 +131,12 @@
@Test
@RunAsClient
- @Ignore(value = "[JBWS-3846] Refactor creation process of jaxws handlers from
predefined configurations")
public void testPojoEndpoint3Injection() throws Exception
{
+ if (JBossWSTestHelper.isTargetWildFly80()) {
+ System.out.println("FIXME: [JBWS-3846] Refactor creation process of jaxws
handlers from predefined configurations");
+ return;
+ }
QName serviceName = new
QName("http://jbossws.org/JBWS2634",
"POJOService3");
URL wsdlURL = new URL(baseURL + "/POJOService3?wsdl");
@@ -153,9 +159,12 @@
@Test
@RunAsClient
- @Ignore(value = "[JBWS-3846] Refactor creation process of jaxws handlers from
predefined configurations")
public void testEjb3Endpoint2Injection() throws Exception
{
+ if (JBossWSTestHelper.isTargetWildFly80()) {
+ System.out.println("FIXME: [JBWS-3846] Refactor creation process of jaxws
handlers from predefined configurations");
+ return;
+ }
QName serviceName = new
QName("http://jbossws.org/JBWS2634",
"EJB3Service2");
URL wsdlURL = new URL("http://" + baseURL.getHost() + ":" +
baseURL.getPort() + "/jaxws-jbws2634-ejb3/EJB3Service2?wsdl");
@@ -164,11 +173,15 @@
assertEquals("Hello
World!:Inbound:TestHandler:EJB3Bean2:Outbound:TestHandler", proxy.echo("Hello
World!"));
}
+
@Test
@RunAsClient
- @Ignore(value = "[JBWS-3846] Refactor creation process of jaxws handlers from
predefined configurations")
public void testEjb3Endpoint3Injection() throws Exception
{
+ if (JBossWSTestHelper.isTargetWildFly80()) {
+ System.out.println("FIXME: [JBWS-3846] Refactor creation process of jaxws
handlers from predefined configurations");
+ return;
+ }
QName serviceName = new
QName("http://jbossws.org/JBWS2634",
"EJB3Service3");
URL wsdlURL = new URL("http://" + baseURL.getHost() + ":" +
baseURL.getPort() + "/jaxws-jbws2634-ejb3/EJB3Service3?wsdl");
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java 2015-03-03
11:16:12 UTC (rev 19508)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java 2015-03-03
11:21:37 UTC (rev 19509)
@@ -69,7 +69,7 @@
public static JavaArchive createDeployment() {
JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"management-recording-as7.jar");
archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.logging\n"))
+ + "Dependencies: org.jboss.logging,org.jboss.ws.common\n")) //TODO!!
temp fix
.addClass(org.jboss.test.ws.management.recording.Endpoint.class)
.addClass(org.jboss.test.ws.management.recording.EndpointWithConfigImpl.class);
return archive;