cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liw <>
Subject Which API can be used to get service interface class for a given service?
Date Wed, 08 Jul 2009 04:40:03 GMT


We are migrating from xfire to cxf 2.1. We need to get the service interface
class for a given serviceName.

The following is what we have with xfire.

XFire xfire = (XFire)BeanFactory.getBeanInstance("xfire");
Service origRegisteredService =
Class serviceInterfaceClass =

With cxf, I am able to get the service for a given serviceName using the
following code.

  private Service getCXFServiceObject(String serviceName)
    	Bus bus = (Bus)BeanFactory.getBeanInstance(AppConstants.CXF_BUS);     
        ServerRegistry serverRegistry =
        for (Server server : serverRegistry.getServers()) {
            Service service = server.getEndpoint().getService();
            if (service.getName().getLocalPart().equals(serviceName)) {
            	return service;
    	return null;

However, after I get the service, I am not able to find any cxf API to get
service interface class for a  given service.

Does anyone have any idea?

Thanks in advance,


View this message in context:
Sent from the cxf-user mailing list archive at

View raw message