diff options
author | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-01 20:31:56 +0000 |
---|---|---|
committer | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-01 20:31:56 +0000 |
commit | 03bbf3e072f32f96cdcc40d905e875fb54c45fc0 (patch) | |
tree | 8072e8695ed2816c9869e9d77db27cfa08b85c74 /sca-java-2.x/trunk/testing/itest | |
parent | d9b28c9010d1305dc9eb676e2f8fb92026907ea5 (diff) |
Switch cross-databinding test from SDO (which I can't get working) to DOM, but left tests @Ignore(d)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1152925 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest')
6 files changed, 43 insertions, 46 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java b/sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java index 5ae417b845..ed1cc86921 100644 --- a/sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java +++ b/sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java @@ -86,12 +86,12 @@ public class ClientImpl implements ClientIntf { assertEquals("good", retVal);
}
- @Override
- public void callSDO() {
+// @Override
+ public void callDOM() {
Name name = new Name();
- name.setFirstName("SDO");
- name.setLastName("ODS");
- service.greetSDO(name);
+ name.setFirstName("DOM");
+ name.setLastName("MOD");
+ String retVal = service.greetDOM(name);
//assertEquals("good", retVal);
}
@@ -107,7 +107,7 @@ public class ClientImpl implements ClientIntf { InputSource is = new InputSource( new StringReader(nameString) );
Document doc = builder.parse(is);
Node name = doc.getDocumentElement();
- Node retVal = service.greetDOM(name);
+ Node retVal = service.returnDOM(name);
assertNotSame("PBV should result in different object", name, retVal);
} catch (Exception e) {
throw new RuntimeException(e);
diff --git a/sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java b/sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java index a554461f26..fae661207f 100644 --- a/sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java +++ b/sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java @@ -32,11 +32,16 @@ import itest.privatecopy.types.Name; public interface ServiceIntf {
Name greet(Name name);
boolean areNamesTheSameObjects(Name name1, Name name2);
+
+ // Use JAXB on input parm on the client side
String greetJSON(Name name);
- void greetSDO(Name name);
// @RequestWrapper(localName = "greetDOM", targetNamespace = "http://intf/internal/itest/", className = "org.w3c.dom.Node")
// @ResponseWrapper(localName = "greetDOMResponse", targetNamespace = "http://intf/internal/itest/", className = "org.w3c.dom.Node")
// @DataBinding("org.w3c.dom.Node")
- Node greetDOM(Node name);
+
+ // Use JAXB on input parm on the client side
+ String greetDOM(Name name);
+
+ Node returnDOM(Node name);
}
diff --git a/sca-java-2.x/trunk/testing/itest/data-copy/common/src/main/java/itest/common/intf/ClientIntf.java b/sca-java-2.x/trunk/testing/itest/data-copy/common/src/main/java/itest/common/intf/ClientIntf.java index 8fbdac95a6..0fa50e5ecc 100644 --- a/sca-java-2.x/trunk/testing/itest/data-copy/common/src/main/java/itest/common/intf/ClientIntf.java +++ b/sca-java-2.x/trunk/testing/itest/data-copy/common/src/main/java/itest/common/intf/ClientIntf.java @@ -26,6 +26,6 @@ public interface ClientIntf { void callJAXBCrossContribution();
void callObjectGraphCheck(int caseNumber);
void callJSON();
- void callSDO();
- void testRoundTripDOMIdentity();
+ void callDOM();
+ void testRoundTripDOMIdentity();
}
diff --git a/sca-java-2.x/trunk/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java b/sca-java-2.x/trunk/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java index 88b747856d..a08cbe41d7 100644 --- a/sca-java-2.x/trunk/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java +++ b/sca-java-2.x/trunk/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java @@ -102,36 +102,38 @@ public class CrossContribTestCase { @Test
@Ignore
- public void testJSONSCA() throws Exception {
+ public void testDOMSCA() throws Exception {
ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
assertNotNull(client);
- client.callJSON();
+ client.callDOM();
}
@Test
@Ignore
- public void testJSONWS() throws Exception {
+ public void testDOMWS() throws Exception {
ClientIntf client = node.getService(ClientIntf.class, "ClientWS");
assertNotNull(client);
- client.callJSON();
+ client.callDOM();
}
-
+
@Test
@Ignore
- public void testSDOWS() throws Exception {
- ClientIntf client = node.getService(ClientIntf.class, "ClientWS");
+ public void testJSONSCA() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
assertNotNull(client);
- client.callSDO();
+ client.callJSON();
}
@Test
@Ignore
- public void testSDOSCA() throws Exception {
- ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
+ public void testJSONWS() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientWS");
assertNotNull(client);
- client.callSDO();
+ client.callJSON();
}
+
+
@Test
public void testDOMIdentitySCA() throws Exception {
ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
diff --git a/sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java b/sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java index fd258b3611..1b8145520f 100644 --- a/sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java +++ b/sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java @@ -37,20 +37,14 @@ public interface ServiceIntf { boolean areNamesTheSameObjects(Name name1, Name name2);
Name greet(Name name);
- //@DataBinding("JSON")
- //@RequestWrapper(localName = "greetJSON", targetNamespace = "http://intf/internal/itest/", className = "org.codehaus.jettison.json.JSONObject")
- //@ResponseWrapper(localName = "greetJSONResponse", targetNamespace = "http://intf/internal/itest/", className = "org.codehaus.jettison.json.JSONObject")
-
- String greetJSON(JSONObject name);
+ //@RequestWrapper(localName = "greetJSON", targetNamespace = "http://intf.privatecopy.itest/", className = "org.codehaus.jettison.json.JSONObject")
+ //@ResponseWrapper(localName = "greetJSONResponse", targetNamespace = "http://intf.privatecopy.itest/", className = "org.codehaus.jettison.json.JSONObject")
+ String greetJSON(JSONObject name);
- //@RequestWrapper(localName = "greetSDO", targetNamespace = "http://intf/internal/itest/", className = "commonj.sdo.DataObject")
- //@ResponseWrapper(localName = "greetSDOResponse", targetNamespace = "http://intf/internal/itest/", className = "commonj.sdo.DataObject")
- //@DataBinding("commonj.sdo.DataObject")
- void greetSDO(DataObject name);
+ //@RequestWrapper(localName = "greetDOM", targetNamespace = "http://intf.privatecopy.itest/", className = "org.w3c.dom.Node")
+ //@ResponseWrapper(localName = "greetDOMResponse", targetNamespace = "http://intf.privatecopy.itest/", className = "org.w3c.dom.Node")
+ String greetDOM(Node name);
- //@RequestWrapper(localName = "greetDOM", targetNamespace = "http://intf/internal/itest/", className = "org.w3c.dom.Node")
- //@ResponseWrapper(localName = "greetDOMResponse", targetNamespace = "http://intf/internal/itest/", className = "org.w3c.dom.Node")
- //@DataBinding("org.w3c.dom.Node")
- Node greetDOM(Node name);
+ Node returnDOM(Node name);
}
diff --git a/sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java b/sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java index b8490c073a..435c6c93d9 100644 --- a/sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java +++ b/sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java @@ -61,21 +61,17 @@ public class ServiceImpl implements ServiceIntf { return "good";
}
+
+ @Override
+ public String greetDOM(Node name) {
+ return "fail";
+ }
+
@Override
- public void greetSDO(DataObject name) {
- DataObject firstNameDO = (DataObject)((List)name.get("firstName")).get(0);
- DataObject lastNameDO = (DataObject)((List)name.get("lastName")).get(0);
- Object firstName = firstNameDO.get(0);
- Object lastName = lastNameDO.get(0);
- //assertEquals("SDO", firstName);
- //assertEquals("ODS", lastName);
- //return "good";
+ public Node returnDOM(Node name) {
+ return name;
}
- @Override
- public Node greetDOM(Node name) {
- return name;
- }
}
|