You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cgveld <j....@avisi.nl> on 2009/09/03 09:04:55 UTC

bean: resolves xslt endpoint but does not execute

Dear reader,

In our routes we need to transform an xml using an xslt.
Depending on our header we need a different xsl file to be used for
processing.
The URI's are given at runtime.

Therefor we tried to use the "bean:" component to resolve the endpoint.

It seems the bean component does resolve this endpoint but then it is not
used in the ".to" method.

Can anyone tell me what I am doing wrong?

http://www.nabble.com/file/p25270823/TransformRouteTest.java
TransformRouteTest.java 
http://www.nabble.com/file/p25270823/transform.xsl transform.xsl 
-- 
View this message in context: http://www.nabble.com/bean%3A-resolves-xslt-endpoint-but-does-not-execute-tp25270823p25270823.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: bean: resolves xslt endpoint but does not execute

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Sep 3, 2009 at 10:10 AM, Gert-Jan van de
Streek<g....@avisi.nl> wrote:
>
> The example indeed seems to contain code that worked for 1.6 and stopped
> working in 2.0 (http://camel.apache.org/recipientlist-annotation.html)
>

Fixed the sample.

>
> On Sep 3, 2009, at 9:55 AM, cgveld wrote:
>
>>
>> Thanks!!!
>>
>> I changed '.to("bean:transformRoute?method=computeXsltUri")' to
>> '.recipientList(bean("transformRoute", "computeXsltUri"))'
>>
>> Now it works.
>>
>> I guess the last example in this page
>> http://camel.apache.org/recipientlist-annotation.html
>> recipientlist-annotation  should be changed then.
>>
>> http://www.nabble.com/file/p25271360/TransformRouteTest.java
>> TransformRouteTest.java
>> --
>> View this message in context:
>> http://www.nabble.com/bean%3A-resolves-xslt-endpoint-but-does-not-execute-tp25270823p25271360.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: bean: resolves xslt endpoint but does not execute

Posted by Gert-Jan van de Streek <g....@avisi.nl>.
The example indeed seems to contain code that worked for 1.6 and  
stopped working in 2.0 (http://camel.apache.org/recipientlist-annotation.html 
)


On Sep 3, 2009, at 9:55 AM, cgveld wrote:

>
> Thanks!!!
>
> I changed '.to("bean:transformRoute?method=computeXsltUri")' to
> '.recipientList(bean("transformRoute", "computeXsltUri"))'
>
> Now it works.
>
> I guess the last example in this page
> http://camel.apache.org/recipientlist-annotation.html
> recipientlist-annotation  should be changed then.
>
> http://www.nabble.com/file/p25271360/TransformRouteTest.java
> TransformRouteTest.java
> -- 
> View this message in context: http://www.nabble.com/bean%3A-resolves-xslt-endpoint-but-does-not-execute-tp25270823p25271360.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: bean: resolves xslt endpoint but does not execute

Posted by cgveld <j....@avisi.nl>.
Thanks!!!

I changed '.to("bean:transformRoute?method=computeXsltUri")' to
'.recipientList(bean("transformRoute", "computeXsltUri"))'

Now it works.

I guess the last example in this page 
http://camel.apache.org/recipientlist-annotation.html
recipientlist-annotation  should be changed then.

http://www.nabble.com/file/p25271360/TransformRouteTest.java
TransformRouteTest.java 
-- 
View this message in context: http://www.nabble.com/bean%3A-resolves-xslt-endpoint-but-does-not-execute-tp25270823p25271360.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: bean: resolves xslt endpoint but does not execute

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Use the recipient list EIP pattern
http://camel.apache.org/recipient-list.html

On Thu, Sep 3, 2009 at 9:04 AM, cgveld<j....@avisi.nl> wrote:
>
> Dear reader,
>
> In our routes we need to transform an xml using an xslt.
> Depending on our header we need a different xsl file to be used for
> processing.
> The URI's are given at runtime.
>
> Therefor we tried to use the "bean:" component to resolve the endpoint.
>
> It seems the bean component does resolve this endpoint but then it is not
> used in the ".to" method.
>
> Can anyone tell me what I am doing wrong?
>
> http://www.nabble.com/file/p25270823/TransformRouteTest.java
> TransformRouteTest.java
> http://www.nabble.com/file/p25270823/transform.xsl transform.xsl
> --
> View this message in context: http://www.nabble.com/bean%3A-resolves-xslt-endpoint-but-does-not-execute-tp25270823p25270823.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus