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
