Are you using the same cxfEndpoint ?
If so, You can set the AuthorizationPolicy by using the conduit[1].
If not, I'm afraid you have to use other camel component to do the job.
[1]http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-The%7B%7Bconduit%7D%7Delement
On Fri Nov 25 11:57:09 2011, awillia wrote:
I would like to use HTTP basic authentication when making a web service call
using CXF.
This is basically my code.
CxfEndpoint cxfEndpoint = new CxfEndpoint(app.getMessageServiceUrl(),
camelContext);
cxfEndpoint.setServiceClass(PartnerSMSService.class.getCanonicalName());
RouteDefinition def = from(RECEIVING_QUEUE_PREFIX + app.getName()); // Pull
from each application's queue
def.routeId(getRouteName(app)).transacted()
.process(new WebServiceProcessor())
.to(cxfEndpoint);
The routes are dynamically created based on data, so I can not set up the
routes in the spring config. Is there any way I can set it to use HTTP basic
authentication and define the user name and password in the code that I have
posted above.
I can do this as parameters on the end point when using the HTTP end point,
but don't see anything for CXF.
thanks
Antony
I am using camel 2.8
--
View this message in context:
http://camel.465427.n5.nabble.com/HTTP-Basic-authenticaiton-on-CxfEndpoint-tp5021812p5021812.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang