summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-10 12:54:56 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-10 12:54:56 +0000
commit628d27a98035adebdf3022afc1976262f599ed0e (patch)
tree2965e1e4fd514774e30da1f7283592374b4f715e
parent62b81c136a65722d6cb39e6f5bd6741cc128891b (diff)
Fix up test for OASIS namespace and add better endpoint printing util. Still not in the build.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@752098 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/sca/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml2
-rw-r--r--java/sca/itest/builder/src/main/resources/scenario1/scenario1.composite2
-rw-r--r--java/sca/itest/builder/src/main/resources/scenario1/scenario1a.composite2
-rw-r--r--java/sca/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml2
-rw-r--r--java/sca/itest/builder/src/main/resources/scenario6/scenario6.composite2
-rw-r--r--java/sca/itest/builder/src/main/resources/scenario6/scenario6a.composite2
-rw-r--r--java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java4
-rw-r--r--java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java38
8 files changed, 43 insertions, 11 deletions
diff --git a/java/sca/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml
index 32015a13ef..d8cb23bbd3 100644
--- a/java/sca/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml
+++ b/java/sca/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
xmlns:ns1="http://scenario1">
<deployable composite="ns1:CompositeA" />
</contribution>
diff --git a/java/sca/itest/builder/src/main/resources/scenario1/scenario1.composite b/java/sca/itest/builder/src/main/resources/scenario1/scenario1.composite
index 72248cdf2e..4e58cdfa16 100644
--- a/java/sca/itest/builder/src/main/resources/scenario1/scenario1.composite
+++ b/java/sca/itest/builder/src/main/resources/scenario1/scenario1.composite
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
targetNamespace="http://scenario1"
xmlns:tns="http://scenario1"
name="CompositeA">
diff --git a/java/sca/itest/builder/src/main/resources/scenario1/scenario1a.composite b/java/sca/itest/builder/src/main/resources/scenario1/scenario1a.composite
index 6fbba40203..06b273c7a7 100644
--- a/java/sca/itest/builder/src/main/resources/scenario1/scenario1a.composite
+++ b/java/sca/itest/builder/src/main/resources/scenario1/scenario1a.composite
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
targetNamespace="http://scenario1"
xmlns:tns="http://scenario1"
name="CompositeC">
diff --git a/java/sca/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml b/java/sca/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml
index 5affee851e..776dfe4d97 100644
--- a/java/sca/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml
+++ b/java/sca/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
targetNamespace="http://scenario6"
xmlns:ns6="http://scenario6">
<deployable composite="ns6:CompositeA" />
diff --git a/java/sca/itest/builder/src/main/resources/scenario6/scenario6.composite b/java/sca/itest/builder/src/main/resources/scenario6/scenario6.composite
index e08dea1c8f..9575612d51 100644
--- a/java/sca/itest/builder/src/main/resources/scenario6/scenario6.composite
+++ b/java/sca/itest/builder/src/main/resources/scenario6/scenario6.composite
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
targetNamespace="http://scenario6"
xmlns:tns="http://scenario6"
name="CompositeA">
diff --git a/java/sca/itest/builder/src/main/resources/scenario6/scenario6a.composite b/java/sca/itest/builder/src/main/resources/scenario6/scenario6a.composite
index c05fde7dc8..9c7b58e2cb 100644
--- a/java/sca/itest/builder/src/main/resources/scenario6/scenario6a.composite
+++ b/java/sca/itest/builder/src/main/resources/scenario6/scenario6a.composite
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
targetNamespace="http://scenario6"
xmlns:tns="http://scenario6"
name="CompositeC">
diff --git a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
index 9edbc351d8..cdeb355f8b 100644
--- a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
+++ b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
@@ -35,6 +35,7 @@ import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -54,6 +55,7 @@ public class BuilderTestCase {
}
// Scenario 1: <binding.ws> on outer composite service CompositeA/Service1
+ @Ignore
@Test
public void testScenario1() throws Exception {
System.out.println("====>Running testScenario1");
@@ -64,6 +66,7 @@ public class BuilderTestCase {
checkScenario1Results(false);
}
+ @Ignore
@Test
public void testScenario1NonWiring() throws Exception {
System.out.println("====>Running testScenario1NonWiring");
@@ -524,6 +527,7 @@ public class BuilderTestCase {
checkScenario6and7Results("http://scenario6", false);
}
+ @Ignore
@Test
public void testScenario6NonWiring() throws Exception {
System.out.println("====>Running testScenario6NonWiring");
diff --git a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java
index 7060416e23..f59470078e 100644
--- a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java
+++ b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java
@@ -218,7 +218,7 @@ public class TestUtils {
buffer += indent + "Service - " + componentService.getName() + "\n";
for (Endpoint2 endpoint : componentService.getEndpoints()) {
if (endpoint.getBinding() != null){
- buffer += indent + " Endpoint - " + endpoint.getBinding().getName() +"\n";
+ buffer += printEndpoint(endpoint, indent);
}
}
}
@@ -226,10 +226,7 @@ public class TestUtils {
for (ComponentReference componentReference : component.getReferences()) {
buffer += indent + "Reference - " + componentReference.getName() + "\n";
for (EndpointReference2 endpointReference : componentReference.getEndpointReferences()) {
- buffer += indent + " EndpointReference - target = " + endpointReference.getTargetName() + "\n";
- if (endpointReference.getBinding() != null){
- buffer += indent + " Endpoint - " + endpointReference.getBinding().getName() + "\n";
- }
+ buffer += printEndpointReference(endpointReference, indent);
}
}
@@ -243,5 +240,36 @@ public class TestUtils {
return buffer;
}
+
+ protected static String printEndpoint(Endpoint2 endpoint, String indent){
+ String buffer = "";
+
+ buffer += indent + " Endpoint - Component: " + endpoint.getComponent().getName() +"\n";
+ buffer += indent + " Service: " + endpoint.getService().getName() +"\n";
+ buffer += indent + " Binding: " + endpoint.getBinding().getName() +"\n";
+
+ return buffer;
+ }
+
+ protected static String printEndpointReference(EndpointReference2 endpointReference, String indent){
+ String buffer = "";
+
+ buffer += indent + " EndpointReference - Component: " + endpointReference.getComponent().getName() +"\n";
+ buffer += indent + " Reference: " + endpointReference.getReference().getName() +"\n";
+ if (endpointReference.getTargetName() != null){
+ buffer += indent + " Wired: " +"\n";
+ buffer += indent + " Target: " + endpointReference.getTargetName()+"\n";
+ if (endpointReference.getTargetEndpoint() != null){
+ buffer += indent + " Binding: " + endpointReference.getBinding().getName() +"\n";
+ buffer += indent + " TargetEndpoint: " + endpointReference.getTargetEndpoint().getBinding().getName()+"\n";
+ } else {
+ buffer += indent + " Unresolved: " +"\n";
+ }
+ } else {
+ buffer += indent + " NonWired: " +"\n";
+ }
+
+ return buffer;
+ }
}