diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-22 23:19:17 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-22 23:19:17 +0000 |
commit | f98e8159640f2e47b17756d2d8433330919e858e (patch) | |
tree | dc0b66765e25454c321e5412e559136f1ab436f3 /sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org | |
parent | 73da1fdb893118d67777a2e8962965d2336ca6e2 (diff) |
Fix the binding invokers to use endpoint reference's deployed URI (i.e., the target service endpoint address)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1304128 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java index 024705803f..83c26c7c21 100644 --- a/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java @@ -77,6 +77,7 @@ class AtomReferenceBindingProvider implements ReferenceBindingProvider { public Invoker createInvoker(Operation operation) { String operationName = operation.getName(); + String uri = endpointReference.getDeployedURI(); if (operationName.equals("get")) { // Determine the collection item type @@ -87,25 +88,25 @@ class AtomReferenceBindingProvider implements ReferenceBindingProvider { supportsFeedEntries = true; } - return new AtomBindingInvoker.GetInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker.GetInvoker(operation, uri, httpClient, authorizationHeader, this); } else if (operationName.equals("post")) { - return new AtomBindingInvoker.PostInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker.PostInvoker(operation, uri, httpClient, authorizationHeader, this); } else if (operationName.equals("put")) { - return new AtomBindingInvoker.PutInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker.PutInvoker(operation, uri, httpClient, authorizationHeader, this); } else if (operationName.equals("delete")) { - return new AtomBindingInvoker.DeleteInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker.DeleteInvoker(operation, uri, httpClient, authorizationHeader, this); } else if (operationName.equals("getFeed") || operationName.equals("getAll")) { - return new AtomBindingInvoker.GetAllInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker.GetAllInvoker(operation, uri, httpClient, authorizationHeader, this); } else if (operationName.equals("postMedia")) { - return new AtomBindingInvoker.PostMediaInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker.PostMediaInvoker(operation, uri, httpClient, authorizationHeader, this); } else if (operationName.equals("putMedia")) { - return new AtomBindingInvoker.PutMediaInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker.PutMediaInvoker(operation, uri, httpClient, authorizationHeader, this); } else if (operationName.equals("query")) { - return new AtomBindingInvoker.QueryInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker.QueryInvoker(operation, uri, httpClient, authorizationHeader, this); } - return new AtomBindingInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this); + return new AtomBindingInvoker(operation, uri, httpClient, authorizationHeader, this); } public InterfaceContract getBindingInterfaceContract() { |