Hi Sergey,
I have written a class that extends Application and registers all the
resource service class.
Here is my class:
public class MyRest extends Application{
@Override
public Set<Class<?>> getClasses() {
// TODO Auto-generated method stub
Set<Class<?>> s = new HashSet<Class<?>>();
s.add(Helloworld.class);
return s;
}
and my web.xml is:
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.test.MyRest</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
When I start the server , it says
Setting the server's publish address to be /
I cannot able to find the endpoint. It always says 404 not found.
Is there anything I have missed out.
Please suggest me.
Regards
Saravanan R
Sergey Beryozkin-2 wrote:
>
> Hi
>
> Please try CXFJaxrsNonSpringServlet :
>
> http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-ConfiguringJAXRSservicesincontainerwithoutSpring
>
> cheers, Sergey
>
>>
>> Hi Experts,
>>
>> Could anyone please explain how to publish JAX RS endpoint using cxf
>> without
>> spring.
>>
>> I can able to run the application using JAXRSServerFactoryBean using cxf
>> in
>> java.
>>
>> Please suggest me when deploying as a war file , how to publish these
>> JAX-RS
>> files when load on start up.
>>
>> Regards
>> Saravanan Ramamoorthy
>> --
>> View this message in context:
>> http://old.nabble.com/JAX-RS---how-to-publish-endpoint-using-cxf-tp27334669p27334669.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
>
--
View this message in context:
http://old.nabble.com/JAX-RS---how-to-publish-endpoint-using-cxf-tp27334669p27340855.html
Sent from the cxf-user mailing list archive at Nabble.com.