Was able to get this working by adding the following code to the Route
Builder. I am using Java DSL:

        Map<String, Object> properties = new HashMap<String, Object>(); 

                AuthorizationPolicy authPolicy = new AuthorizationPolicy(); 
                
authPolicy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_BASIC); 
                authPolicy.setUserName(USERNAME); 
                authPolicy.setPassword(PWD); 
                authPolicy.setAuthorization("true");
                
                //properties.put(AuthorizationPolicy.class.getName(), 
authPolicy);
        
properties.put("org.apache.cxf.configuration.security.AuthorizationPolicy",
authPolicy);
                
                CxfEndpoint myCxfEp = 
(CxfEndpoint)getContext().getEndpoint("cxf://");
                myCxfEp.setProperties(properties);

Thanks and Regards
P Manchanda




--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-v2-12-CXF-Component-Basic-Authentication-Web-Service-tp5746233p5746435.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to