Hi, You can try setting the To header inside the switch mediator instead of using Send. <header name="To" value="http://localhost:9000/soap/SimpleStockQuoteService "/>
This will change the To address but will not send the message at that moment but it will be used when later <send/> is used. Upul 2008/4/29 Luca Siddi <[EMAIL PROTECTED]>: > Hi all, > After some times I started again to work on the problem of content based > routing, and I still don't see clearly how to achieve some goals. I agree on > using existing things instead than creating new mediators: we would prefer > to use the Switch Mediator, if that's possible, because the Router Mediator > has not graphical interface for configuration. > I will try to make myself clear about what I am trying to achieve: > > Having a sequence composed in such way: > > Switch Mediator > Header Mediator > Log Mediator > [eventually other Mediators] > [...] > > I would need to decide in the Switch Mediator the Endpoint to send the > request at, without skipping the following Mediators in the sequence: > > Switch Mediator > matches case A: set for later sending to Endpoint ALFA [at the end of > mediator chain] > matches case B: set for later sending to Endpoint BETA [at the end of > mediator chain] > default: set for later sending to Endpoint GAMMA [at the end of > mediator chain] > Header Mediator > Log Mediator > [eventually other Mediators] > [...] > [Perform sending to the endpoint set in the Switch Mediator] > > >From what I have seen so far, the only way to change the Endpoint in the > Switch Mediator is "nesting" a Send Mediator inside a case in the switch, > but doing that way the remaining mediators in the sequence are skipped... > > Having a glance at the source code of the Send Mediator I understood that > its invocation is performing a send action to an endpoint, so using it means > to "jump out" the sequence going straight to the Endpoint. > After configuring the sequence adding a Switch Mediator which contains a > Send Mediator, while checking logs I have noticed that after such line: > > INFO TRACE_LOGGER Sending message to endpoint : SERVICE_ENDPOINT resolves to > address = > http://xxxxx.xxxx.xxxxxx.net:5013//samws/services/IStreamAccessManagerService > > > the sequence goes ahead processing the message and I see i.e some logging > related to some headers modifications. > > Basically I would need to understand a bit more clearly: > > 1) What happens with the other Mediators when I add a Send Mediator inside > a case of the Switch Mediator? > 2) Is it possible to "set" in the Switch Mediator the Endpoint that must > be used when sending, for performing the effective sending just after the > message is processed by the whole chain of Mediators? > > Our basic requirement is just having the capability to route the message > to a specific endpoint after the whole processing of the message by a > sequence of mediators. > > I hope I was able to explain a bit better the kind of problem we are > trying to solve. > Thanks a lot > L. > > > _______________________________________________ > Esb-java-user mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/esb-java-user > >
_______________________________________________ Esb-java-user mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/esb-java-user
