summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-07-23 20:15:45 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-07-23 20:15:45 +0000
commit62f02e8442861dab7bffcf62ae231e21e77b3387 (patch)
tree43c94d1d58f864e86584e08f1024a2fc08beb2f2 /sca-java-2.x
parentc6eb46690f9463ba250f3c6dfcac5a8ab8df3d5c (diff)
Update the JSONP binding to set the enpoint URI from the registered service servlet
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1150210 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java
index 991aeb3a21..03a3668dbe 100644
--- a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java
@@ -51,7 +51,10 @@ public class JSONPServiceBindingProvider implements ServiceBindingProvider {
for (Operation op : serviceInterface.getOperations()) {
JSONPServlet servlet = new JSONPServlet(endpoint, op);
String path = endpoint.getBinding().getURI() + "/" + op.getName();
- servletHost.addServletMapping(path, servlet);
+ String mappedURI = servletHost.addServletMapping(path, servlet);
+ String endpointURI = mappedURI.substring(0, mappedURI.lastIndexOf("/" + op.getName()));
+ endpoint.setDeployedURI(endpointURI);
+ endpoint.getBinding().setURI(endpointURI);
}
}