cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1435354 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java
Date Fri, 18 Jan 2013 21:30:17 GMT
Author: sergeyb
Date: Fri Jan 18 21:30:16 2013
New Revision: 1435354

URL: http://svn.apache.org/viewvc?rev=1435354&view=rev
Log:
[CXF-4767] Making JAX-RS endpoints interact well with WS-Discovery, setting JAX-RS EndpointInfo
QName same as Service QName instead of keeping it null

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
    cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java?rev=1435354&r1=1435353&r2=1435354&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
Fri Jan 18 21:30:16 2013
@@ -127,7 +127,7 @@ public class AbstractJAXRSFactoryBean ex
      * transport is http, binding is JAX-RS binding, endpoint address is from
      * server mainline.
      */    
-    protected EndpointInfo createEndpointInfo() throws BusException {
+    protected EndpointInfo createEndpointInfo(Service service) throws BusException {
         String transportId = getTransportId();
         if (transportId == null && getAddress() != null) {
             DestinationFactory df = getDestinationFactory();
@@ -159,7 +159,7 @@ public class AbstractJAXRSFactoryBean ex
         if (!StringUtils.isEmpty(publishedEndpointUrl)) {
             ei.setProperty("publishedEndpointUrl", publishedEndpointUrl);
         }
-        
+        ei.setName(service.getName());
         serviceFactory.sendEvent(FactoryBeanListener.Event.ENDPOINTINFO_CREATED, ei);
 
         return ei;
@@ -220,7 +220,7 @@ public class AbstractJAXRSFactoryBean ex
             service = serviceFactory.create();
         }
 
-        EndpointInfo ei = createEndpointInfo();
+        EndpointInfo ei = createEndpointInfo(service);
         Endpoint ep = new EndpointImpl(getBus(), service, ei);
         
         if (properties != null) {

Modified: cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java?rev=1435354&r1=1435353&r2=1435354&view=diff
==============================================================================
--- cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java
(original)
+++ cxf/trunk/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/listeners/WSDiscoveryServerListener.java
Fri Jan 18 21:30:16 2013
@@ -85,8 +85,10 @@ public class WSDiscoveryServerListener i
         InterfaceInfo ii = ei.getInterface();
         if (ii != null) {
             return ii.getName();
-        } else {
+        } else if (ei.getService() != null) {
             return ei.getService().getName();
+        } else {
+            return ei.getName();
         }
     }
     



Mime
View raw message