On Tue, Jun 16, 2009 at 09:56:39AM +0100, Sergey Beryozkin wrote:
> 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


Also I noticed if the following line of code

ClassPathXmlApplicationContext ctx = new 
ClassPathXmlApplicationContext("/beans.xml");

appears in the Java class aimed to start up the things, the call to the

JAXRSServerFactoryBean() sfb = new JAXRSServerFactoryBean();
sfb.setAddress("...");
sfb.create();

does not start the internal Jetty server. Commenting out the context loading
does the trick.

So is it possible the jaxrs:server tag needs to be configured somehow with the
transport or something like this?

-- 
Eugene N Dzhurinsky

Attachment: pgpCRbexcN6aH.pgp
Description: PGP signature

Reply via email to