Sergey,

Could a request/response context thing be added to the client proxies for JAX-
RS like for the webservice clients?    That would simplify some of this as the 
properties would be exactly like the webservice clients.   

Dan


On Mon June 22 2009 3:38:02 pm Sergey Beryozkin wrote:
> Hi
>
> Both http-centric WebClients and proxies use JAXRSClientFactoryBean to
> create WebClient and proxy instances. They use HTTPConduit under the
> hood and can use all the configuration supported by HTTP conduit, to do
> with all sorts of http and/or jetty transport details. If no spring
> configuration location is provided initially then they will use a
> default bus.
> JAXRSClientFactory & Web client have factory methods which take username
> & password, but you don't have to provide it from the code if you don't
> want to.
>
> Have a look here please :
> http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apa
> che/cxf/systest/jaxrs/security/
>
> there's jaxrs-https.xml spring config, and this test :
>
> http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apa
> che/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
>
> no username/password is used there but you can provide the spring-config
> plus username/password at the creation time
>
> Hope it helps
>
> Thanks, Sergey
>
>
> -----Original Message-----
> From: Gabriel Guardincerri [mailto:[email protected]]
> Sent: 22 June 2009 18:45
> To: [email protected]
> Subject: Does JAX-RS clients, WebClient or JAXRSClientFactory, support
> basic HTTP auth?
>
>
> Hi,
>
> I'm using basic http authentication to authenticate REST calls. And of
> course, on the client side I need a way to set the credentials. So, is
> there
> a way to do that with proxy-based or http-centric approaches that are in
> described at
> http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-ClientAPI
> http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-ClientAPI ? Or any
> other
> way?
>
> Thanks,
>
> Gabriel

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to