Hi

On Tue, Apr 19, 2011 at 11:45 AM, fristaila <[email protected]> wrote:
> I was able to configure JAX-RS endpoints using JAXRSServerFactoryBean
> programmatically.
> I am not able to make them publish automatically using spring.
> I already have JAX-WS endpoints in my app, and I want to add them in the
> same file.xml.
>
> I followed the example
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xmlns:jaxrs="http://cxf.apache.org/jaxrs";
>  xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxrs
> http://cxf.apache.org/schemas/jaxrs.xsd";>
>
>
>
>  <import resource="classpath:META-INF/cxf/cxf.xml" />
>  <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
> />
>  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
>  <jaxrs:server id="customerService" address="/service1">
>    <jaxrs:serviceBeans>
>      <ref bean="customerBean" />
>    </jaxrs:serviceBeans>
>  </jaxrs:server>
>
>  <bean id="customerBean" class="demo.jaxrs.server.CustomerService" />
> </beans>
>
> and I created a BusApplicationContext out of this file, that is created in a
> main.
> Anyway I am not able to make jetty start.
> What do I have to do?

replace cxf-servlet import with

<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />

Both imports are redundant in CXF 2.4.0. By the way, you probably need
to specify and absolute jaxrs:server address if you depend on
standalone Jetty

> HOw can I change the global jetty parameters in this case?
>

See http://cxf.apache.org/docs/jetty-configuration.html

Cheers, Sergey

> thanks
>
>
>
>
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/JAX-RS-and-Spring-tp4312969p4312969.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Sergey Beryozkin

Application Integration Division of Talend
http://sberyozkin.blogspot.com

Reply via email to