You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ujeen <uj...@ujeen.com> on 2011/09/29 16:47:11 UTC

Re: Problems with jetty component and posts with more then one value for a field.

Hi the camel masters, 

Just wanted to clarify the CAMEL-4211 fix works not only for http related
URIs?

I created my own endpoint extending the DefaultEndpoint and passed this
uri="feed:trades?params=param1&amp;params=param2" to it. 
In the endpoint itself I put the 
private Collection<?> params;

and the 

public void setParams(Collection<?> params) {
     this.params = params;
}
 
But got this exception: 
Failed to resolve endpoint: feed://trades?params=param2 due to: Could not
find a suitable setter for property: params as there isn't a setter method
with same type: java.lang.String nor type conversion possible: No type
converter available to convert from type: java.lang.String to the required
type: java.util.Collection with value param2

The Camel version I use is 2.8.1.
So I have a doubt that the uri multiple params feature works only for the
http based endpoints, right?

Thank you
Have a great day/night.

--
View this message in context: http://camel.465427.n5.nabble.com/Problems-with-jetty-component-and-posts-with-more-then-one-value-for-a-field-tp4576908p4853382.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Problems with jetty component and posts with more then one value for a field.

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Sep 29, 2011 at 4:47 PM, Ujeen <uj...@ujeen.com> wrote:
> Hi the camel masters,
>
> Just wanted to clarify the CAMEL-4211 fix works not only for http related
> URIs?
>
> I created my own endpoint extending the DefaultEndpoint and passed this
> uri="feed:trades?params=param1&amp;params=param2" to it.
> In the endpoint itself I put the
> private Collection<?> params;
>
> and the
>
> public void setParams(Collection<?> params) {
>     this.params = params;
> }
>
> But got this exception:
> Failed to resolve endpoint: feed://trades?params=param2 due to: Could not
> find a suitable setter for property: params as there isn't a setter method
> with same type: java.lang.String nor type conversion possible: No type
> converter available to convert from type: java.lang.String to the required
> type: java.util.Collection with value param2
>
> The Camel version I use is 2.8.1.
> So I have a doubt that the uri multiple params feature works only for the
> http based endpoints, right?
>

Yeah this is not supported as Camel would then be able to "assemble"
multiple values from the same key as a Collection under the covers.
However it could possible be a nice addition.

Feel free to create a JIRA ticket.


> Thank you
> Have a great day/night.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Problems-with-jetty-component-and-posts-with-more-then-one-value-for-a-field-tp4576908p4853382.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/