You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by David Kaspar Dump <dk...@gmail.com> on 2006/07/06 11:16:19 UTC

Re: http-component and dynamic xsltResource

I would like to revisit this issue and find a way to read routing
configuration from a data base for each message that comes in.

The servicemix xml file would still be used to define the available
components but a routing (sequence of components to traverse) would be
loaded by a BC each time a message comes in.

The idea was that such a routing configuration would be attached to
the in message in a first BC.

Is there any existing component that can serves this purpose, that is
to read a (custom) routing configuration form the in message directly
and forward to correct service after each step?

Thank you,

On 6/1/06, Guillaume Nodet <gn...@gmail.com> wrote:
> All your routing needs can be fullfilled by the EIP component,
> using the ContentBasedRouter and Pipeline (i guess you are using an InOnly
> MEP).
>
> The HTTP will send an InOnly exchange to a Pipeline.
> The Pipeline will send an InOut exchange to a first ContentBasedRouter.
> The ContentBasedRouter will route  the exchange to the needed XSLT
> stylesheet and send back the answer to the Pipeline.
> The Pipeline will forward the transformed exchange to a second
> ContentBasedRouter which will route it to the final destination (HTTP, SMTP
> ...)
>
> If the XSLT should be associated with the final destination, you can use a
> single ContentBasedRouter and put the several Pipelines between it and the
> final destination, each Pipeline invoking an XSLT component.
>
> Not sure if I'm very clear, and mail is not a very good way to express
> schema :(
>
> In short, use EIP and one XSLT per endpoint.
>
> Cheers,
> Guillaume Nodet
>
>
>
> On 6/1/06, David Kaspar Dump <dk...@gmail.com> wrote:
> >
> > Hello ServiceMix list, thank you for a great product.
> >
> > Our scenario is to receive messages via HTTP(S), validate, translate
> > and route to a destination.
> >
> > The routing and translation is determined by GET parameters and the
> > configuration is to be stored in a data base.
> >
> > My idea was to develop  a BC that interacts with the data base and
> > based on the GET parameters determines what translation should be done
> > and what the destination is.
> >
> > http-component -  BC1 (trasnformation lookup) - XSLT component - BC2
> > (router) - HTTP or SMTP or FTP
> >
> > For this to work I was wondering a few questions.
> >
> > 1. Is it possible dynamically to change the xsltResource for the XSLT
> > component (ie to override what was specified in servicemix.xml)
> >
> > 2. The way to change the endpont dynamically seems to be to use
> >
> > ServiceEndpoint se = context.resolveEndpointReference(epr);
> > exchange.setEndpoint(se);
> >
> >
> > but what exactly is the "epr fragment"? I would like to resolve an
> > endpoint specified in the servicemix.xml
> >
> > Please suggest if I am completly on the wrong track, maybe I should be
> > using the newer servicemix-eip instead?
> >
> >
> > thank you,
> > dk
> >
>
>

Re: http-component and dynamic xsltResource

Posted by dkd <dk...@gmail.com>.
After getting familiar with the servicemix-eip patterns, the RoutingSlip
seems to be a candidate for my requirement.

Is it possible to construct a custom RoutingSlip for each message that comes
in and set it as an intial ServiceEndpoint?

thank you,
dkd


-- 
View this message in context: http://www.nabble.com/http-component-and-dynamic-xsltResource-tf1715775.html#a5221227
Sent from the ServiceMix - User forum at Nabble.com.