The problem is that I should manage 2 "username" parameters! 1)the first is a query parameter add in the remote url: it will be used to retreive info about that user
2) but, for basic authentication, camel also requires a parameter with the same name "username" ... and the username for the basic authentication is always different from the username I need to put in the url query.. ychawla wrote: > > Hi Matteo, > Did you check out this link: > > http://camel.apache.org/http.html > > It has info on connecting using basic auth. This example show a poll from > google that you can adapt to meet your needs. Below is polls your URL and > then write the result to a file: > > from("timer://foo?fixedRate=true&delay=0&period=10000") > > .to("http://remoteserver.location/get_user_info.xml?username=matteo&password=matteosPassword") > .setHeader(FileComponent.HEADER_FILE_NAME, > "get_user_info.xml").to("file:target/google"); > > or in Spring > > <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring" > trace="true"> > <route> > <from uri="direct:start"/> > <to > uri="http://remoteserver.location/get_user_info.xml?username=matteo&password=matteosPassword"/> > <to uri="mock:result"/> > </route> > </camelContext> > > Cheers, > Yogesh > > > Matteo Redaelli wrote: >> >> Hello >> >> With camel-http I'd like to retreive an xml document from an url like >> >> http://remoteserver.location/get_user_info.xml?username=matteo >> >> BUT that url requires a basic authentication >> >> where do I have to set basic auth params (username and password) and >> where my query parameter "username"?? I read about adding params in url >> or setting up header variable Exchange.HTTP_QUERY .. >> >> Thanks in advance >> Matteo >> http://www.redaelli.org >> >> > > -- View this message in context: http://old.nabble.com/camel-http%3A-basic-authentication-and-query-parameter-%22username%22-tp27714288p27714426.html Sent from the Camel - Users mailing list archive at Nabble.com.