Not sure why but the message formatting is broken
Here's another attempt :
ClassPathXmlApplicationContext ctx =
new ClassPathXmlApplicationContext(new String[]
{"/org/apache/cxf/jaxrs/spring/servers.xml"});
// 'simple' is the id of the jaxrs server bean
JAXRSServerFactoryBean sfb = (JAXRSServerFactoryBean)ctx.getBean("simple");
sfb.create();
or may be you just can get all the beans from the context and call create() on
those which are assignable to JAXRSServerFactoryBean
give a try please
Cheers, Sergey
----- Original Message -----
From: "Sergey Beryozkin" <[email protected]>
To: <[email protected]>
Sent: Tuesday, June 16, 2009 9:53 AM
Subject: Re: Configure CXF JAXRS services in the Spring context and
stand-aloneusage
Hi
Will the code code work for you ?
ClassPathXmlApplicationContext ctx =
new ClassPathXmlApplicationContext(new String[]
{"/org/apache/cxf/jaxrs/spring/servers.xml"});
// 'simple' is the id of the jaxrs server bean
JAXRSServerFactoryBean sfb = (JAXRSServerFactoryBean)ctx.getBean("simple");sfb.create();or may be you just can get all the beans
from the context and call create() on those which are assignable to JAXRSServerFactoryBean.give a try pleaseCheers, SergeyHello,
everybody!Can somebody please explain, how can I configure all of beans to be used forserving the RESTful application requests
within the Spring context, and startthe entire application as a stand-alone app? Looks like the user manual lacksthis section -
there are examples of how to use JAXRSServerFactoryBean tocreate and start up the server, or use Spring in a servlet
container.Thank you in advance!-- Eugene N Dzhurinsky
----- Original Message -----
From: "Eugeny N Dzhurinsky" <[email protected]>
To: <[email protected]>
Sent: Tuesday, June 16, 2009 7:31 AM
Subject: Configure CXF JAXRS services in the Spring context and stand-aloneusage