You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Rice Yeh <ri...@gmail.com> on 2015/04/02 09:11:34 UTC

How to get each org.apache.cxf.endpoint.Server?

Hi,
  I start up cxf jaxrs with CXFServlet with the following configuration:
<servlet>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<init-param>
<param-name>config-location</param-name>
<param-value>/WEB-INF/cxf.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

My question is how do I get each org.apache.cxf.endpoint.Server by their id
after cxf is started up?

Rice

Re: How to get each org.apache.cxf.endpoint.Server?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Rice

I guess you need to have ApplicationContext injected to the code which 
needs to do it and then get jaxrs:server beans by their ids from there, 
and cast them to JAXRSServerFactoryBean, and finally do getServer() on it

Cheers, Sergey

On 02/04/15 08:11, Rice Yeh wrote:
> Hi,
>    I start up cxf jaxrs with CXFServlet with the following configuration:
> <servlet>
> <servlet-name>cxf</servlet-name>
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> <init-param>
> <param-name>config-location</param-name>
> <param-value>/WEB-INF/cxf.xml</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> My question is how do I get each org.apache.cxf.endpoint.Server by their id
> after cxf is started up?
>
> Rice
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com