Yeah, I don't think the SQL component will work for you, since it requires a DataSource object up front. Perhaps you can borrow from it? That would be overkill IMHO, though
On Mon, Jan 6, 2014 at 9:22 AM, Lothar Werzinger <lot...@tradescape.biz> wrote: > I was afraid that I might have to implement that as Java code in a > processor. > I was hoping for some kind of dynamic route building that would allow me to > use the jdbc or sql component. > > Thanks anyway > > > On Fri, Jan 3, 2014 at 5:46 PM, James Carman > <ja...@carmanconsulting.com>wrote: > >> It's possible, but probably not advisable. :) >> >> from("cxf:bean:foo").process(new Processor() { >> @Override >> public void process(Exchange exchange) throws >> Exception { >> // Query the database and build up the >> JSONifiable data structure here... >> } >> }).marshal(new JsonDataFormat()).to("file:foo"); >> >> On Fri, Jan 3, 2014 at 8:34 PM, Lothar Werzinger <lot...@tradescape.biz> >> wrote: >> > Hi, >> > >> > I have the requirement to write a route that listens on a web service >> > endpoint and that is supposed to read a database table where the >> connection >> > information (host, port, ...) and the table name are passed in via the >> web >> > service call, convert the table data to JSON and write it to a file. >> > >> > Is such a route possible? If yes, can you please point me in the right >> > direction? >> > >> > Thanks in advance! >> > -- >> > >> > Lothar Werzinger >> > >> > Principal Architect >> > >> > Tradescape, Inc. - Enabling Efficient Digital Marketplaces >> > >> > +1-650-931-6719 (direct) >> > >> > +1-800-697-6068 (main) Ext. 116 >> > >> > lot...@tradescape.biz >> > >> > http://www.tradescape.biz >> > >> > -- >> > >> > >> > This message and any attachment (the "message") is intended solely for >> the >> > addressees and is confidential. If you receive this message by mistake, >> > please delete it and notify the sender immediately. Any use not >> > in accordance with its purpose, any out-spread or disclosure, either as a >> > whole or partially, is prohibited except with formal approval. Internet >> > cannot guarantee the integrity of this message, therefore Tradescape will >> > not be liable for the message if modified. >> > >> > - >> > > > > -- > > Lothar Werzinger > > Principal Architect > > Tradescape, Inc. - Enabling Efficient Digital Marketplaces > > +1-650-931-6719 (direct) > > +1-800-697-6068 (main) Ext. 116 > > lot...@tradescape.biz > > http://www.tradescape.biz > > -- > > > This message and any attachment (the "message") is intended solely for the > addressees and is confidential. If you receive this message by mistake, > please delete it and notify the sender immediately. Any use not > in accordance with its purpose, any out-spread or disclosure, either as a > whole or partially, is prohibited except with formal approval. Internet > cannot guarantee the integrity of this message, therefore Tradescape will > not be liable for the message if modified. > > -