You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2010/07/28 12:43:42 UTC
svn commit: r980015 - in
/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java:
helloworld/BeanA.java helloworld/HelloWorldClient.java
helloworld/HelloWorldImpl.java helloworld/HelloWorldService.java
test/BindingTestCase.java
Author: slaws
Date: Wed Jul 28 10:43:41 2010
New Revision: 980015
URL: http://svn.apache.org/viewvc?rev=980015&view=rev
Log:
TUSCANY-3635 - added a new test to help with the investigation of the issue Fabiano reported to the ML. See JIRA for link. The test is @Ignored at the moment as the 2.x binding.jsonp exhibits issues also.
Added:
tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java
tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java
tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java
tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java
Added: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java?rev=980015&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java (added)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java Wed Jul 28 10:43:41 2010
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+public class BeanA {
+
+ protected Boolean b;
+ protected String s;
+ protected int x;
+ protected Integer y;
+
+ public Boolean getB() {
+ return b;
+ }
+
+ public void setB(Boolean b) {
+ this.b = b;
+ }
+
+ public String getS() {
+ return s;
+ }
+
+ public void setS(String s) {
+ this.s = s;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public void setX(int x) {
+ this.x = x;
+ }
+
+ public Integer getY() {
+ return y;
+ }
+
+ public void setY(Integer y) {
+ this.y = y;
+ }
+}
Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java?rev=980015&r1=980014&r2=980015&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java Wed Jul 28 10:43:41 2010
@@ -34,4 +34,7 @@ public class HelloWorldClient implements
return ref.sayHello2(firstName, lastName);
}
+ public BeanA sayHello3(BeanA bean) {
+ return ref.sayHello3(bean);
+ }
}
Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java?rev=980015&r1=980014&r2=980015&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java Wed Jul 28 10:43:41 2010
@@ -29,4 +29,8 @@ public class HelloWorldImpl implements H
return "Hello " + firstName + " " + lastName;
}
+ public BeanA sayHello3(BeanA bean) {
+ return bean;
+ }
+
}
Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java?rev=980015&r1=980014&r2=980015&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java Wed Jul 28 10:43:41 2010
@@ -26,5 +26,7 @@ public interface HelloWorldService {
String sayHello(String name);
String sayHello2(String firstName, String lastName);
+
+ BeanA sayHello3(BeanA bean);
}
Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java?rev=980015&r1=980014&r2=980015&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java Wed Jul 28 10:43:41 2010
@@ -18,6 +18,7 @@
*/
package test;
+import helloworld.BeanA;
import helloworld.HelloWorldService;
import java.io.BufferedReader;
@@ -33,6 +34,7 @@ import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
public class BindingTestCase {
@@ -55,7 +57,7 @@ public class BindingTestCase {
String response = br.readLine();
Assert.assertEquals("foo(\"Hello petra arnold\");", response);
- }
+ }
@Test
public void testReference() throws MalformedURLException, IOException {
@@ -64,8 +66,22 @@ public class BindingTestCase {
Assert.assertEquals("Hello beate", client.sayHello("beate"));
Assert.assertEquals("Hello beate arnold", client.sayHello2("beate", "arnold"));
-
}
+
+ @Test
+ @Ignore("TUSCANY-3635")
+ public void testComplexParams() throws MalformedURLException, IOException {
+
+ HelloWorldService client = node.getService(HelloWorldService.class, "HelloWorldClient");
+
+ BeanA bean = new BeanA();
+ bean.setB(true);
+ bean.setS("Fred");
+ bean.setX(2);
+ bean.setX(5);
+
+ Assert.assertEquals("Fred", client.sayHello3(bean).getS());
+ }
@BeforeClass
public static void init() throws Exception {