cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r542696 - in /incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf: frontend/AbstractEndpointFactory.java service/factory/ReflectionServiceFactoryBean.java
Date Tue, 29 May 2007 23:30:25 GMT
Author: dkulp
Date: Tue May 29 16:30:24 2007
New Revision: 542696

URL: http://svn.apache.org/viewvc?view=rev&rev=542696
Log:
Put a better search algorithm in place for "findBest" scenarios

Modified:
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java?view=diff&rev=542696&r1=542695&r2=542696
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
Tue May 29 16:30:24 2007
@@ -144,6 +144,17 @@
     }
 
     protected EndpointInfo findBestEndpointInfo(List<ServiceInfo> serviceInfos) {
+        
+        QName qn = serviceFactory.getInterfaceName();
+        for (ServiceInfo serviceInfo : serviceInfos) {
+            Collection<EndpointInfo> eps = serviceInfo.getEndpoints();
+            for (EndpointInfo ep : eps) {
+                if (ep.getInterface().getName().equals(qn)) {
+                    return ep;
+                }
+            }
+        }        
+        
         EndpointInfo best = null;
         for (ServiceInfo serviceInfo : serviceInfos) {
             Collection<EndpointInfo> eps = serviceInfo.getEndpoints();

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=542696&r1=542695&r2=542696
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue May 29 16:30:24 2007
@@ -956,7 +956,7 @@
         throw new IllegalStateException("ServiceConfiguration must provide a value!");
     }
 
-    protected QName getInterfaceName() {
+    public QName getInterfaceName() {
         for (AbstractServiceConfiguration c : serviceConfigurations) {
             QName name = c.getInterfaceName();
             if (name != null) {



Mime
View raw message