summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-03-03 05:41:33 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-03-03 05:41:33 +0000
commit2ca48372345c7534e95158dcfae7464bda78ac2d (patch)
treea91a0e18fa8da0297fe0b83c3b3338f4cd36d690 /sca-java-2.x/trunk/modules/builder/src/main/java/org/apache
parentb0d42e607a8b9444c6534822da6eb7e5159016bc (diff)
Copy the test cases from binding-sca-runtime-axis2 and binding-sca-runtime-rmi into an itest
Change the code to pass binding.sca with mapped uri with the endpoint git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@918327 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder/src/main/java/org/apache')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java
index 42da4abed7..4c5bca204b 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java
+++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java
@@ -31,6 +31,7 @@ import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.ComponentService;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.builder.BuilderContext;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
@@ -195,6 +196,10 @@ public class BindingURIBuilderImpl implements CompositeBuilder {
// calculate the service binding URI
URI bindingURI = binding.getURI() == null ? null : new URI(binding.getURI());
+ if (binding instanceof SCABinding) {
+ // Per assembly spec, the @uri for service side binding.sca should be ignored
+ bindingURI = null;
+ }
// if the user has provided an absolute binding URI then use it
if (bindingURI != null && bindingURI.isAbsolute()) {
@@ -218,10 +223,12 @@ public class BindingURIBuilderImpl implements CompositeBuilder {
// calculate the base URI
URI baseURI = null;
- if (defaultBindings != null) {
- List<String> uris = defaultBindings.get(binding.getType());
- if (uris != null && uris.size() > 0) {
- baseURI = new URI(addSlashToPath(uris.get(0)));
+ if (!(binding instanceof SCABinding)) {
+ if (defaultBindings != null) {
+ List<String> uris = defaultBindings.get(binding.getType());
+ if (uris != null && uris.size() > 0) {
+ baseURI = new URI(addSlashToPath(uris.get(0)));
+ }
}
}