Hi

Yes there is an unfortunate side effect in Camel 1.4 that it's not strict 
validating the URI options and any option not known will return in a endpoint 
failure.

Could you create a JIRA issue with this bug that the camel-http component 
should be able to use uri options when calling a remote server?
Then its not forgotten and we will be able to fix it in Camel 1.5.

And of course the header HttpProducer.QUERY should also work.



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: sgargan [mailto:[EMAIL PROTECTED] 
Sent: 9. august 2008 00:10
To: [email protected]
Subject: HttpGet Issue with 1.4.0


I'm probably missing something here but in 1.3.0 you could dynamically create
a http get uri and have it invoke the endpoint. In 1.4 if i do something
similar 

context.createProducerTemplate().send(serverUri + "?one=uno&two=dos", new
DefaultExchange(context));

org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
http://localhost:5432/facebook?one=uno&two=dos due to: There are 2
parameters that couldn't be set on the endpoint. Check the uri if the
parameters are spelt correctly and that they are properties of the endpoint.
Unknown parameters=[{two=dos, one=uno}]

Looking at the unit tests you add a query header to the route so i tried the
following, setting a similar header on the exchange

Exchange exchange = new DefaultExchange(context, ExchangePattern.InOut);
exchange.getIn().setHeader(HttpProducer.QUERY, "one=uno&two=dos");
context.createProducerTemplate().send(serverUri, new
DefaultExchange(context));

but the parameters do not get propagated to the server. Am I missing
something here? Is there a better way to do this? I've uploaded a simple
test that illustrates the issue.

thanks in advance,

Stephen

http://www.nabble.com/file/p18899762/HttpGetWithParamTest.java
HttpGetWithParamTest.java 
http://www.nabble.com/file/p18899762/HttpGetWithParamTest.java
HttpGetWithParamTest.java 



-- 
View this message in context: 
http://www.nabble.com/HttpGet-Issue-with-1.4.0-tp18899762s22882p18899762.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to