You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Zoran Regvart <zo...@regvart.com> on 2018/11/20 10:46:34 UTC
Re: Camel spring DSL validaiton
Hi Vineet,
you could gather all `RouteDefinition` objects from that
`RoutesDefinition` you get from `CamelContext::loadRoutesDefinition`,
use `RouteDefinitionHelper::gatherAllEndpointUris` to fetch all
endpoint URIs of that `RouteDefinition` and then try to resolve those
endpoints via `CamelContextHelper::getMandatoryEndpoint`.
Not sure if there is a more straightforward way of doing that,
zoran
On Tue, Nov 20, 2018 at 10:51 AM Gandhi, Vineet <vi...@optum.com> wrote:
>
> Hi,
>
> I have a use case where clients can send route xml files to my service which I add to camelContext
>
> Code for adding route looks like :
>
> public void createRoute(InputStream xmlRouteDefinition) throws Exception {
>
>
>
> RoutesDefinition routesDefinition = camelContext.loadRoutesDefinition(xmlRouteDefinition);
>
> camelContext.addRouteDefinitions(routesDefinition.getRoutes());
>
> }
>
> Client can pass the following routes too –
>
> <?xml version="1.0" encoding="UTF-8"?>
> <routes xmlns="http://camel.apache.org/schema/spring">
> <route id="route13" autoStartup="false">
> <from uri="anystring:start13"/>
> <to uri="aaaaaaaaaaa:result13"/>
> </route>
> </routes>
>
> Is there any way of validating whether the components and their corresponding URI’s are correctly passed without calling the startRoute API in DefaultCamelContext?
>
> Regards,
> Vineet
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity
> to which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
--
Zoran Regvart
Re: Camel spring DSL validaiton
Posted by "Gandhi, Vineet" <vi...@optum.com>.
Hi Zoran,
Thanks for prompt reply.
This works for me.
Regards,
Vineet
On 20/11/18, 4:17 PM, "Zoran Regvart" <zo...@regvart.com> wrote:
Hi Vineet,
you could gather all `RouteDefinition` objects from that
`RoutesDefinition` you get from `CamelContext::loadRoutesDefinition`,
use `RouteDefinitionHelper::gatherAllEndpointUris` to fetch all
endpoint URIs of that `RouteDefinition` and then try to resolve those
endpoints via `CamelContextHelper::getMandatoryEndpoint`.
Not sure if there is a more straightforward way of doing that,
zoran
On Tue, Nov 20, 2018 at 10:51 AM Gandhi, Vineet <vi...@optum.com> wrote:
>
> Hi,
>
> I have a use case where clients can send route xml files to my service which I add to camelContext
>
> Code for adding route looks like :
>
> public void createRoute(InputStream xmlRouteDefinition) throws Exception {
>
>
>
> RoutesDefinition routesDefinition = camelContext.loadRoutesDefinition(xmlRouteDefinition);
>
> camelContext.addRouteDefinitions(routesDefinition.getRoutes());
>
> }
>
> Client can pass the following routes too –
>
> <?xml version="1.0" encoding="UTF-8"?>
> <routes xmlns="http://camel.apache.org/schema/spring">
> <route id="route13" autoStartup="false">
> <from uri="anystring:start13"/>
> <to uri="aaaaaaaaaaa:result13"/>
> </route>
> </routes>
>
> Is there any way of validating whether the components and their corresponding URI’s are correctly passed without calling the startRoute API in DefaultCamelContext?
>
> Regards,
> Vineet
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity
> to which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
--
Zoran Regvart
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.