camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GaryLeeMills <gary.L.mi...@ge.com>
Subject is there a convert type for spring xml or simple
Date Wed, 09 Aug 2017 17:44:50 GMT
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.

Mime
View raw message