What version of Camel do you use? On Sat, Nov 26, 2022 at 12:44 PM Svend Ole Nielsen < svend-ole.niel...@addsecure.com> wrote:
> Hi again > > Problem is - it does not work (at least here) > > Taking the routetemplate-xml example and adding a RouteBuilder with > > templatedRoute("myXmlTemplate") > .parameter("name", "Name") > .parameter("greeting", "Hello there"); > > will throw an exception -> Caused by: java.lang.IllegalArgumentException: > Cannot find RouteTemplate with id myXmlTemplate. > > Same goes for the other example in the routetemplate example - same > situation. However the java created templates can be instantiated using > yaml. So this leads me to believe that using XML defined templates can not > be used from Java but the opposite is possible. > > > > > Svend Ole Nielsen Office +4596962640 > Developer svend-ole.niel...@addsecure.com > www.addsecure.com > <http://www.addsecure.com/> <https://www.facebook.com/AddSecure/> > <https://www.linkedin.com/company/addsecure/> > <https://www.youtube.com/channel/UC9RMhgoc3z23vy93yBRAygA> > *For a safer and smarter world* > NOTE: This e-mail (including any attachments) is for the sole use of the > intended recipient(s) and may contain information that confidential and/or > protected by legal privilege. Any unauthorized review, use, copy, > disclosure or distribution of this e-mail is strictly prohibited. If you > are not the intended recipient, please notify AddSecure immediately and > destroy all copies of this e-mail. AddSecure does not accept any liability > for breach of security, error or virus that may result from the > transmission of this message. > > ------------------------------ > *Fra:* Claus Ibsen <claus.ib...@gmail.com> > *Sendt:* 26. november 2022 08:37 > *Til:* users@camel.apache.org <users@camel.apache.org> > *Emne:* Re: Templates mix xml and java builder > > CAUTION: External email > Hi > > You can mix any kind of DSLs you like. > > This example uses route configuration (but should work for route template > as well), and have different DSLs > > https://github.com/apache/camel-examples/tree/main/examples/routes-configuration > > > > > On Sat, Nov 26, 2022 at 12:28 AM Svend Ole Nielsen < > svend-ole.niel...@addsecure.com> wrote: > > Hi - I have been looking all over the documentation and been at Google, > but nowhere has it been possible to dig some info up, so here goes: > > Would it be possible to define a template in XML and load it in a Java > Routebuilder? Or is it xml only both template definition and route building? > > Regards, > Svend O. > > > > > Svend Ole Nielsen Office +4596962640 > Developer svend-ole.niel...@addsecure.com > www.addsecure.com > <http://www.addsecure.com/> <https://www.facebook.com/AddSecure/> > <https://www.linkedin.com/company/addsecure/> > <https://www.youtube.com/channel/UC9RMhgoc3z23vy93yBRAygA> > *For a safer and smarter world* > NOTE: This e-mail (including any attachments) is for the sole use of the > intended recipient(s) and may contain information that confidential and/or > protected by legal privilege. Any unauthorized review, use, copy, > disclosure or distribution of this e-mail is strictly prohibited. If you > are not the intended recipient, please notify AddSecure immediately and > destroy all copies of this e-mail. AddSecure does not accept any liability > for breach of security, error or virus that may result from the > transmission of this message. > > > > -- > Claus Ibsen > ----------------- > @davsclaus > Camel in Action 2: > https://eu01.l.antigena.com/l/PiOZ6Ydkm99aHdQRnPlg90mGU9D9mtvdWbqWyAo4ubdeA7je1QE8scT3-HQ2H-xqUJks_eX2nRbYazK19e0M2oQYmBvJkmvdd3z22uYuk6aGZjHz7LwLaSLxgBPfkSZ~WsQHlyRS9W > > -- Claus Ibsen ----------------- @davsclaus Camel in Action 2: https://www.manning.com/ibsen2