You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Vanshul.Chawla" <Va...@target.com> on 2017/08/09 20:55:05 UTC
RE: [EXTERNAL] is there a convert type for spring xml or simple
Set a header with that property and provide ResultType as java.lang.Integer
Vanshul
-----Original Message-----
From: GaryLeeMills [mailto:gary.L.mills@ge.com]
Sent: Wednesday, August 09, 2017 12:45 PM
To: users@camel.apache.org
Subject: [EXTERNAL] is there a convert type for spring xml or simple
I'm on camel 2.15
I am using parameter file - ./etc/parameterFile.cfg
inside I have a key=value pair - groupBy=10 in my camel context I am pulling in the parameter, however, it is a string.
I need to convert it to int. is there such a utility? thank you, I am using it for the tokenize token group for splitting.
<route id="inRoutemt1" routePolicyRef="startPolicy" autoStartup="false"
>
<from id="mainProcessingRoute" ref="AsciiGatewayBackfill" />
<convertBodyTo type="java.lang.String" />
<log message="File ${file:name} was received for ASCII Splitter."/>
<setHeader headerName="messageDateTime">
<simple>${date:now:MM-dd-yyyy-HH:mm:ss}</simple>
</setHeader>
<split streaming="true" >
<tokenize token="\n" group="{{groupBy}}"/>
<log message="Split line Body: ${body}"/>
<process ref="asciiSplitterProcessor" />
<log loggingLevel="INFO" message="Successfully sent ${file:name} to
MT1 Core for Analytics Observation." />
<to id="windowsShareTarget" uri="file://{{target.folder}}" />
</split>
<process ref="asciiCleanUp" />
</route>
RENDERS:
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1:
'{{groupBy}}' is not a valid value for 'integer'.
--
View this message in context: http://camel.465427.n5.nabble.com/is-there-a-convert-type-for-spring-xml-or-simple-tp5810142.html
Sent from the Camel - Users mailing list archive at Nabble.com.
RE: [EXTERNAL] is there a convert type for spring xml or simple
Posted by GaryLeeMills <ga...@ge.com>.
thanks Vanshul, but I really do not want to use the headers for this. I'm
hoping there is a way to convert type in Spring XML. ???
--
View this message in context: http://camel.465427.n5.nabble.com/is-there-a-convert-type-for-spring-xml-or-simple-tp5810142p5810160.html
Sent from the Camel - Users mailing list archive at Nabble.com.