summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java2
-rw-r--r--java/sca/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/java/sca/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java b/java/sca/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java
index 2876db430a..72b8c1b8b7 100644
--- a/java/sca/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java
+++ b/java/sca/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPServiceBindingProvider.java
@@ -45,7 +45,7 @@ public class JSONPServiceBindingProvider implements ServiceBindingProvider {
Interface serviceInterface = service.getInterfaceContract().getInterface();
for (Operation op : serviceInterface.getOperations()) {
JSONPServlet servlet = new JSONPServlet(wire, op);
- String path = service.getName() + "/" + op.getName();
+ String path = endpoint.getBinding().getURI() + "/" + op.getName();
servletHost.addServletMapping(path, servlet);
}
}
diff --git a/java/sca/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java b/java/sca/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java
index 622dbd4897..be46c1dee7 100644
--- a/java/sca/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java
+++ b/java/sca/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java
@@ -39,7 +39,7 @@ public class BindingTestCase {
@Test
public void testService() throws MalformedURLException, IOException {
- URL url = new URL("http://localhost:8085/HelloWorldService/sayHello?name=petra&callback=foo");
+ URL url = new URL("http://localhost:8085/HelloWorldComponent/HelloWorldService/sayHello?name=petra&callback=foo");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
String response = br.readLine();
Assert.assertEquals("foo(\"Hello petra\");", response);
@@ -48,7 +48,7 @@ public class BindingTestCase {
@Test
public void testTwoArgs() throws MalformedURLException, IOException {
- URL url = new URL("http://localhost:8085/HelloWorldService/sayHello2?first=petra&last=arnold&callback=foo");
+ URL url = new URL("http://localhost:8085/HelloWorldComponent/HelloWorldService/sayHello2?first=petra&last=arnold&callback=foo");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
String response = br.readLine();
Assert.assertEquals("foo(\"Hello petra arnold\");", response);