summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-jsonp-runtime/src/test
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-07-28 05:39:17 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-07-28 05:39:17 +0000
commit5a4d0d8e8caa72f12687a9d80104235e2af033b2 (patch)
tree0d9ca0e118d059689ab3c1a62d23d8d980a6ee4d /java/sca/modules/binding-jsonp-runtime/src/test
parentb285236148619a04052dcf7c3750f90739a4228d (diff)
Update to correctly order the service request arguments
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@798407 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-jsonp-runtime/src/test')
-rw-r--r--java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java4
-rw-r--r--java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java2
-rw-r--r--java/sca/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java9
3 files changed, 15 insertions, 0 deletions
diff --git a/java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java b/java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java
index 25a5cb24e0..99f2958d0d 100644
--- a/java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java
+++ b/java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java
@@ -24,5 +24,9 @@ public class HelloWorldImpl implements HelloWorldService {
public String sayHello(String name) {
return "Hello " + name;
}
+
+ public String sayHello2(String firstName, String lastName) {
+ return "Hello " + firstName + " " + lastName;
+ }
}
diff --git a/java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java b/java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java
index 59b4bd0d57..b252eddbed 100644
--- a/java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java
+++ b/java/sca/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java
@@ -25,4 +25,6 @@ public interface HelloWorldService {
String sayHello(String name);
+ String sayHello2(String firstName, String lastName);
+
}
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 d817aff0ff..622dbd4897 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
@@ -46,6 +46,15 @@ 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");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ String response = br.readLine();
+ Assert.assertEquals("foo(\"Hello petra arnold\");", response);
+
+ }
+
@BeforeClass
public static void init() throws Exception {
JettyServer.portDefault = 8085;