Apache CXF includes support for Web Services Dynamic Discovery (WS-Discovery), which is a protocol to enable dynamic discovery of services available on the local network. The protocol implies using a UDP based multicast transport to announce new services and probe for existing services. A managed mode where a discovery proxy is used to reduce the amount of required multicast traffic is also covered by the protocol.
JBossWS integrates the WS-Discovery functionalities provided by Apache CXF into the application server.
Apache CXF enables WS-Discovery depending on the availability of its runtime component; given that's always shipped in the application server, JBossWS integration requires using the cxf.ws-discovery.enabled property usage for enabling WS-Discovery for a given deployment. By default WS-Discovery is disabled on the application server. Below is an example of jboss-webservices.xml descriptor to be used for enabling WS-Discovery:
By default, a WS-Discovery service endpoint (SOAP-over-UDP bound) will be started the first time a WS-Discovery enabled deployment is processed on the application server. Every ws endpoint belonging to WS-Discovery enabled deployments will be automatically registered into such a WS-Discovery service endpoint (Hello messages). The service will reply to Probe and Resolve messages received on UDP port 3702 (including multicast messages sent to IPv4 address 22.214.171.124, as per specification). Endpoints will eventually be automatically unregistered using Bye messages upon undeployment.
Apache CXF comes with a WS-Discovery API that can be used to probe / resolve services. When running in-container, a JBoss module dependency to the org.apache.cxf.impl module is to be set to have access to WS-Discovery client functionalities.
The org.apache.cxf.ws.discovery.WSDiscoveryClient class provides the probe and resolve methods which also accepts filters on scopes. Users can rely on them for locating available endpoints on the network. Please have a look at the JBossWS testsuite which includes a sample on CXF WS-Discovery usage.