Hi

See the documentation
http://camel.apache.org/using-propertyplaceholder.html

in the section:
Using Property Placeholders for Any Kind of Attribute in the XML DSL


On Wed, Aug 9, 2017 at 7:44 PM, GaryLeeMills <gary.l.mi...@ge.com> wrote:
> 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.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to