summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2008-07-24 12:23:19 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2008-07-24 12:23:19 +0000
commit6d463f91ecc078ddf5b674c76881182d1ebd991c (patch)
treecf4cbdcbb02b72ca77b4b4b09cd54d21ffc36a6c
parent6acbfc42b0acf5343b5d5098ae74c14f9cf32683 (diff)
Renumber scenarios and update CompositeBuilderImplNonWiring
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@679385 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite6
-rw-r--r--branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite4
-rw-r--r--branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite3
-rw-r--r--branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite7
-rw-r--r--branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite3
-rw-r--r--branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite3
-rw-r--r--branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite4
-rw-r--r--branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite3
-rw-r--r--branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java32
-rw-r--r--branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java8
10 files changed, 33 insertions, 40 deletions
diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite
index ad1c6aa4c1..2d127a7bec 100644
--- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite
+++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite
@@ -39,12 +39,16 @@
</service>
<service name="Service2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
</service>
- <reference name="reference2">
+ <reference name="reference2" target="ComponentB/Service2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
</reference>
<reference name="reference2a" target="ComponentF">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
+ <binding.ws />
</reference>
</component>
diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite
index b4e9c61ef5..98103e360e 100644
--- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite
+++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite
@@ -33,8 +33,6 @@
</reference>
<reference name="reference2a" promote="ComponentD/reference3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
- <binding.ws />
</reference>
<component name="ComponentD">
@@ -44,11 +42,9 @@
</service>
<service name="Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <binding.ws uri="http://foo.com/bar" />
</service>
<reference name="reference3" target="ComponentD/Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <binding.ws/>
</reference>
<reference name="reference3a" target="ComponentE">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite
index 776345062b..2f5ca96d07 100644
--- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite
+++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite
@@ -39,14 +39,13 @@
</service>
<service name="Service2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
</service>
<reference name="reference2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</reference>
<reference name="reference2a" target="ComponentF">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
- <binding.ws />
</reference>
</component>
diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite
index 5811e80735..381ccddcc3 100644
--- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite
+++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite
@@ -28,11 +28,14 @@
<service name="Service2a" promote="ComponentD/Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
- <reference name="reference2" promote="ComponentD/reference3">
+ <reference name="reference2" promote="ComponentD/reference3" target="ComponentB/Service2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
</reference>
<reference name="reference2a" promote="ComponentD/reference3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
+ <binding.ws />
</reference>
<component name="ComponentD">
@@ -42,11 +45,9 @@
</service>
<service name="Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <binding.ws uri="http://foo.com/bar" />
</service>
<reference name="reference3" target="ComponentD/Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <binding.ws/>
</reference>
<reference name="reference3a" target="ComponentE">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite
index cc2ea5b0e2..23799f8487 100644
--- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite
+++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite
@@ -30,7 +30,6 @@
</reference>
<reference name="reference1a" promote="ComponentB/reference2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <binding.ws uri="http://foo.com/bar"/>
</reference>
<component name="ComponentB">
@@ -44,7 +43,7 @@
<reference name="reference2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</reference>
- <reference name="reference2a">
+ <reference name="reference2a" target="ComponentF">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</reference>
</component>
diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite
index 54eee7d657..a2b4f88dc3 100644
--- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite
+++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite
@@ -42,12 +42,15 @@
</service>
<service name="Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
</service>
<reference name="reference3" target="ComponentD/Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws/>
</reference>
<reference name="reference3a" target="ComponentE">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
</reference>
</component>
diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite
index dae3b3deb6..83584ed482 100644
--- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite
+++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite
@@ -27,9 +27,11 @@
</service>
<reference name="reference1" promote="ComponentB/reference2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar"/>
</reference>
<reference name="reference1a" promote="ComponentB/reference2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar"/>
</reference>
<component name="ComponentB">
@@ -43,7 +45,7 @@
<reference name="reference2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</reference>
- <reference name="reference2a" target="ComponentF">
+ <reference name="reference2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</reference>
</component>
diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite
index b521bbe01d..0021ec242b 100644
--- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite
+++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite
@@ -42,15 +42,12 @@
</service>
<service name="Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <binding.ws uri="http://foo.com/bar" />
</service>
<reference name="reference3" target="ComponentD/Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <binding.ws/>
</reference>
<reference name="reference3a" target="ComponentE">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
- <binding.ws />
</reference>
</component>
diff --git a/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java b/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
index f3ffd44cdb..5f16bc0bea 100644
--- a/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
+++ b/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
@@ -167,9 +167,7 @@ public class BuilderTestCase extends TestCase {
assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
- /*
if (!nonWiring) {
- */
// Should create component service $promoted$.ComponentB.Service2 on innermost component
// ComponentD, with <binding.ws> and uri="/ComponentB/Service2"
wsBinding = null;
@@ -185,14 +183,12 @@ public class BuilderTestCase extends TestCase {
svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
port = svc.getPort("Service3Port");
assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
- /*
} else {
// Should not create component service $promoted$.ComponentB.Service2 on innermost component ComponentD
for (ComponentService service : componentD.getServices()) {
assert !"$promoted$.ComponentB.Service2".equals(service.getName());
}
}
- */
// Should add <binding.ws> to outer composite service CompositeA/Service1
wsBinding = null;
@@ -337,9 +333,7 @@ public class BuilderTestCase extends TestCase {
port = svc.getPort("Service3Port");
assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
- /*
if (!nonWiring) {
- */
// Should create component service $promoted$.ComponentB.Service2 on innermost component
// ComponentD, with <binding.ws> and uri="/ComponentB/Service2"
wsBinding = null;
@@ -355,14 +349,12 @@ public class BuilderTestCase extends TestCase {
svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
port = svc.getPort("Service3Port");
assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
- /*
} else {
// Should not create component service $promoted$.ComponentB.Service2 on innermost component ComponentD
for (ComponentService service : componentD.getServices()) {
assert !"$promoted$.ComponentB.Service2".equals(service.getName());
}
}
- */
// Should add <binding.ws> to outer composite service CompositeA/Service1
wsBinding = null;
@@ -693,7 +685,7 @@ public class BuilderTestCase extends TestCase {
assert wsBinding.getWSDLDocument() == null;
}
- // Scenario 9: targets in references CBR2A and CDR3A and binding.ws at CDR3A
+ // Scenario 9: target in reference CDR3A and binding.ws uri= at CAR1A
public void testScenario9() throws Exception {
System.out.println("====>Running testScenario9");
customBuilder = new CustomCompositeBuilder(false);
@@ -701,7 +693,7 @@ public class BuilderTestCase extends TestCase {
//TestUtils.printResults(customBuilder);
TestUtils.checkProblems(customBuilder);
checkScenario9Results();
- }
+ }
private void checkScenario9Results() {
Composite domainComposite = customBuilder.getDomainComposite();
@@ -712,14 +704,14 @@ public class BuilderTestCase extends TestCase {
if ("reference3a".equals(reference.getName())) {
componentRef = reference;
assertTrue(reference.getBindings().size() == 2);
- assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding);
+ assertTrue(reference.getBindings().get(0) instanceof SCABinding);
assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding);
}
}
assertTrue(componentRef != null);
- }
+ }
- // Scenario 10: targets in references CBR2A and CDR3A and binding.ws at CCR2A
+ // Scenario 10: targets in references CBR2A and CDR3A and binding.ws at CBR2A
public void testScenario10() throws Exception {
System.out.println("====>Running testScenario10");
customBuilder = new CustomCompositeBuilder(false);
@@ -727,9 +719,9 @@ public class BuilderTestCase extends TestCase {
//TestUtils.printResults(customBuilder);
TestUtils.checkProblems(customBuilder);
checkScenario10And11Results();
- }
+ }
- // Scenario 11: targets in references CBR2A and CDR3A and binding.ws at CBR2A
+ // Scenario 11: targets in references CBR2A and CDR3A and binding.ws at CCR2A
public void testScenario11() throws Exception {
System.out.println("====>Running testScenario11");
customBuilder = new CustomCompositeBuilder(false);
@@ -737,7 +729,7 @@ public class BuilderTestCase extends TestCase {
//TestUtils.printResults(customBuilder);
TestUtils.checkProblems(customBuilder);
checkScenario10And11Results();
- }
+ }
private void checkScenario10And11Results() {
Composite domainComposite = customBuilder.getDomainComposite();
@@ -759,7 +751,7 @@ public class BuilderTestCase extends TestCase {
assertTrue(componentRef != null);
}
- // Scenario 12: target in reference CDR3A and binding.ws uri= at CAR1A
+ // Scenario 12: targets in references CBR2A and CDR3A and binding.ws at CDR3A
public void testScenario12() throws Exception {
System.out.println("====>Running testScenario12");
customBuilder = new CustomCompositeBuilder(false);
@@ -767,7 +759,7 @@ public class BuilderTestCase extends TestCase {
//TestUtils.printResults(customBuilder);
TestUtils.checkProblems(customBuilder);
checkScenario12Results();
- }
+ }
private void checkScenario12Results() {
Composite domainComposite = customBuilder.getDomainComposite();
@@ -778,12 +770,12 @@ public class BuilderTestCase extends TestCase {
if ("reference3a".equals(reference.getName())) {
componentRef = reference;
assertTrue(reference.getBindings().size() == 2);
- assertTrue(reference.getBindings().get(0) instanceof SCABinding);
+ assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding);
assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding);
}
}
assertTrue(componentRef != null);
- }
+ }
// Scenario 13: target in reference CDR3A
public void testScenario13() throws Exception {
diff --git a/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java b/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
index 05b5596076..6ec2ea849e 100644
--- a/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
+++ b/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
@@ -106,14 +106,14 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
compositeIncludeBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeIncludeBuilderImpl(monitor);
//componentReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- //componentReferencePromotionWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferencePromotionWireBuilderImpl(assemblyFactory, monitor);
- //compositeReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceWireBuilderImpl(assemblyFactory, monitor);
+ //componentReferencePromotionWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferencePromotionWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
+ //compositeReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
compositeCloneBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeCloneBuilderImpl(monitor);
componentConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper, policyDefinitions, monitor);
compositeServiceConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeServiceConfigurationBuilderImpl(assemblyFactory);
compositeReferenceConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceConfigurationBuilderImpl(assemblyFactory);
compositeBindingURIBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper, policyDefinitions, monitor);
- componentServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServicePromotionBuilderImpl(assemblyFactory);
+ //componentServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServicePromotionBuilderImpl(assemblyFactory);
//compositeServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeServicePromotionBuilderImpl(assemblyFactory);
compositePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePromotionBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
compositePolicyBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePolicyBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
@@ -148,7 +148,7 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
compositeBindingURIBuilder.build(composite);
// Create promoted component services
- componentServicePromotionBuilder.build(composite);
+// componentServicePromotionBuilder.build(composite);
// Create promoted composite services
// compositeServicePromotionBuilder.build(composite);