Hi,

You can do it for example this way:

        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setAddress("http://localhost:9000/CustomerService";);
        CustomerService customerClient = factory.create(CustomerService.class);
        Client client = ClientProxy.getClient(customerClient);

        HTTPConduit http =  (HTTPConduit) client.getConduit();
        AuthorizationPolicy authPolicy = new AuthorizationPolicy();
        authPolicy.setAuthorizationType("Digest");
        authPolicy.setUserName("foo");
        authPolicy.setPassword("bar");
        http.setAuthorization(authPolicy);
       ...

Regards,
Andrei.

From: Ash Ashkj [mailto:[email protected]]
Sent: Sonntag, 22. September 2013 18:20
To: Andrei Shakirin
Cc: [email protected]<mailto:[email protected]>
Subject: Re: basic authentication in cxf webservice client

Thanks very much Andrei!
How do I implement similar test using JaxWsProxyFactoryBean ?
I have implemented basic,x509 message level and transfer-layer level auth using 
JaxWsProxyFactoryBean but not getting any clue about digest auth.

Many Thanks,
Ash

On Sun, Sep 22, 2013 at 4:45 PM, Andrei Shakirin 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

You can take following system test as a basis: 
https://svn.apache.org/repos/asf/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java

Regards,
Andrei.

> -----Original Message-----
> From: ash [mailto:[email protected]<mailto:[email protected]>]
> Sent: Sonntag, 22. September 2013 01:41
> To: [email protected]<mailto:[email protected]>
> Subject: Re: basic authentication in cxf webservice client
>
> How do I setup digest auth type to webservice client using cxf?
>

Reply via email to