cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r538638 - /incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
Date Wed, 16 May 2007 16:09:22 GMT
Author: eglynn
Date: Wed May 16 09:09:21 2007
New Revision: 538638

URL: http://svn.apache.org/viewvc?view=rev&rev=538638
Log:
Added convenience method to EndpointReferenceUtils.


Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?view=diff&rev=538638&r1=538637&r2=538638
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
Wed May 16 09:09:21 2007
@@ -621,7 +621,29 @@
         }
         return physical != null ? physical : logical;
     }
+
     
+    /**
+     * Renew logical endpoint reference via the Bus EndpointResolverRegistry.
+     * 
+     * @param logical the original abstract EPR (if still available)
+     * @param physical the concrete EPR to renew
+     * @return the renewed concrete EPR if appropriate, null otherwise
+     */
+    public static EndpointReferenceType renew(EndpointReferenceType logical,
+                                              EndpointReferenceType physical,
+                                              Bus bus) {
+        EndpointReferenceType renewed = null;
+        if (bus != null) {
+            EndpointResolverRegistry registry =
+                bus.getExtension(EndpointResolverRegistry.class);
+            if (registry != null) {
+                renewed = registry.renew(logical, physical);
+            }
+        }
+        return renewed != null ? renewed : physical;
+    }
+
     /**
      * Mint logical endpoint reference via the Bus EndpointResolverRegistry.
      * 



Mime
View raw message