On Wed July 8 2009 3:43:33 am liw wrote:
> I found the solution. Using service.get() API solved the problem.

Right.   Most of the stuff is hung off the service model someplace as a 
property.  Just need to find the right key or the right object it's hanging 
off of.  (example: the ServiceInfo, EndpointInfo, or InterfaceInfo).
Dan


>
> Thanks,
>
> Li
>
> liw wrote:
> > Hi,
> >
> > 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 =
> > xfire.getServiceRegistry().getService(serviceName);
> > Class serviceInterfaceClass =
> > getXFireServiceObject(serviceName).getServiceInfo().getServiceClass();
> >
> >
> > 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 =
> > bus.getExtension(ServerRegistry.class);
> >         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,
> >
> > Li

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to