camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From siddhesh <siddhesh_deod...@persistent.co.in>
Subject Issue with ProducerTemplate send. Null value going as String.
Date Mon, 14 Dec 2015 06:09:18 GMT
Hi All,

I calling send method of ProducerTemplate with my endpoint as follows

producerTemplate.send("abcd:addAttribute?operationName=execute@"+index+"&attributeKey=ERROR_CODE&attributeValue=${property.errorCode}",
exchange);

Later I decided to construct the endpoint uri separately as string as this
template was getting used  many times

producerTemplate.send(constructEndpoint(),exchange);

constructEndpoint(Strign index, String value) {
return
"abcd:addAttribute?operationName=execute@"+index+"&attributeKey=ERROR_CODE&attributeValue="
+ value;

Things starts breaking when property.errorCode is null.  Method
constructEndpoint returns endpoint string with attributeValu as null which
gets evaluated by producerTemplate as String null i.e. "null"

Any idea how to overcome this situation  ?





--
View this message in context: http://camel.465427.n5.nabble.com/Issue-with-ProducerTemplate-send-Null-value-going-as-String-tp5775031.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message