My opinion is that you should first convert your XML into a DTO, and then your DTO into Json. You should split your architecture in more than just one layer. The data access layer will handle the WS call and the controller will know how to answer the REST call. Velocity is just a template engine, not a converting tool. You should check Jackson or Gson. Hope this helps
Edit: If you want a specific format for your DTOs, you could extend Jacksons converters or if you only want to use Velocity just render it putting your DTO in the VelocityContext and then you use it just like you always do, but I don't think it's the best way to do it.