You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Anuj Bhatia <an...@gmail.com> on 2011/09/13 14:18:41 UTC

Overriding Message URI at run time

Hi,

I'm trying to build a reference policy interceptor that will update the
endpoint/URI that a message is being sent to based on some business rules.
Please see [1] for more background on the requirement.

The problem is that overriding the message URI at run time seems to be
supported for 'binding.ws' but not for 'binding.rest'. For the WS binding
the method "getToAddress" in [2] has logic that uses the URI set on the
Message object if the URI has not already been read from the composite
configuration previously. But there is no equivalent logic in the "invoke"
method in [3].

So my question is does it make sense to add similar logic in the "invoke"
method in [3] that will check for the presence of a URI on the Message
object if the URI has not been configured in the composite? I can submit a
patch, but I'm not sure if it makes sense in the overall binding logic in
Tuscany/SCA, so wanted to check first.

Thanks
Anuj


[1]
http://mail-archives.apache.org/mod_mbox/tuscany-user/201108.mbox/%3CCANDkLWeojEuKV=qZSw8D4xFWe0nOH8xxAxoF6R_5-fpoNtrGcw@mail.gmail.com%3E
[2]
https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java
[3]
https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingInvoker.java