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
[email protected]<mailto:[email protected]>
www.addsecure.com<http://www.addsecure.com/>
[cid:addsecure-logo_50e643a1-ceaa-48aa-817f-52769402fe0c.png]<http://www.addsecure.com/>
[cid:fb_626b0b2c-0bba-4c8b-a645-72b180ce970e.png]
<https://www.facebook.com/AddSecure/>
[cid:li_2f98ce3b-2546-4c48-bcb2-9680df7d09ea.png]
<https://www.linkedin.com/company/addsecure/>
[cid:yt_8a8408e0-b9f1-4cca-9d75-77a496a95f00.png]
<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 <[email protected]>
Sendt: 26. november 2022 08:37
Til: [email protected] <[email protected]>
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
<[email protected]<mailto:[email protected]>> 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
[email protected]<mailto:[email protected]>
www.addsecure.com<http://www.addsecure.com/>
[cid:184b2dd9f0a2fe8053a1]<http://www.addsecure.com/>
[cid:184b2dd9f0a900cd1922] <https://www.facebook.com/AddSecure/>
[cid:184b2dd9f0a916028e73] <https://www.linkedin.com/company/addsecure/>
[cid:184b2dd9f0a96547e524]
<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