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 2010/07/20 13:50:31 UTC
JAXRSServerFactoryBean server seems not startup
Hi,
I write the following code for unit test. This code is so simple, but I
find it does not work. That is, the server does not start up and No error
message is shown. Anything I do is wrong?
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
sf.setServiceBeans(new PassThroughResource());
sf.setAddress("http://localhost:9500/");
sf.create();
Regards,
Rice
Re: JAXRSServerFactoryBean server seems not startup
Posted by Sergey Beryozkin <sb...@gmail.com>.
Perhaps
http://cxf.apache.org/docs/jax-rs.html#JAX-RS-ConfiguringJAXRSendpointsprogrammaticallywithoutSpring
might help ?
cheers, Sergey
On Tue, Jul 20, 2010 at 8:20 PM, Daniel Kulp <dk...@apache.org> wrote:
> On Tuesday 20 July 2010 7:50:31 am Rice Yeh wrote:
> > Hi,
> > I write the following code for unit test. This code is so simple, but I
> > find it does not work. That is, the server does not start up and No error
> > message is shown. Anything I do is wrong?
> >
> > JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
> > sf.setServiceBeans(new PassThroughResource());
> > sf.setAddress("http://localhost:9500/");
> > sf.create();
> >
> > Regards,
> > Rice
>
> Not really sure. Does the project have the cxf-rt-transport-http-jetty
> module
> as a dependency so there is an implementation for the http transport?
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>
Re: JAXRSServerFactoryBean server seems not startup
Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 20 July 2010 7:50:31 am Rice Yeh wrote:
> Hi,
> I write the following code for unit test. This code is so simple, but I
> find it does not work. That is, the server does not start up and No error
> message is shown. Anything I do is wrong?
>
> JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
> sf.setServiceBeans(new PassThroughResource());
> sf.setAddress("http://localhost:9500/");
> sf.create();
>
> Regards,
> Rice
Not really sure. Does the project have the cxf-rt-transport-http-jetty module
as a dependency so there is an implementation for the http transport?
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: JAXRSServerFactoryBean server seems not startup
Posted by Rice Yeh <ri...@gmail.com>.
Hi,
I finally find out my problem. I write a lot unit tests like above and
they all work. Later, I think I can really write my cxf.xml. But this file
cause all the unit tests do not work. cxf.xml override all the setting in my
unit tests? It seems not a good behavior because all my unit tests become
not "unit" test but integration test.
Regards,
Rice
On Tue, Jul 20, 2010 at 7:50 PM, Rice Yeh <ri...@gmail.com> wrote:
> Hi,
> I write the following code for unit test. This code is so simple, but I
> find it does not work. That is, the server does not start up and No error
> message is shown. Anything I do is wrong?
>
> JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
> sf.setServiceBeans(new PassThroughResource());
> sf.setAddress("http://localhost:9500/");
> sf.create();
>
> Regards,
> Rice
>