Author: jsdelfino
Date: Wed Jan 12 03:14:46 2011
New Revision: 1057980

URL: http://svn.apache.org/viewvc?rev=1057980&view=rev
Log:
Fix args construction in WelloTest, change from String to Element. Fix WSDL 
interface in EmbedTestCase.

Modified:
    
tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java
    
tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java

Modified: 
tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java?rev=1057980&r1=1057979&r2=1057980&view=diff
==============================================================================
--- 
tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java
 (original)
+++ 
tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/WelloTest.java
 Wed Jan 12 03:14:46 2011
@@ -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)));
     }
 }

Modified: 
tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java?rev=1057980&r1=1057979&r2=1057980&view=diff
==============================================================================
--- 
tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java
 (original)
+++ 
tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/EmbedTestCase.java
 Wed Jan 12 03:14:46 2011
@@ -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,


Reply via email to