diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-12 03:14:46 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-12 03:14:46 +0000 |
commit | e30d27ecbcbfa0c5f08299af755a38f2c2365db0 (patch) | |
tree | da13ea1ebaee23af96178379089ee7db985488c7 /sandbox/sebastien | |
parent | 1807692b068462dd7865c2adb93d55199ae496de (diff) |
Fix args construction in WelloTest, change from String to Element. Fix WSDL interface in EmbedTestCase.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1057980 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/sebastien')
2 files changed, 9 insertions, 3 deletions
diff --git a/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java b/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java index 74f71162fd..a2c36d2df7 100644 --- a/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java +++ b/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java @@ -20,6 +20,7 @@ package sample; import static java.lang.System.out; +import static java.util.Collections.singleton; import static sample.Xutil.elem; import static sample.Xutil.elems; import static sample.Xutil.print; @@ -44,7 +45,7 @@ import sample.api.WSDLReference; public class WelloTest { // Uncomment and comment the next line to switch back from RPC to Doc mode - //WSDL("http://sample/upper#Upper") + //@WSDL("http://sample/upper#Upper") @WSDL("http://sample/upperrpc#Upper") WSDLReference upper; @@ -66,8 +67,10 @@ public class WelloTest { out.println("WelloTest." + op + "(" + xml(e) + ")"); final String name = xreduce(print, "", xfilter(select("name"), elems(e))); - final String s = (String)upper.rpccall("upper", "Hello " + name); + final Element ureq = xdom("http://sample/upperrpc", "arg0", text("Hello " + name)); + final Element ures = (Element)upper.rpccall("upper", ureq); + final String s = xreduce(print, "", singleton(ures)); return xdom("http://sample/hello", "helloResponse", elem("result", text(s))); } } diff --git a/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java b/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java index 406dbabee0..c7e7ef1574 100644 --- a/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java +++ b/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java @@ -80,6 +80,7 @@ public class EmbedTestCase { final Contribution contrib = build(contrib("test", here()), ec); WSDLInterface Hello_wsdl = build(wsdli("Hello.wsdl", "http://sample/hello", "Hello", contrib), ec); WSDLInterface Upper_wsdl = build(wsdli("Upper.wsdl", "http://sample/upper", "Upper", contrib), ec); + WSDLInterface UpperRPC_wsdl = build(wsdli("UpperRPC.wsdl", "http://sample/upperrpc", "Upper", contrib), ec); // Assemble a test composite model (see EmbedUtil // for the little DSL used here, much more concise @@ -96,7 +97,9 @@ public class EmbedTestCase { component("wello-test", implementation(WelloTest.class, service(Hello_wsdl), - reference("upper", Upper_wsdl)), + // Uncomment and comment the next line to switch back from RPC to Doc mode + //reference("upper", Upper_wsdl)), + reference("upper", UpperRPC_wsdl)), reference("upper", "upper-test")), component("jello-test", implementation(JelloTest.class, |