Hi Michael,

let me try to ask some questions:

A: Are you executing this example as unit test? If so, why don't you apply the 
ProducerTemplate and simply pass the list when executing the sendBody() 
operation?
B: We'll, ... you probably need to send it somewhere via the to() statement, 
e.g. to the jetty component or any other.

Cheers,

- Christoph

On Jun 2, 2013, at 11:01 PM, Conneen Michael wrote:

> Folks, 
> 
> I  suspect I am a stones throw away from the "ah ha" moment.. but I cannot 
> seem to get there..   I am a newbie so I purchased and downloaded the Camel 
> In Action ebook... Great overview and has gotten me this far.. I do have 
> "some" of the individual pieces working.. I just cannot figure out how to 
> build the route correctly. 
> 
> I have searched the camel user forum for "mybatis selectlist velocity" ... 
> but have yet to find what I am looking for... 
> 
> Here is what I want to do.. 
> 1.  Run camel using a servlet endpoint as the starting point.   
>       From the tomcat example, got this working and mostly understand the 
> spring configuration... 
>               
> 2.  Parse off a parameter and pass into a myBatis select list. .. 
>       I have worked with myBatis a lot from POJOs... so I have both POJOs.. 
> and I think a direct junit test of the mybatis route.. 
>               
> 3.  Route the query results to velocity to produce an html table. ... 
>       I have junit working where I pass a list via  
> template.requestBody("direct:in", list);
>               
> 4.  Return the results of the velocity template as the html response
>       Have not tackled this yet.   Trying to get routes 2 and 3 above first.. 
> 
> Things I cannot figure out.. 
> A.   via "to" routing syntax, how do I provide the appropriate list 
> collection to velocity ?  I know the raw syntax is
>               List<?> list = 
> mock.getReceivedExchanges().get(0).getIn().getBody(List.class);
>               but velocity is expecting the collection as part of the body.. 
>               
> B.  how do I pull the velocity results out and concatenate with my desired 
> html output stream?
> 
> Any pointers to my "ah ha" moment much appreciated..

Reply via email to