Mike/Simon, Thanks for you responses, I'm currently leaning towards option 2 as explained by Simon and I'll investigate more on that.
Mike, I'm not clear why the response message would make a difference. In my case the plan is to have the messages to the external services be synchronous operations that immediately return a response which is more of a success/failure code. The external services will also invoke some components hosted in SCA but that will again be over a web service interface that the SCA hosted services will expose (these service endpoints are expected to be fixed). Each interaction will be stateless and independent of other messages (in the traditional HTTP session state sense). I hope I'm not missing any crucial detail here :-) Thanks Anuj On Fri, Aug 5, 2011 at 5:37 PM, Mike Edwards < [email protected]> wrote: > Anuj, > > One question I'd like to ask about the pattern you're trying to use: > > o Are you expecting a response message back from each of the external Web > service endpoints, or is this more of a One-Way event message pattern where > no response is expected? > > Simon has given some pointers for the first case - I can discuss the second > case some more. > > > Yours, Mike. > > > On 05/08/2011 07:48, Anuj Bhatia wrote: > >> Hello, >> >> I'm a Tuscany SCA newbie and am looking to solve an integration problem >> using SCA. I have a Java SCA >> component that needs to route a message to one of many external (non-SCA) >> web service end points. >> Each web service end point exposes an identical interface, only the URL to >> which it is deployed is >> different. As an example consider a CMS system that has multiple >> 'instances' one each for Authoring, >> Publishing, Staging, Production etc. >> >> The number of these external end points needs to be configurable and >> decoupled from the message >> router, so the message router can not simply have a fixed number of SCA >> references with each >> pointing to one of the end points. I'm not sure what's the best way to >> wire up the application using >> SCA, some options could be: >> >> 1. Define a separate SCA component for each of the services. Each of these >> SCA components provides a >> service with the same interface as the external web service and has a >> reference to the external URL. >> These components will just delegate all requests to the external web >> service. The message routing >> SCA component can dynamically look up the component that corresponds to >> the target end point from >> the injected ComponentContext. >> >> 2. Define a single reference on the message routing component and wire it >> up using a special custom >> binding. Here the custom binding can be designed to wrap a number of >> different end points with the >> actual target for a message selected at run time somehow. >> >> 3. Define a single reference on the message routing component and add a >> reference policy >> interceptor. The interceptor can be designed to somehow look at the >> message and override the target >> end point at run time. >> >> I'm not sure whether 2 and 3 are even feasible. Any thoughts on the >> proposed solutions? >> >> Thanks >> Anuj >> >> >
