JBossWS SVN: r19096 - in container/wildfly81/branches/jbossws-wildfly810/server-integration/src: main/java/org/jboss/as/webservices/dmr and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 09:15:57 -0500 (Tue, 11 Nov 2014)
New Revision: 19096
Added:
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml
Modified:
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java
Log:
Backporting WFLY 9 additional test at https://github.com/asoldano/wildfly/commit/2141438ab18ceffc2f00f339114036... (modified for running with webservices 1.2 subsystem version as the ASIL does not upgrade the subsystem schema on purpose)
Modified: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java 2014-11-11 14:12:59 UTC (rev 19095)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java 2014-11-11 14:15:57 UTC (rev 19096)
@@ -303,4 +303,8 @@
@LogMessage(level = WARN)
@Message(id = 15617, value = "Annotation '@%s' found on class '%s'. Perhaps you forgot to add a '%s' module dependency to your deployment?")
void missingModuleDependency(String annotation, String clazz, String module);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 15618, value = "Could not activate the webservices subsystem.")
+ void couldNotActivateSubsystem(@Cause Throwable cause);
}
Modified: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java 2014-11-11 14:12:59 UTC (rev 19095)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java 2014-11-11 14:15:57 UTC (rev 19096)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2014, 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.
*
@@ -44,6 +44,7 @@
import org.jboss.as.webservices.deployers.WebservicesDescriptorDeploymentProcessor;
import org.jboss.as.webservices.deployers.deployment.DeploymentAspectsProvider;
import org.jboss.as.webservices.injection.WSHandlerChainAnnotationProcessor;
+import org.jboss.as.webservices.util.ModuleClassLoaderProvider;
import org.jboss.as.webservices.webserviceref.WSRefAnnotationProcessor;
import org.jboss.as.webservices.webserviceref.WSRefDDProcessor;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -55,6 +56,9 @@
final class WSDeploymentActivator {
static void activate(final DeploymentProcessorTarget processorTarget, final boolean appclient) {
+ if (!isModularEnvironment()) {
+ return;
+ }
processorTarget.addDeploymentProcessor(WSExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_WS_REF_DESCRIPTOR, new WSRefDDProcessor());
processorTarget.addDeploymentProcessor(WSExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_WS_REF_ANNOTATION, new WSRefAnnotationProcessor());
if (!appclient) {
@@ -85,4 +89,13 @@
}
}
+ private static boolean isModularEnvironment() {
+ try {
+ ModuleClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ return true;
+ } catch (Exception e) {
+ ROOT_LOGGER.couldNotActivateSubsystem(e);
+ return false;
+ }
+ }
}
Copied: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java (from rev 19093, container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java)
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java (rev 0)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java 2014-11-11 14:15:57 UTC (rev 19096)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.
+ *
+ * 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.as.webservices.dmr;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.as.controller.RunningMode;
+import org.jboss.as.server.Services;
+import org.jboss.as.server.moduleservice.ServiceModuleLoader;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.KernelServices;
+import org.jboss.as.subsystem.test.KernelServicesBuilder;
+import org.jboss.as.webservices.util.WSServices;
+import org.jboss.msc.service.ServiceContainer;
+import org.jboss.msc.service.ServiceController;
+import org.jboss.msc.service.ServiceName;
+import org.jboss.msc.service.ServiceTarget;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.metadata.config.ClientConfig;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * A test for checking the services that are created by the subsystem after boot.
+ *
+ * @author <a href="mailto:alessio.soldano@jboss.com>Alessio Soldano</a>
+ */
+public class WebservicesSubsystemRuntimeTestCase extends AbstractSubsystemBaseTest {
+
+ public WebservicesSubsystemRuntimeTestCase() {
+ super(WSExtension.SUBSYSTEM_NAME, new WSExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ return readResource("ws-subsystem12-rt.xml");
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization() {
+ @Override
+ protected RunningMode getRunningMode() {
+ return RunningMode.NORMAL;
+ }
+
+ @Override
+ protected void addExtraServices(ServiceTarget target) {
+ super.addExtraServices(target);
+ target.addService(Services.JBOSS_SERVICE_MODULE_LOADER, new ServiceModuleLoader(null)).install();
+ }
+ };
+ }
+
+ @Test
+ public void testSubsystem() throws Exception {
+ KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization()).setSubsystemXml(getSubsystemXml());
+ KernelServices mainServices = builder.build();
+ if (!mainServices.isSuccessfulBoot()) {
+ Assert.fail(mainServices.getBootError().toString());
+ }
+
+ //WSDL soap:address rewrite engine options test
+ ServerConfig serverConfig = getMSCService(mainServices.getContainer(), WSServices.CONFIG_SERVICE, ServerConfig.class);
+ Assert.assertTrue(serverConfig.isModifySOAPAddress());
+ Assert.assertEquals("localhost", serverConfig.getWebServiceHost());
+ Assert.assertEquals(9895, serverConfig.getWebServicePort());
+ Assert.assertEquals(9944, serverConfig.getWebServiceSecurePort());
+
+ //Client & Endpoint predefined configuration tests
+ //HACK: we need to manually reload the client/endpoint configs as the ServerConfigService is actually not starting in this test;
+ //the reason is that it requires services which are not installed here and even if those were available it would fail to start
+ //because we're not running in a modular environment and hence it won't be able to detect the proper ws stack implementation.
+ //Even if we made the subsystem work with a flat classloader (which would not make sense except for the tests here), we'd have
+ //to deal a hell of ws specific maven dependencies here... so really not worth the effort.
+ serverConfig.reloadClientConfigs();
+ ClientConfig clCfg = serverConfig.getClientConfig("My-Client-Config");
+ Assert.assertNotNull(clCfg);
+ Assert.assertEquals(1, clCfg.getProperties().size());
+ Assert.assertEquals("bar3", clCfg.getProperties().get("foo3"));
+ Assert.assertEquals(2, clCfg.getPreHandlerChains().size());
+ Map<String, UnifiedHandlerChainMetaData> map = new HashMap<String, UnifiedHandlerChainMetaData>();
+ for (UnifiedHandlerChainMetaData uhc : clCfg.getPreHandlerChains()) {
+ map.put(uhc.getId(), uhc);
+ }
+ Assert.assertTrue(map.get("my-handlers").getHandlers().isEmpty());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", map.get("my-handlers").getProtocolBindings());
+ Assert.assertEquals(1, map.get("my-handlers2").getHandlers().size());
+ Assert.assertEquals("MyHandler", map.get("my-handlers2").getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.MyHandler", map.get("my-handlers2").getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", map.get("my-handlers").getProtocolBindings());
+ Assert.assertEquals(1, clCfg.getPostHandlerChains().size());
+ Assert.assertEquals("my-handlers2", clCfg.getPostHandlerChains().get(0).getId());
+ Assert.assertEquals(1, clCfg.getPostHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("MyHandler2", clCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.MyHandler2", clCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", clCfg.getPostHandlerChains().get(0).getProtocolBindings());
+
+ serverConfig.reloadEndpointConfigs();
+ EndpointConfig epCfg = serverConfig.getEndpointConfig("Standard-Endpoint-Config");
+ Assert.assertNotNull(epCfg);
+ Assert.assertTrue(epCfg.getProperties().isEmpty());
+ Assert.assertTrue(epCfg.getPreHandlerChains().isEmpty());
+ Assert.assertTrue(epCfg.getPostHandlerChains().isEmpty());
+ epCfg = serverConfig.getEndpointConfig("Recording-Endpoint-Config");
+ Assert.assertNotNull(epCfg);
+ Assert.assertEquals(2, epCfg.getProperties().size());
+ Assert.assertEquals("bar", epCfg.getProperties().get("foo"));
+ Assert.assertEquals("bar2", epCfg.getProperties().get("foo2"));
+ Assert.assertEquals(1, epCfg.getPreHandlerChains().size());
+ Assert.assertEquals("recording-handlers", epCfg.getPreHandlerChains().get(0).getId());
+ Assert.assertEquals(2, epCfg.getPreHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("RecordingHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("AnotherRecordingHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(1).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(1).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", epCfg.getPreHandlerChains().get(0).getProtocolBindings());
+ Assert.assertEquals(1, epCfg.getPostHandlerChains().size());
+ Assert.assertEquals("recording-handlers2", epCfg.getPostHandlerChains().get(0).getId());
+ Assert.assertEquals(2, epCfg.getPostHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("RecordingHandler2", epCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("AnotherRecordingHandler2", epCfg.getPostHandlerChains().get(0).getHandlers().get(1).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPostHandlerChains().get(0).getHandlers().get(1).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", epCfg.getPostHandlerChains().get(0).getProtocolBindings());
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> T getMSCService(final ServiceContainer container, final ServiceName serviceName, final Class<T> clazz) {
+ ServiceController<T> service = (ServiceController<T>) container.getService(serviceName);
+ return service != null ? service.getValue() : null;
+ }
+}
Copied: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml (from rev 19093, container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml)
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml (rev 0)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml 2014-11-11 14:15:57 UTC (rev 19096)
@@ -0,0 +1,29 @@
+<subsystem xmlns="urn:jboss:domain:webservices:1.2">
+ <modify-wsdl-address>true</modify-wsdl-address>
+ <wsdl-host>localhost</wsdl-host>
+ <wsdl-port>9895</wsdl-port>
+ <wsdl-secure-port>9944</wsdl-secure-port>
+ <endpoint-config name="Standard-Endpoint-Config"/>
+ <endpoint-config name="Recording-Endpoint-Config">
+ <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ <handler name="AnotherRecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ </pre-handler-chain>
+ <post-handler-chain name="recording-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="RecordingHandler2" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ <handler name="AnotherRecordingHandler2" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ </post-handler-chain>
+ <property name="foo" value="bar"/>
+ <property name="foo2" value="bar2"/>
+ </endpoint-config>
+ <client-config name="My-Client-Config">
+ <pre-handler-chain name="my-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM" />
+ <pre-handler-chain name="my-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="MyHandler" class="org.jboss.ws.common.invocation.MyHandler"/>
+ </pre-handler-chain>
+ <post-handler-chain name="my-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="MyHandler2" class="org.jboss.ws.common.invocation.MyHandler2"/>
+ </post-handler-chain>
+ <property name="foo3" value="bar3"/>
+ </client-config>
+</subsystem>
10 years, 1 month
JBossWS SVN: r19095 - container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 09:12:59 -0500 (Tue, 11 Nov 2014)
New Revision: 19095
Modified:
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
Log:
[JBWS-3855] Fix regression
Modified: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2014-11-11 14:11:06 UTC (rev 19094)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2014-11-11 14:12:59 UTC (rev 19095)
@@ -36,7 +36,6 @@
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSServices;
import org.jboss.dmr.ModelNode;
-import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
@@ -81,11 +80,14 @@
final ServiceTarget target = context.getServiceTarget();
final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, clientConfigService);
for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
- clientServiceBuilder.addDependency(sn, PropertyService.class, clientConfigService.getPropertiesInjector());
+ clientServiceBuilder.addDependency(sn, PropertyService.class, clientConfigService.getPropertiesInjector()); //get a new injector instance each time
}
- setDependency(context, clientServiceBuilder, clientConfigService.getPreHandlerChainsInjector(), UnifiedHandlerChainMetaData.class, serviceName, address, Constants.PRE_HANDLER_CHAIN);
- final Injector<UnifiedHandlerChainMetaData> postInjector = clientConfigService.getPostHandlerChainsInjector();
- setDependency(context, clientServiceBuilder, postInjector, UnifiedHandlerChainMetaData.class, serviceName, address, Constants.POST_HANDLER_CHAIN);
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PRE_HANDLER_CHAIN)) {
+ clientServiceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, clientConfigService.getPreHandlerChainsInjector()); //get a new injector instance each time
+ }
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.POST_HANDLER_CHAIN)) {
+ clientServiceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, clientConfigService.getPostHandlerChainsInjector()); //get a new injector instance each time
+ }
ServiceController<?> controller = clientServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
if (newControllers != null) {
newControllers.add(controller);
@@ -94,11 +96,4 @@
context.reloadRequired();
}
}
-
- private <T> void setDependency(final OperationContext context, final ServiceBuilder<?> builder, final Injector<T> injector,
- final Class<T> injectedClass, final ServiceName serviceName, final PathAddress address, final String handlerChainType) {
- for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, handlerChainType)) {
- builder.addDependency(sn, injectedClass, injector);
- }
- }
}
Modified: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2014-11-11 14:11:06 UTC (rev 19094)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2014-11-11 14:12:59 UTC (rev 19095)
@@ -36,7 +36,6 @@
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSServices;
import org.jboss.dmr.ModelNode;
-import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
@@ -83,13 +82,17 @@
final ConfigService endpointConfigService = new ConfigService(serverConfig, name, false);
final ServiceTarget target = context.getServiceTarget();
- final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, endpointConfigService);
+ final ServiceBuilder<?> serviceBuilder = target.addService(serviceName, endpointConfigService);
for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
- clientServiceBuilder.addDependency(sn, PropertyService.class, endpointConfigService.getPropertiesInjector());
+ serviceBuilder.addDependency(sn, PropertyService.class, endpointConfigService.getPropertiesInjector()); //get a new injector instance each time
}
- setDependency(context, clientServiceBuilder, endpointConfigService.getPreHandlerChainsInjector(), serviceName, address, Constants.PRE_HANDLER_CHAIN);
- setDependency(context, clientServiceBuilder, endpointConfigService.getPostHandlerChainsInjector(), serviceName, address, Constants.POST_HANDLER_CHAIN);
- ServiceController<?> controller = clientServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PRE_HANDLER_CHAIN)) {
+ serviceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, endpointConfigService.getPreHandlerChainsInjector()); //get a new injector instance each time
+ }
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.POST_HANDLER_CHAIN)) {
+ serviceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, endpointConfigService.getPostHandlerChainsInjector()); //get a new injector instance each time
+ }
+ ServiceController<?> controller = serviceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
if (newControllers != null) {
newControllers.add(controller);
}
@@ -97,11 +100,4 @@
context.reloadRequired();
}
}
-
- private void setDependency(final OperationContext context, final ServiceBuilder<?> builder, final Injector<UnifiedHandlerChainMetaData> injector,
- final ServiceName serviceName, final PathAddress address, final String handlerChainType) {
- for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, handlerChainType)) {
- builder.addDependency(sn, UnifiedHandlerChainMetaData.class, injector);
- }
- }
}
10 years, 1 month
JBossWS SVN: r19094 - container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 09:11:06 -0500 (Tue, 11 Nov 2014)
New Revision: 19094
Modified:
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
Log:
[JBWS-3854] EndpointConfigAdd does not set required PropertyService dependencies
Modified: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2014-11-11 14:01:25 UTC (rev 19093)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2014-11-11 14:11:06 UTC (rev 19094)
@@ -80,7 +80,9 @@
final ConfigService clientConfigService = new ConfigService(serverConfig, name, true);
final ServiceTarget target = context.getServiceTarget();
final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, clientConfigService);
- setDependency(context, clientServiceBuilder, clientConfigService.getPropertiesInjector(), PropertyService.class, serviceName, address, Constants.PROPERTY);
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
+ clientServiceBuilder.addDependency(sn, PropertyService.class, clientConfigService.getPropertiesInjector());
+ }
setDependency(context, clientServiceBuilder, clientConfigService.getPreHandlerChainsInjector(), UnifiedHandlerChainMetaData.class, serviceName, address, Constants.PRE_HANDLER_CHAIN);
final Injector<UnifiedHandlerChainMetaData> postInjector = clientConfigService.getPostHandlerChainsInjector();
setDependency(context, clientServiceBuilder, postInjector, UnifiedHandlerChainMetaData.class, serviceName, address, Constants.POST_HANDLER_CHAIN);
Modified: container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
===================================================================
--- container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2014-11-11 14:01:25 UTC (rev 19093)
+++ container/wildfly81/branches/jbossws-wildfly810/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2014-11-11 14:11:06 UTC (rev 19094)
@@ -32,6 +32,7 @@
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.webservices.service.ConfigService;
+import org.jboss.as.webservices.service.PropertyService;
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSServices;
import org.jboss.dmr.ModelNode;
@@ -83,6 +84,9 @@
final ServiceTarget target = context.getServiceTarget();
final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, endpointConfigService);
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
+ clientServiceBuilder.addDependency(sn, PropertyService.class, endpointConfigService.getPropertiesInjector());
+ }
setDependency(context, clientServiceBuilder, endpointConfigService.getPreHandlerChainsInjector(), serviceName, address, Constants.PRE_HANDLER_CHAIN);
setDependency(context, clientServiceBuilder, endpointConfigService.getPostHandlerChainsInjector(), serviceName, address, Constants.POST_HANDLER_CHAIN);
ServiceController<?> controller = clientServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
10 years, 1 month
JBossWS SVN: r19093 - in container/wildfly80/branches/jbossws-wildfly800/server-integration/src: main/java/org/jboss/as/webservices/dmr and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 09:01:25 -0500 (Tue, 11 Nov 2014)
New Revision: 19093
Added:
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml
Modified:
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java
Log:
Backporting WFLY 9 additional test at https://github.com/asoldano/wildfly/commit/2141438ab18ceffc2f00f339114036... (modified for running with webservices 1.2 subsystem version as the ASIL does not upgrade the subsystem schema on purpose)
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java 2014-11-11 13:29:24 UTC (rev 19092)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/WSLogger.java 2014-11-11 14:01:25 UTC (rev 19093)
@@ -303,4 +303,8 @@
@LogMessage(level = WARN)
@Message(id = 15617, value = "Annotation '@%s' found on class '%s'. Perhaps you forgot to add a '%s' module dependency to your deployment?")
void missingModuleDependency(String annotation, String clazz, String module);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 15618, value = "Could not activate the webservices subsystem.")
+ void couldNotActivateSubsystem(@Cause Throwable cause);
}
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java 2014-11-11 13:29:24 UTC (rev 19092)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java 2014-11-11 14:01:25 UTC (rev 19093)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2014, 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.
*
@@ -43,6 +43,7 @@
import org.jboss.as.webservices.deployers.WebservicesDescriptorDeploymentProcessor;
import org.jboss.as.webservices.deployers.deployment.DeploymentAspectsProvider;
import org.jboss.as.webservices.injection.WSHandlerChainAnnotationProcessor;
+import org.jboss.as.webservices.util.ModuleClassLoaderProvider;
import org.jboss.as.webservices.webserviceref.WSRefAnnotationProcessor;
import org.jboss.as.webservices.webserviceref.WSRefDDProcessor;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -54,6 +55,9 @@
final class WSDeploymentActivator {
static void activate(final DeploymentProcessorTarget processorTarget, final boolean appclient) {
+ if (!isModularEnvironment()) {
+ return;
+ }
processorTarget.addDeploymentProcessor(WSExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_WS_REF_DESCRIPTOR, new WSRefDDProcessor());
processorTarget.addDeploymentProcessor(WSExtension.SUBSYSTEM_NAME, Phase.POST_MODULE, Phase.POST_MODULE_WS_REF_ANNOTATION, new WSRefAnnotationProcessor());
if (!appclient) {
@@ -83,4 +87,13 @@
}
}
+ private static boolean isModularEnvironment() {
+ try {
+ ModuleClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ return true;
+ } catch (Exception e) {
+ ROOT_LOGGER.couldNotActivateSubsystem(e);
+ return false;
+ }
+ }
}
Added: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java (rev 0)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java 2014-11-11 14:01:25 UTC (rev 19093)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.
+ *
+ * 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.as.webservices.dmr;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.as.controller.RunningMode;
+import org.jboss.as.server.Services;
+import org.jboss.as.server.moduleservice.ServiceModuleLoader;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.KernelServices;
+import org.jboss.as.subsystem.test.KernelServicesBuilder;
+import org.jboss.as.webservices.util.WSServices;
+import org.jboss.msc.service.ServiceContainer;
+import org.jboss.msc.service.ServiceController;
+import org.jboss.msc.service.ServiceName;
+import org.jboss.msc.service.ServiceTarget;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.metadata.config.ClientConfig;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * A test for checking the services that are created by the subsystem after boot.
+ *
+ * @author <a href="mailto:alessio.soldano@jboss.com>Alessio Soldano</a>
+ */
+public class WebservicesSubsystemRuntimeTestCase extends AbstractSubsystemBaseTest {
+
+ public WebservicesSubsystemRuntimeTestCase() {
+ super(WSExtension.SUBSYSTEM_NAME, new WSExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ return readResource("ws-subsystem12-rt.xml");
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization() {
+ @Override
+ protected RunningMode getRunningMode() {
+ return RunningMode.NORMAL;
+ }
+
+ @Override
+ protected void addExtraServices(ServiceTarget target) {
+ super.addExtraServices(target);
+ target.addService(Services.JBOSS_SERVICE_MODULE_LOADER, new ServiceModuleLoader(null)).install();
+ }
+ };
+ }
+
+ @Test
+ public void testSubsystem() throws Exception {
+ KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization()).setSubsystemXml(getSubsystemXml());
+ KernelServices mainServices = builder.build();
+ if (!mainServices.isSuccessfulBoot()) {
+ Assert.fail(mainServices.getBootError().toString());
+ }
+
+ //WSDL soap:address rewrite engine options test
+ ServerConfig serverConfig = getMSCService(mainServices.getContainer(), WSServices.CONFIG_SERVICE, ServerConfig.class);
+ Assert.assertTrue(serverConfig.isModifySOAPAddress());
+ Assert.assertEquals("localhost", serverConfig.getWebServiceHost());
+ Assert.assertEquals(9895, serverConfig.getWebServicePort());
+ Assert.assertEquals(9944, serverConfig.getWebServiceSecurePort());
+
+ //Client & Endpoint predefined configuration tests
+ //HACK: we need to manually reload the client/endpoint configs as the ServerConfigService is actually not starting in this test;
+ //the reason is that it requires services which are not installed here and even if those were available it would fail to start
+ //because we're not running in a modular environment and hence it won't be able to detect the proper ws stack implementation.
+ //Even if we made the subsystem work with a flat classloader (which would not make sense except for the tests here), we'd have
+ //to deal a hell of ws specific maven dependencies here... so really not worth the effort.
+ serverConfig.reloadClientConfigs();
+ ClientConfig clCfg = serverConfig.getClientConfig("My-Client-Config");
+ Assert.assertNotNull(clCfg);
+ Assert.assertEquals(1, clCfg.getProperties().size());
+ Assert.assertEquals("bar3", clCfg.getProperties().get("foo3"));
+ Assert.assertEquals(2, clCfg.getPreHandlerChains().size());
+ Map<String, UnifiedHandlerChainMetaData> map = new HashMap<String, UnifiedHandlerChainMetaData>();
+ for (UnifiedHandlerChainMetaData uhc : clCfg.getPreHandlerChains()) {
+ map.put(uhc.getId(), uhc);
+ }
+ Assert.assertTrue(map.get("my-handlers").getHandlers().isEmpty());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", map.get("my-handlers").getProtocolBindings());
+ Assert.assertEquals(1, map.get("my-handlers2").getHandlers().size());
+ Assert.assertEquals("MyHandler", map.get("my-handlers2").getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.MyHandler", map.get("my-handlers2").getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", map.get("my-handlers").getProtocolBindings());
+ Assert.assertEquals(1, clCfg.getPostHandlerChains().size());
+ Assert.assertEquals("my-handlers2", clCfg.getPostHandlerChains().get(0).getId());
+ Assert.assertEquals(1, clCfg.getPostHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("MyHandler2", clCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.MyHandler2", clCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", clCfg.getPostHandlerChains().get(0).getProtocolBindings());
+
+ serverConfig.reloadEndpointConfigs();
+ EndpointConfig epCfg = serverConfig.getEndpointConfig("Standard-Endpoint-Config");
+ Assert.assertNotNull(epCfg);
+ Assert.assertTrue(epCfg.getProperties().isEmpty());
+ Assert.assertTrue(epCfg.getPreHandlerChains().isEmpty());
+ Assert.assertTrue(epCfg.getPostHandlerChains().isEmpty());
+ epCfg = serverConfig.getEndpointConfig("Recording-Endpoint-Config");
+ Assert.assertNotNull(epCfg);
+ Assert.assertEquals(2, epCfg.getProperties().size());
+ Assert.assertEquals("bar", epCfg.getProperties().get("foo"));
+ Assert.assertEquals("bar2", epCfg.getProperties().get("foo2"));
+ Assert.assertEquals(1, epCfg.getPreHandlerChains().size());
+ Assert.assertEquals("recording-handlers", epCfg.getPreHandlerChains().get(0).getId());
+ Assert.assertEquals(2, epCfg.getPreHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("RecordingHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("AnotherRecordingHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(1).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPreHandlerChains().get(0).getHandlers().get(1).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", epCfg.getPreHandlerChains().get(0).getProtocolBindings());
+ Assert.assertEquals(1, epCfg.getPostHandlerChains().size());
+ Assert.assertEquals("recording-handlers2", epCfg.getPostHandlerChains().get(0).getId());
+ Assert.assertEquals(2, epCfg.getPostHandlerChains().get(0).getHandlers().size());
+ Assert.assertEquals("RecordingHandler2", epCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPostHandlerChains().get(0).getHandlers().get(0).getHandlerClass());
+ Assert.assertEquals("AnotherRecordingHandler2", epCfg.getPostHandlerChains().get(0).getHandlers().get(1).getHandlerName());
+ Assert.assertEquals("org.jboss.ws.common.invocation.RecordingServerHandler", epCfg.getPostHandlerChains().get(0).getHandlers().get(1).getHandlerClass());
+ Assert.assertEquals("##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM", epCfg.getPostHandlerChains().get(0).getProtocolBindings());
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> T getMSCService(final ServiceContainer container, final ServiceName serviceName, final Class<T> clazz) {
+ ServiceController<T> service = (ServiceController<T>) container.getService(serviceName);
+ return service != null ? service.getValue() : null;
+ }
+}
Property changes on: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/java/org/jboss/as/webservices/dmr/WebservicesSubsystemRuntimeTestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml (rev 0)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml 2014-11-11 14:01:25 UTC (rev 19093)
@@ -0,0 +1,29 @@
+<subsystem xmlns="urn:jboss:domain:webservices:1.2">
+ <modify-wsdl-address>true</modify-wsdl-address>
+ <wsdl-host>localhost</wsdl-host>
+ <wsdl-port>9895</wsdl-port>
+ <wsdl-secure-port>9944</wsdl-secure-port>
+ <endpoint-config name="Standard-Endpoint-Config"/>
+ <endpoint-config name="Recording-Endpoint-Config">
+ <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ <handler name="AnotherRecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ </pre-handler-chain>
+ <post-handler-chain name="recording-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="RecordingHandler2" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ <handler name="AnotherRecordingHandler2" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ </post-handler-chain>
+ <property name="foo" value="bar"/>
+ <property name="foo2" value="bar2"/>
+ </endpoint-config>
+ <client-config name="My-Client-Config">
+ <pre-handler-chain name="my-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM" />
+ <pre-handler-chain name="my-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="MyHandler" class="org.jboss.ws.common.invocation.MyHandler"/>
+ </pre-handler-chain>
+ <post-handler-chain name="my-handlers2" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="MyHandler2" class="org.jboss.ws.common.invocation.MyHandler2"/>
+ </post-handler-chain>
+ <property name="foo3" value="bar3"/>
+ </client-config>
+</subsystem>
Property changes on: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/test/resources/org/jboss/as/webservices/dmr/ws-subsystem12-rt.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
10 years, 1 month
JBossWS SVN: r19092 - container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 08:29:24 -0500 (Tue, 11 Nov 2014)
New Revision: 19092
Modified:
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
Log:
[JBWS-3855] Fix regression
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2014-11-11 12:07:04 UTC (rev 19091)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2014-11-11 13:29:24 UTC (rev 19092)
@@ -36,7 +36,6 @@
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSServices;
import org.jboss.dmr.ModelNode;
-import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
@@ -81,11 +80,14 @@
final ServiceTarget target = context.getServiceTarget();
final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, clientConfigService);
for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
- clientServiceBuilder.addDependency(sn, PropertyService.class, clientConfigService.getPropertiesInjector());
+ clientServiceBuilder.addDependency(sn, PropertyService.class, clientConfigService.getPropertiesInjector()); //get a new injector instance each time
}
- setDependency(context, clientServiceBuilder, clientConfigService.getPreHandlerChainsInjector(), UnifiedHandlerChainMetaData.class, serviceName, address, Constants.PRE_HANDLER_CHAIN);
- final Injector<UnifiedHandlerChainMetaData> postInjector = clientConfigService.getPostHandlerChainsInjector();
- setDependency(context, clientServiceBuilder, postInjector, UnifiedHandlerChainMetaData.class, serviceName, address, Constants.POST_HANDLER_CHAIN);
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PRE_HANDLER_CHAIN)) {
+ clientServiceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, clientConfigService.getPreHandlerChainsInjector()); //get a new injector instance each time
+ }
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.POST_HANDLER_CHAIN)) {
+ clientServiceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, clientConfigService.getPostHandlerChainsInjector()); //get a new injector instance each time
+ }
ServiceController<?> controller = clientServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
if (newControllers != null) {
newControllers.add(controller);
@@ -94,11 +96,4 @@
context.reloadRequired();
}
}
-
- private <T> void setDependency(final OperationContext context, final ServiceBuilder<?> builder, final Injector<T> injector,
- final Class<T> injectedClass, final ServiceName serviceName, final PathAddress address, final String handlerChainType) {
- for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, handlerChainType)) {
- builder.addDependency(sn, injectedClass, injector);
- }
- }
}
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2014-11-11 12:07:04 UTC (rev 19091)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2014-11-11 13:29:24 UTC (rev 19092)
@@ -36,7 +36,6 @@
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSServices;
import org.jboss.dmr.ModelNode;
-import org.jboss.msc.inject.Injector;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
@@ -83,13 +82,17 @@
final ConfigService endpointConfigService = new ConfigService(serverConfig, name, false);
final ServiceTarget target = context.getServiceTarget();
- final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, endpointConfigService);
+ final ServiceBuilder<?> serviceBuilder = target.addService(serviceName, endpointConfigService);
for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
- clientServiceBuilder.addDependency(sn, PropertyService.class, endpointConfigService.getPropertiesInjector());
+ serviceBuilder.addDependency(sn, PropertyService.class, endpointConfigService.getPropertiesInjector()); //get a new injector instance each time
}
- setDependency(context, clientServiceBuilder, endpointConfigService.getPreHandlerChainsInjector(), serviceName, address, Constants.PRE_HANDLER_CHAIN);
- setDependency(context, clientServiceBuilder, endpointConfigService.getPostHandlerChainsInjector(), serviceName, address, Constants.POST_HANDLER_CHAIN);
- ServiceController<?> controller = clientServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PRE_HANDLER_CHAIN)) {
+ serviceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, endpointConfigService.getPreHandlerChainsInjector()); //get a new injector instance each time
+ }
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.POST_HANDLER_CHAIN)) {
+ serviceBuilder.addDependency(sn, UnifiedHandlerChainMetaData.class, endpointConfigService.getPostHandlerChainsInjector()); //get a new injector instance each time
+ }
+ ServiceController<?> controller = serviceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
if (newControllers != null) {
newControllers.add(controller);
}
@@ -97,11 +100,4 @@
context.reloadRequired();
}
}
-
- private void setDependency(final OperationContext context, final ServiceBuilder<?> builder, final Injector<UnifiedHandlerChainMetaData> injector,
- final ServiceName serviceName, final PathAddress address, final String handlerChainType) {
- for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, handlerChainType)) {
- builder.addDependency(sn, UnifiedHandlerChainMetaData.class, injector);
- }
- }
}
10 years, 1 month
JBossWS SVN: r19091 - container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 07:07:04 -0500 (Tue, 11 Nov 2014)
New Revision: 19091
Modified:
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
Log:
[JBWS-3854] EndpointConfigAdd does not set required PropertyService dependencies
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2014-11-11 10:58:36 UTC (rev 19090)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/ClientConfigAdd.java 2014-11-11 12:07:04 UTC (rev 19091)
@@ -80,7 +80,9 @@
final ConfigService clientConfigService = new ConfigService(serverConfig, name, true);
final ServiceTarget target = context.getServiceTarget();
final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, clientConfigService);
- setDependency(context, clientServiceBuilder, clientConfigService.getPropertiesInjector(), PropertyService.class, serviceName, address, Constants.PROPERTY);
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
+ clientServiceBuilder.addDependency(sn, PropertyService.class, clientConfigService.getPropertiesInjector());
+ }
setDependency(context, clientServiceBuilder, clientConfigService.getPreHandlerChainsInjector(), UnifiedHandlerChainMetaData.class, serviceName, address, Constants.PRE_HANDLER_CHAIN);
final Injector<UnifiedHandlerChainMetaData> postInjector = clientConfigService.getPostHandlerChainsInjector();
setDependency(context, clientServiceBuilder, postInjector, UnifiedHandlerChainMetaData.class, serviceName, address, Constants.POST_HANDLER_CHAIN);
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2014-11-11 10:58:36 UTC (rev 19090)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/dmr/EndpointConfigAdd.java 2014-11-11 12:07:04 UTC (rev 19091)
@@ -32,6 +32,7 @@
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.ServiceVerificationHandler;
import org.jboss.as.webservices.service.ConfigService;
+import org.jboss.as.webservices.service.PropertyService;
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSServices;
import org.jboss.dmr.ModelNode;
@@ -83,6 +84,9 @@
final ServiceTarget target = context.getServiceTarget();
final ServiceBuilder<?> clientServiceBuilder = target.addService(serviceName, endpointConfigService);
+ for (ServiceName sn : PackageUtils.getServiceNameDependencies(context, serviceName, address, Constants.PROPERTY)) {
+ clientServiceBuilder.addDependency(sn, PropertyService.class, endpointConfigService.getPropertiesInjector());
+ }
setDependency(context, clientServiceBuilder, endpointConfigService.getPreHandlerChainsInjector(), serviceName, address, Constants.PRE_HANDLER_CHAIN);
setDependency(context, clientServiceBuilder, endpointConfigService.getPostHandlerChainsInjector(), serviceName, address, Constants.POST_HANDLER_CHAIN);
ServiceController<?> controller = clientServiceBuilder.setInitialMode(ServiceController.Mode.ACTIVE).install();
10 years, 1 month
JBossWS SVN: r19089 - projects/jaxws-undertow-httpspi/tags.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 05:56:32 -0500 (Tue, 11 Nov 2014)
New Revision: 19089
Added:
projects/jaxws-undertow-httpspi/tags/jaxws-undertow-httpspi-1.0.1.Final/
Log:
Tagging jaxws-undertow-httpspi-1.0.1.Final
10 years, 1 month
JBossWS SVN: r19087 - projects/jaxws-undertow-httpspi/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-11-11 05:50:27 -0500 (Tue, 11 Nov 2014)
New Revision: 19087
Modified:
projects/jaxws-undertow-httpspi/trunk/pom.xml
Log:
Update some dependencies
Modified: projects/jaxws-undertow-httpspi/trunk/pom.xml
===================================================================
--- projects/jaxws-undertow-httpspi/trunk/pom.xml 2014-11-09 00:06:58 UTC (rev 19086)
+++ projects/jaxws-undertow-httpspi/trunk/pom.xml 2014-11-11 10:50:27 UTC (rev 19087)
@@ -28,9 +28,9 @@
<properties>
<jaxws.version>2.0.2.Final</jaxws.version>
<junit.version>4.8.1</junit.version>
- <cxf.version>2.7.8</cxf.version>
+ <cxf.version>2.7.13</cxf.version>
<servlet-api.version>1.0.2.Final</servlet-api.version>
- <io.undertow.version>1.0.0.Beta33</io.undertow.version>
+ <io.undertow.version>1.0.10.Final</io.undertow.version>
</properties>
<!-- Dependencies -->
10 years, 1 month