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 <[EMAIL PROTECTED]> 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

Reply via email to