cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Simple Problem - Restful HTTP Basic Auth over HTTPS
Date Wed, 21 Aug 2013 15:23:30 GMT
Hi
On 21/08/13 16:41, rpd wrote:
> Hi Sergey - I'm ready to try things now with a fresh Tomcat deployment
> configured to use Basic Auth container-based security and HTTPS for any
> servlet I choose.  Now it's time to try out CXF.  Have to say I'm finding
> the apparent lack of an idiot's guide/hello world quite hard to deal with.
>
> Since I don't want to add Spring to the mix, I assume that I should be
> consulting
> http://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServicesConfiguration-ConfiguringJAXRSservicesincontainerwithoutSpring
> - right?
>
> To try a simple service which web.xml fragment should I use?  In the
> documentation there are several xml fragments.  I am guessing that I should
> use the following right (I want to write only JAX-RS services)?
>
> <servlet>
>   <servlet-name>CXFServlet</servlet-name>
>   <display-name>CXF Servlet</display-name>
>   <servlet-class>
>     org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
>   </servlet-class>
>   <init-param>
>    <param-name>javax.ws.rs.Application</param-name>
>    <param-value>
>      org.apache.cxf.systest.jaxrs.BookApplication
>      (name=1 id=2)
>    </param-value>
>   </init-param>
>   <load-on-startup>1</load-on-startup>
> </servlet>
>

Yes, you can delay starting working with Application, do it at the next 
step, try first registering a basic JAX-RS service class first:

<init-param>
   <param-name>jaxrs.serviceClasses</param-name>
   <param-value>
     org.bar.SimpleJaxrsService
   </param-value>
  </init-param>

> Is there some guide to how to set things up first?  For example, I'm
> assuming that I need to set up the CXF_HOME env variable? Which jars should
> be in my project's lib folder - there are many?  Etc?
>
The simplest option is download a CXF distro and copy all the libs from 
there; using Maven can be more effective, especially with 
3.0.0-SNAPSHOT, where Dan refactored the JAX-RS frontend to have a bare 
minimum of dependencies

Cheers, Sergey

>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Simple-Problem-Restful-HTTP-Basic-Auth-over-HTTPS-tp5732594p5732818.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message