Hi, thanks a lot for all answers! Sorry Christian, I forgot about it: camel-core (2.2.0) activemq-camel (5.3.0) jdk 1.6.0.21 regards rafal On Thu, Nov 4, 2010 at 12:28 AM, Christian Müller <christian.muel...@gmail.com> wrote:Hello Rafal! Please provide more details like the Camel version you are using in further questions. Please have a look here: http://camel.apache.org/how-can-i-get-help.html However, I assume you have a String as payload in your message. The default Camel type converter mechanism is able to convert this payload also into an InputStream. This is the reason, why this is ambiguous for Camel... I wondering, if we SHOULD make Camel a bit smarter here. I made a patch which fixes this issue. We check whether the message payload is an instance of the bean method argument. If so, we will use this method and don't convert the body. Any objections?Camel already has this logic. Its just that the payload most likely isn't neither an InputStream type or a String type. And the payload is both convertable to InputStream and String. Hence Camel don't know which type your prefer. What we should maybe allow is to end user to specify that .to("bean:foo?method=methodA&type=java.io.InputStream") Or like .to("bean:foo?method=methodA(java.io.InputStream)")Cheers, Christian --
|
- Ambiguous method invocations in bean binding Rafal Janik
- Re: Ambiguous method invocations in bean binding Christian Müller
- Re: Ambiguous method invocations in bean bindi... Willem Jiang
- Re: Ambiguous method invocations in bean b... Hadrian Zbarcea
- Re: Ambiguous method invocations in bean bindi... Claus Ibsen
- Re: Ambiguous method invocations in bean b... Rafal Janik
- Re: Ambiguous method invocations in be... Claus Ibsen
- Re: Ambiguous method invocations ... Rafal Janik
- Re: Ambiguous method invocati... Christian Müller
- Re: Ambiguous method invo... Paweł Wesołowski
- Re: Ambiguous method invo... Claus Ibsen