Hi You would need to set the authentication on the http component or directly on the http endpoint using parameters.
On the former you would need to define a HttpConfiguration object <bean id="httpAuth" class="org.apache.camel.componen.http.HttpConfiguration"> .. here goes spring bean properties to set the authentication settings </bean> And then use the httpAuth on the http component <bean id="http" class="org.apache.camel.component.HttpComponent"> <property name="httpConfiguration" ref="httpAuth"/> </bean> On Thu, Sep 8, 2011 at 2:26 PM, jguerra <jg.gue...@gmail.com> wrote: > Hi, > I just wanted to check Camel 2.7 HTTP component to route JMS message payload > to a HTTP service. The configuration below works fine, but the service > requires to be authenticated. > > <route> > <from uri="activemq:my.queue"/> > <setHeader headerName="CamelHttpMethod"> > <constant>POST</constant> > </setHeader> > <to uri="http://server:8080/service"/> > </route> > > So, I am using another configuration inside of the camelContext to invoque > the service with "basic" authentication, but... the requests fail. I got a > HTTP 401. > > <properties> > <property key="http.authMethodPriority" > value="Basic"/> > <property key="http.authMethod" value="Basic"/> > <property key="http.authUsername" value="dummy"/> > <property key="http.authPassword" value="pass"/> > </properties> > > <route> > <from uri="activemq:my.queue"/> > <setHeader headerName="CamelHttpMethod"> > <constant>POST</constant> > </setHeader> > <to uri="http://server:8080/authservice"/> > </route> > > I'll be pleased, if anyone can help me out on this! > > Pd: I checked this link out without any success!. > http://camel.465427.n5.nabble.com/http-component-with-authentication-td475994.html > Cheers > > -- > View this message in context: > http://camel.465427.n5.nabble.com/HTTP-component-Authentication-tp4782223p4782223.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/