JBoss.org Community Documentation Setup an event source endpoint

With JAX-WS the event source setup has actually become quiet easy. All you need to do is to subclass your endpoint implementation from AbstractEventSourceEndpoint and a subscription manager from AbstractSubscriptionManagerEndpoint and finally point that implementation to a event source specific WSDL.

package org.jboss.test.ws.jaxws.samples.wseventing;
import javax.jws.WebService;

import org.jboss.logging.Logger;
import org.jboss.ws.annotation.EndpointConfig;
import org.jboss.ws.extensions.eventing.jaxws.AbstractEventSourceEndpoint;
* @author Heiko.Braun@jboss.org
* @version $Id$
* @since 18.01.2007
@WebService(                                                                   (1)
name = "EventSource",
portName = "EventSourcePort",
targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
wsdlLocation = "/WEB-INF/wsdl/sysmon.wsdl",                                 (2)
endpointInterface = "org.jboss.ws.extensions.eventing.jaxws.EventSourceEndpoint")
@EndpointConfig(configName = "Standard WSAddressing Endpoint")                 (3)
public class SysmonRegistrationEndpoint extends AbstractEventSourceEndpoint {  (4)
private static final Logger log = Logger.getLogger(SysmonRegistrationEndpoint.class);
protected Logger getLogger()
return log;
  1. Of course we need a @WebService annotation

  2. It's important to override the WSDL here

  3. You need to tell JBossWS that it requires WS-Addressing for this endpoint

  4. Subclass a predefined implementation that knows how to delegate to the actual eventing service implementation