summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-jsonp-runtime
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jsonp-runtime')
-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);
}
}