Hi KnutIvar,

Thanks for your reply.

This would be really helpful if we are using JAX-WS web service client and
publish the endpoint through the JaxWsProxyFactoryBean class.

Here my concern is that we are creating the JAX RS service and need to
accept Http Basic Authentication
from the client program(I have used SOAPUI for testing the service).

Please suggest me and provide your inputs.

Regards
SaravananRamamoorthy




KnutIvar wrote:
> 
> I'm not sure this will help, but If you're using the
> JaxWsProxyFactoryBean, you might add username/password directly to it...
> (however, I'm not sure it's http basic security..., but I think so...);
> 
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean clientFactory =
> JaxWsProxyFactoryBean();            
> clientFactory.setAddress("http://localhost:8088/someservice";);
> clientFactory.setServiceClass(SomeServiceSessionWSPort.class);
> clientFactory.setUsername("username");
> clientFactory.setPassword("password");
> SomeServiceSessionWSPort client =
> (JVTOrderManagementSessionWSPort)clientFactory.create();
> 
> 
> 
> SaravananRamamoorthy wrote:
>> 
>> Hi Dan,
>> 
>> Thanks for your suggestion and reply.
>> I am also using JAX RS and from that I would call the cxf webservice
>> client.
>> Now how do I pass the basic Http Authentication from JAX RS to the cxf
>> webservice client.
>> 
>> Thanks in advance.
>> 
>> Regards
>> Saravanan R
>> 
>> 
>> 
>> 
>> 
>> 
>> dkulp wrote:
>>> 
>>> On Mon February 1 2010 10:37:06 am SaravananRamamoorthy wrote:
>>>> Hi All,
>>>> 
>>>> I have generated webservice client using cxf wsdl2java.
>>>> 
>>>> The webservice requires basic authentication.
>>>> 
>>>> How do I pass basic authenticatin to webservice client using cxf.
>>>> 
>>>> Can we use BindingProvider class for this.
>>> 
>>> Yep.   The BindingProvider has keys for both the username and the
>>> password.   
>>> Just set those on the RequestContext and it should be all set.
>>> 
>>> Dan
>>> 
>>> 
>>>> 
>>>> Regards
>>>> Saravanan R
>>>> 
>>> 
>>> -- 
>>> Daniel Kulp
>>> [email protected]
>>> http://www.dankulp.com/blog
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/basic-authentication-in-cxf-webservice-client-tp27406176p27429196.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to