diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-21 11:59:57 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-21 11:59:57 +0000 |
commit | cc22c10642e9e496592f71aa496b75ff40dbe326 (patch) | |
tree | 2edff9a6128416088db1065b2637aeff6b71f82f /sca-java-2.x/trunk/modules/builder/src/main/java/org/apache | |
parent | 884a365865b7b6bc3dc0c01aae1af2d620586fb4 (diff) |
BWS20006 - if a component reference binding.ws names a WSDL service with more than one port then pick the first port.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@956539 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/EndpointReferenceBuilderImpl.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java index 82b3eaed1f..7af1451f68 100644 --- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java +++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java @@ -19,6 +19,7 @@ package org.apache.tuscany.sca.builder.impl; +import java.net.URI; import java.util.ArrayList; import java.util.HashSet; import java.util.List; @@ -311,6 +312,23 @@ public class EndpointReferenceBuilderImpl { reference.getEndpointReferences().add(endpointRef); continue; } // end if + + // if it's an absolute URI then assume that it's a resolved binding + try { + URI tmpURI = new URI(uri); + if (tmpURI.isAbsolute()){ + // The user has configured a binding with an absolute URI so assume + // they know what they are doing and mark in as already resolved. + EndpointReference endpointRef = createEndpointRef(component, reference, binding, null, false); + endpointRef.setTargetEndpoint(createEndpoint(false)); + endpointRef.setStatus(EndpointReference.Status.RESOLVED_BINDING); + reference.getEndpointReferences().add(endpointRef); + continue; + } + } catch (Exception ex){ + // do nothing and go to the next bit of code + // which assumes that the URI is an SCA usi + } // The user has put something in the binding uri but we don't know if it's // a real URI or a target name. We can't tell until we have access to the |