Author: alessio.soldano(a)jboss.com
Date: 2013-05-07 13:24:29 -0400 (Tue, 07 May 2013)
New Revision: 17535
Modified:
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/trunk/modules/server/pom.xml
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/trunk/pom.xml
Log:
[JBWS-3596] Provide support for WS-Discovery
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2013-05-07 09:04:16 UTC (rev 17534)
+++ stack/cxf/trunk/modules/client/pom.xml 2013-05-07 17:24:29 UTC (rev 17535)
@@ -110,6 +110,10 @@
<artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.cxf.services.ws-discovery</groupId>
+ <artifactId>cxf-services-ws-discovery-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.cxf.xjcplugins</groupId>
<artifactId>cxf-xjc-boolean</artifactId>
</dependency>
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2013-05-07
09:04:16 UTC (rev 17534)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2013-05-07
17:24:29 UTC (rev 17535)
@@ -42,4 +42,5 @@
public static final String CXF_POLICY_ALTERNATIVE_SELECTOR_PROP =
"cxf.policy.alternativeSelector";
public static final String CXF_MANAGEMENT_ENABLED =
"cxf.management.enabled";
public static final String CXF_MANAGEMENT_INSTALL_RESPONSE_TIME_INTERCEPTORS =
"cxf.management.installResponseTimeInterceptors";
+ public static final String CXF_WS_DISCOVERY_ENABLED =
"cxf.ws-discovery.enabled";
}
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2013-05-07
09:04:16 UTC (rev 17534)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2013-05-07
17:24:29 UTC (rev 17535)
@@ -40,6 +40,7 @@
<include>org.jboss.com.sun.httpserver:httpserver:jar</include>
<include>org.apache.cxf:cxf-*</include>
<include>org.apache.cxf.services.sts:cxf-services-sts-core:jar</include>
+
<include>org.apache.cxf.services.ws-discovery:cxf-services-ws-discovery-api:jar</include>
<include>org.apache.cxf.xjcplugins:cxf-*</include>
<include>com.sun.xml.bind:jaxb-impl:jar</include>
<include>com.sun.xml.bind:jaxb-xjc:jar</include>
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2013-05-07 09:04:16 UTC (rev 17534)
+++ stack/cxf/trunk/modules/server/pom.xml 2013-05-07 17:24:29 UTC (rev 17535)
@@ -114,6 +114,10 @@
<artifactId>cxf-services-sts-core</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.cxf.services.ws-discovery</groupId>
+ <artifactId>cxf-services-ws-discovery-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.cxf.xjcplugins</groupId>
<artifactId>cxf-xjc-boolean</artifactId>
</dependency>
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 2013-05-07
09:04:16 UTC (rev 17534)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-05-07
17:24:29 UTC (rev 17535)
@@ -30,6 +30,7 @@
import org.apache.cxf.buslifecycle.BusLifeCycleListener;
import org.apache.cxf.buslifecycle.BusLifeCycleManager;
import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.endpoint.ServerLifeCycleManager;
import org.apache.cxf.management.InstrumentationManager;
import org.apache.cxf.management.counters.CounterRepository;
import org.apache.cxf.management.interceptor.ResponseTimeMessageInInterceptor;
@@ -40,6 +41,7 @@
import org.apache.cxf.workqueue.AutomaticWorkQueue;
import org.apache.cxf.workqueue.AutomaticWorkQueueImpl;
import org.apache.cxf.workqueue.WorkQueueManager;
+import org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener;
import org.apache.cxf.ws.policy.AlternativeSelector;
import org.apache.cxf.ws.policy.PolicyEngine;
import org.apache.cxf.ws.policy.selector.MaximalAlternativeSelector;
@@ -109,6 +111,7 @@
setAdditionalWorkQueues(bus, props);
setCXFManagement(bus, props);
+ setWSDiscovery(bus, props);
}
@@ -225,6 +228,15 @@
}
}
+ protected static void setWSDiscovery(Bus bus, Map<String, String> props) {
+ if (props != null && !props.isEmpty()) {
+ final String p = props.get(Constants.CXF_WS_DISCOVERY_ENABLED);
+ if ("true".equalsIgnoreCase(p) || "1".equalsIgnoreCase(p))
{
+ bus.getExtension(ServerLifeCycleManager.class).registerListener(new
WSDiscoveryServerListener(bus));
+ }
+ }
+ }
+
private static AlternativeSelector getAlternativeSelector(Map<String, String>
props) {
//default to MaximalAlternativeSelector on server side [JBWS-3149]
AlternativeSelector selector = new MaximalAlternativeSelector();
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-05-07 09:04:16 UTC (rev 17534)
+++ stack/cxf/trunk/pom.xml 2013-05-07 17:24:29 UTC (rev 17535)
@@ -659,6 +659,17 @@
<version>${cxf.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.cxf.services.ws-discovery</groupId>
+ <artifactId>cxf-services-ws-discovery-api</artifactId>
+ <version>${cxf.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-udp</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-tools-wsdlto-core</artifactId>
<version>${cxf.version}</version>