summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest/data-copy
diff options
context:
space:
mode:
authorscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-08-02 22:08:17 +0000
committerscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-08-02 22:08:17 +0000
commit2dbc247eb83dadcfddfbbb95a1440c8b90d3bd82 (patch)
treeb4b5cc9458544ae69b98e8aa1b394fdd077f50b7 /sca-java-2.x/trunk/testing/itest/data-copy
parent024cdd6f7359eaa15f960b345bc24ed0a6de4fdf (diff)
TUSCANY-3894. Enable some @Ignore(d) tests along with r1153285.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1153290 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/data-copy')
-rw-r--r--sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java2
-rw-r--r--sca-java-2.x/trunk/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java10
-rw-r--r--sca-java-2.x/trunk/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java6
-rw-r--r--sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java9
-rw-r--r--sca-java-2.x/trunk/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java33
5 files changed, 38 insertions, 22 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 ed1cc86921..9c9422a74b 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
@@ -92,7 +92,7 @@ public class ClientImpl implements ClientIntf {
name.setFirstName("DOM");
name.setLastName("MOD");
String retVal = service.greetDOM(name);
- //assertEquals("good", retVal);
+ assertEquals("SUCCESS", retVal);
}
@Override
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 fae661207f..361e0f7dd6 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
@@ -33,15 +33,7 @@ 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);
-
-// @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")
-
- // Use JAXB on input parm on the client side
- String greetDOM(Name name);
-
+ String greetDOM(Name name);
Node returnDOM(Node name);
}
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 a08cbe41d7..d94115a1e4 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
@@ -100,16 +100,14 @@ public class CrossContribTestCase {
client.callObjectGraphCheck(2);
}
- @Test
- @Ignore
+ @Test // Fails for 3894, (rename test)
public void testDOMSCA() throws Exception {
ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
assertNotNull(client);
client.callDOM();
}
- @Test
- @Ignore
+ @Test // Output DB treated as DOM, rather than String
public void testDOMWS() throws Exception {
ClientIntf client = node.getService(ClientIntf.class, "ClientWS");
assertNotNull(client);
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 1b8145520f..dc25eb07b1 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
@@ -38,12 +38,13 @@ public interface ServiceIntf {
Name greet(Name 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 = "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.privatecopy.itest/", className = "org.w3c.dom.Node")
+ // Won't work because of 2931 - lack of separation of req. vs. resp
+ //String greetDOM(Node name);
+ @ResponseWrapper(localName = "greetDOMResponse", targetNamespace = "http://intf.privatecopy.itest/", className = "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 435c6c93d9..b8fe5eb018 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
@@ -19,11 +19,18 @@
package itest.service.impl;
-import java.util.List;
+import java.io.StringReader;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
import commonj.sdo.DataObject;
@@ -63,10 +70,27 @@ public class ServiceImpl implements ServiceIntf {
@Override
- public String greetDOM(Node name) {
- return "fail";
+ //public String greetDOM(Node name) {
+ public Node greetDOM(Node name) {
+ Node retVal = null;
+
+ try {
+ assertEquals("DOMMOD", name.getTextContent());
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+
+ String retString = "<?xml version=\"1.0\" ?>" +
+ "<return>SUCCESS</return>";
+ InputSource is = new InputSource( new StringReader(retString) );
+ Document doc = builder.parse(is);
+ retVal = doc.getDocumentElement();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ return retVal;
}
-
+
@Override
public Node returnDOM(Node name) {
return name;
@@ -75,3 +99,4 @@ public class ServiceImpl implements ServiceIntf {
}
+