You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by zzkozak <ma...@pikula.de> on 2012/06/27 18:23:34 UTC

File language do not work in producer templates defaultEndpoint declaration

Hi,

 I'm using the following configuration:

	<camelContext id="catalogues"
xmlns="http://camel.apache.org/schema/spring">
		<camel:contextScan />
		<camel:template id="catalogueProducerTemplate"
defaultEndpoint="file://${catalogue.exchange.dir}?doneFileName=${file:name}.done"
/>
		<route>
			<from
uri="file://${catalogue.exchange.dir}?doneFileName=${file:name}.done" />
			<multicast parallelProcessing="true">
				<to uri="vm:pdfToThumbnail"/>
				<to uri="file://${catalogue.dir}"/>
			</multicast>
		</route>
		<route>
			<from uri="vm:pdfToThumbnail"/>
			<process ref="createThumbnail"/>
			<to uri="file://${catalogue.dir}2"/>
		</route>
	</camelContext>

 and I'm wondering why the created /done/ file is always of name
"name.done", while the original file name is something like "test.pdf". I
would expect a name like "test.pdf.done". Also ${name.noext}.done is not
working.

 Thanks in advance for your help,
Marcin

--
View this message in context: http://camel.465427.n5.nabble.com/File-language-do-not-work-in-producer-templates-defaultEndpoint-declaration-tp5715173.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: File language do not work in producer templates defaultEndpoint declaration

Posted by zzkozak <ma...@pikula.de>.
Hi all,

 it is working, if I declare the endpoing when sending the message:


 So, is this a bug, that File Language do not work inside a defaultEndpoint
declaration?

 Cheers,
Marcin

--
View this message in context: http://camel.465427.n5.nabble.com/File-language-do-not-work-in-producer-templates-defaultEndpoint-declaration-tp5715173p5715213.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: File language do not work in producer templates defaultEndpoint declaration

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

Are you using spring property placeholders by any chance, if so see this FAQ
http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html

Camel property placeholders is using {{ }} syntax by default.
But the file language uses ${ }.


On Wed, Jun 27, 2012 at 6:23 PM, zzkozak <ma...@pikula.de> wrote:
> Hi,
>
>  I'm using the following configuration:
>
>        <camelContext id="catalogues"
> xmlns="http://camel.apache.org/schema/spring">
>                <camel:contextScan />
>                <camel:template id="catalogueProducerTemplate"
> defaultEndpoint="file://${catalogue.exchange.dir}?doneFileName=${file:name}.done"
> />
>                <route>
>                        <from
> uri="file://${catalogue.exchange.dir}?doneFileName=${file:name}.done" />
>                        <multicast parallelProcessing="true">
>                                <to uri="vm:pdfToThumbnail"/>
>                                <to uri="file://${catalogue.dir}"/>
>                        </multicast>
>                </route>
>                <route>
>                        <from uri="vm:pdfToThumbnail"/>
>                        <process ref="createThumbnail"/>
>                        <to uri="file://${catalogue.dir}2"/>
>                </route>
>        </camelContext>
>
>  and I'm wondering why the created /done/ file is always of name
> "name.done", while the original file name is something like "test.pdf". I
> would expect a name like "test.pdf.done". Also ${name.noext}.done is not
> working.
>
>  Thanks in advance for your help,
> Marcin
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/File-language-do-not-work-in-producer-templates-defaultEndpoint-declaration-tp5715173.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.com
Author of Camel in Action: http://www.manning.com/ibsen