summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/databindings
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/itest/databindings')
-rw-r--r--java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java8
-rw-r--r--java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java8
-rw-r--r--java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java24
-rw-r--r--java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl193
-rw-r--r--java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java46
5 files changed, 232 insertions, 47 deletions
diff --git a/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java b/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
index 9305343fdd..352f805c7d 100644
--- a/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
+++ b/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
@@ -34,9 +34,9 @@ import org.osoa.sca.annotations.Remotable;
public interface HelloService {
String getGreetings(String name);
String[] getGreetingsArray(String[] names);
- //List<String> getGreetingsList(List<String> names);
- //ArrayList<String> getGreetingsArrayList(ArrayList<String> names);
- //Map<String, String> getGreetingsMap(Map<String, String> namesMap);
- //HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap);
+ List<String> getGreetingsList(List<String> names);
+ ArrayList<String> getGreetingsArrayList(ArrayList<String> names);
+ Map<String, String> getGreetingsMap(Map<String, String> namesMap);
+ HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap);
String getGreetingsVarArgs(String... names);
}
diff --git a/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java b/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
index b6ca907e25..7bd95cec95 100644
--- a/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
+++ b/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
@@ -33,9 +33,9 @@ import java.util.Map;
public interface HelloServiceClient {
String getGreetingsForward(String name);
String[] getGreetingsArrayForward(String[] names);
- //List<String> getGreetingsListForward(List<String> names);
- //ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names);
- //Map<String, String> getGreetingsMapForward(Map<String, String> namesMap);
- //HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap);
+ List<String> getGreetingsListForward(List<String> names);
+ ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names);
+ Map<String, String> getGreetingsMapForward(Map<String, String> namesMap);
+ HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap);
String getGreetingsVarArgsForward(String... names);
}
diff --git a/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java b/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
index 393cbc020b..c4026fdb9a 100644
--- a/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
+++ b/java/sca/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
@@ -51,21 +51,21 @@ public class HelloServiceClientImpl {
return service.getGreetingsArray(names);
}
-// public List<String> getGreetingsListForward(List<String> names) {
-// return service.getGreetingsList(names);
-// }
+ public List<String> getGreetingsListForward(List<String> names) {
+ return service.getGreetingsList(names);
+ }
-// public Map<String, String> getGreetingsMapForward(Map<String, String> namesMap) {
-// return service.getGreetingsMap(namesMap);
-// }
+ public Map<String, String> getGreetingsMapForward(Map<String, String> namesMap) {
+ return service.getGreetingsMap(namesMap);
+ }
-// public ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names) {
-// return service.getGreetingsArrayList(names);
-// }
+ public ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names) {
+ return service.getGreetingsArrayList(names);
+ }
-// public HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap) {
-// return service.getGreetingsHashMap(namesMap);
-// }
+ public HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap) {
+ return service.getGreetingsHashMap(namesMap);
+ }
public String getGreetingsVarArgsForward(String... names) {
return service.getGreetingsVarArgs(names[0], names[1], names[2]);
diff --git a/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl b/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
index 0b3223dce3..926e4154aa 100644
--- a/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
+++ b/java/sca/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
@@ -28,6 +28,36 @@
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
+ <xs:schema targetNamespace="http://util.java/"
+ version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType name="arrayList">
+ <xs:complexContent>
+ <xs:extension base="abstractList">
+ <xs:sequence />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType abstract="true" name="abstractList">
+ <xs:complexContent>
+ <xs:extension base="abstractCollection">
+ <xs:sequence />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType abstract="true" name="abstractCollection">
+ <xs:sequence />
+ </xs:complexType>
+ <xs:complexType name="hashMap">
+ <xs:complexContent>
+ <xs:extension base="abstractMap">
+ <xs:sequence />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType abstract="true" name="abstractMap">
+ <xs:sequence />
+ </xs:complexType>
+ </xs:schema>
<xs:schema targetNamespace="http://jaxb.dev.java.net/array"
version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType final="#all" name="stringArray">
@@ -40,6 +70,7 @@
<xs:schema attributeFormDefault="qualified"
elementFormDefault="unqualified"
targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:ns0="http://util.java/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="getGreetings">
<xs:complexType>
@@ -73,6 +104,70 @@
</xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:element name="getGreetingsList">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsListResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsArrayList">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="ns0:arrayList" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsArrayListResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="ns0:arrayList" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsMap">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsMapResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsHashMap">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="ns0:hashMap" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsHashMapResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="ns0:hashMap" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
<xs:element name="getGreetingsVarArgs">
<xs:complexType>
<xs:sequence>
@@ -110,6 +205,46 @@
element="tns:getGreetingsArrayResponse">
</wsdl:part>
</wsdl:message>
+ <wsdl:message name="getGreetingsList">
+ <wsdl:part name="getGreetingsList"
+ element="tns:getGreetingsList">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsListResponse">
+ <wsdl:part name="getGreetingsListResponse"
+ element="tns:getGreetingsListResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsArrayList">
+ <wsdl:part name="getGreetingsArrayList"
+ element="tns:getGreetingsArrayList">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsArrayListResponse">
+ <wsdl:part name="getGreetingsArrayListResponse"
+ element="tns:getGreetingsArrayListResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsMap">
+ <wsdl:part name="getGreetingsMap"
+ element="tns:getGreetingsMap">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsMapResponse">
+ <wsdl:part name="getGreetingsMapResponse"
+ element="tns:getGreetingsMapResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsHashMap">
+ <wsdl:part name="getGreetingsHashMap"
+ element="tns:getGreetingsHashMap">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsHashMapResponse">
+ <wsdl:part name="getGreetingsHashMapResponse"
+ element="tns:getGreetingsHashMapResponse">
+ </wsdl:part>
+ </wsdl:message>
<wsdl:message name="getGreetingsVarArgs">
<wsdl:part name="getGreetingsVarArgs"
element="tns:getGreetingsVarArgs">
@@ -131,6 +266,28 @@
<wsdl:output message="tns:getGreetingsArrayResponse">
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="getGreetingsList">
+ <wsdl:input message="tns:getGreetingsList"></wsdl:input>
+ <wsdl:output message="tns:getGreetingsListResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsArrayList">
+ <wsdl:input message="tns:getGreetingsArrayList">
+ </wsdl:input>
+ <wsdl:output message="tns:getGreetingsArrayListResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsMap">
+ <wsdl:input message="tns:getGreetingsMap">
+ </wsdl:input>
+ <wsdl:output message="tns:getGreetingsMapResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsHashMap">
+ <wsdl:input message="tns:getGreetingsHashMap"></wsdl:input>
+ <wsdl:output message="tns:getGreetingsHashMapResponse">
+ </wsdl:output>
+ </wsdl:operation>
<wsdl:operation name="getGreetingsVarArgs">
<wsdl:input message="tns:getGreetingsVarArgs">
</wsdl:input>
@@ -159,6 +316,42 @@
<soap11:body use="literal" />
</wsdl:output>
</wsdl:operation>
+ <wsdl:operation name="getGreetingsList">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsArrayList">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsMap">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsHashMap">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
<wsdl:operation name="getGreetingsVarArgs">
<soap11:operation />
<wsdl:input>
diff --git a/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java b/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
index 709bb02a28..01357aafb3 100644
--- a/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
+++ b/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
@@ -19,6 +19,11 @@
package org.apache.tuscany.sca.itest.databindings.jaxb.topdown;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
import junit.framework.Assert;
import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceClient;
@@ -27,7 +32,6 @@ import org.apache.tuscany.sca.node.SCANode2;
import org.apache.tuscany.sca.node.SCANode2Factory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
/**
@@ -82,10 +86,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsList.
*/
@Test
- @Ignore
public void testW2WList() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
- //performTestList(helloServiceClient);
+ performTestList(helloServiceClient);
}
/**
@@ -93,10 +96,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsArrayList.
*/
@Test
- @Ignore
public void testW2WArrayList() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
- //performTestArrayList(helloServiceClient);
+ performTestArrayList(helloServiceClient);
}
/**
@@ -104,10 +106,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsMap.
*/
@Test
- @Ignore
public void testW2WMap() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
- //performTestMap(helloServiceClient);
+ performTestMap(helloServiceClient);
}
/**
@@ -115,10 +116,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsHashMap.
*/
@Test
- @Ignore
public void testW2WHashMap() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
- //performTestHashMap(helloServiceClient);
+ performTestHashMap(helloServiceClient);
}
/**
@@ -156,10 +156,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsList.
*/
@Test
- @Ignore
public void testJ2WList() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
- //performTestList(helloServiceClient);
+ performTestList(helloServiceClient);
}
/**
@@ -167,10 +166,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsArrayList.
*/
@Test
- @Ignore
public void testJ2WArrayList() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
- //performTestArrayList(helloServiceClient);
+ performTestArrayList(helloServiceClient);
}
/**
@@ -178,10 +176,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsMap.
*/
@Test
- @Ignore
public void testJ2WMap() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
- //performTestMap(helloServiceClient);
+ performTestMap(helloServiceClient);
}
/**
@@ -189,10 +186,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsHashMap.
*/
@Test
- @Ignore
public void testJ2WHashMap() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
- //performTestHashMap(helloServiceClient);
+ performTestHashMap(helloServiceClient);
}
/**
@@ -230,10 +226,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsList.
*/
@Test
- @Ignore
public void testW2JList() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
- //performTestList(helloServiceClient);
+ performTestList(helloServiceClient);
}
/**
@@ -241,10 +236,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsArrayList.
*/
@Test
- @Ignore
public void testW2JArrayList() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
- //performTestArrayList(helloServiceClient);
+ performTestArrayList(helloServiceClient);
}
/**
@@ -252,10 +246,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsMap.
*/
@Test
- @Ignore
public void testW2JMap() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
- //performTestMap(helloServiceClient);
+ performTestMap(helloServiceClient);
}
/**
@@ -263,10 +256,9 @@ public class DatabindingTestCase {
* Service method invoked is getGreetingsHashMap.
*/
@Test
- @Ignore
public void testW2JHashMap() throws Exception {
HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
- //performTestHashMap(helloServiceClient);
+ performTestHashMap(helloServiceClient);
}
/**
@@ -293,7 +285,7 @@ public class DatabindingTestCase {
}
}
-/* private void performTestList(HelloServiceClient helloServiceClient) {
+ private void performTestList(HelloServiceClient helloServiceClient) {
List<String> namesList = new ArrayList<String>();
namesList.add("Me");
namesList.add("Pandu");
@@ -340,7 +332,7 @@ public class DatabindingTestCase {
Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
}
}
-*/
+
private void performTestVarArgs(HelloServiceClient helloServiceClient) {
String[] names = { "Me", "You", "Pandu" }; // Do not change the array size from 3.
String expected = "Hello Me You Pandu";