I'm not sure how your monitoring could tell you whether those values are being sent to the server, as it would presumably be encrypted via SSL and hence unreadable. Have you been able to get the wsdl_first_https sample in the CXF distribution to work? I would start with that. My tutorial ( http://www.jroller.com/gmazza/entry/ssl_for_web_services) may also be of help, but offhand, your code looks correct.

Glen

On 11/14/2012 09:53 AM, shadowlaw wrote:
Hi,

I used cxf generator to generate à client ws, this web service needs to
authenticate using http basic authentication i used this code:

         serviceName = new QName(NAMESPACE_URI, SERVICE_NAME);
         javax.xml.ws.Service service = Service.create(WSDL_LOCATION,
serviceName);
         final AdaConfigDataFactory port =
service.getPort(AdaConfigDataFactory.class);
         BindingProvider bindingProvider = (BindingProvider)port;
         Map requestContext = bindingProvider.getRequestContext();
         requestContext.put(BindingProvider.USERNAME_PROPERTY, "username");
         requestContext.put(BindingProvider.PASSWORD_PROPERTY, "password");

but when monitoring the sent request i can see that authentication
credentials are not beeing sent to server, is there any issue in my code?

i'm considering using the JaxWsProxyFactoryBean for the client part, but is
there any difference in performance between the two methods?

thanks



--
View this message in context: 
http://cxf.547215.n5.nabble.com/cxf-wsdl2java-generated-client-security-tp5718438.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza

Reply via email to