cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1462537 - /cxf/branches/2.7.x-fixes/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java
Date Fri, 29 Mar 2013 17:04:47 GMT
Author: dkulp
Date: Fri Mar 29 17:04:47 2013
New Revision: 1462537

URL: http://svn.apache.org/r1462537
Log:
Merged revisions 1462535 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1462535 | dkulp | 2013-03-29 13:02:37 -0400 (Fri, 29 Mar 2013) | 2 lines

  [CXF-4898] Allow specify extra "types" for WS-Discovery registration

........

Modified:
    cxf/branches/2.7.x-fixes/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java

Modified: cxf/branches/2.7.x-fixes/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java?rev=1462537&r1=1462536&r2=1462537&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java
(original)
+++ cxf/branches/2.7.x-fixes/services/ws-discovery/ws-discovery-api/src/main/java/org/apache/cxf/ws/discovery/internal/WSDiscoveryServiceImpl.java
Fri Mar 29 17:04:47 2013
@@ -125,10 +125,28 @@ public class WSDiscoveryServiceImpl impl
         ht.setScopes(new ScopesType());
         ht.setMetadataVersion(1);
         
-        QName sn = ServiceModelUtil.getServiceQName(server.getEndpoint().getEndpointInfo());
-        ht.getTypes().add(sn);
+
+        Object o = server.getEndpoint().get("ws-discovery-types");
+        if (o instanceof QName) {
+            ht.getTypes().add((QName)o);
+        } else if (o instanceof List) {
+            for (Object o2: (List<?>)o) {
+                if (o2 instanceof QName) {
+                    ht.getTypes().add((QName)o2);
+                } else if (o2 instanceof String) {
+                    ht.getTypes().add(QName.valueOf((String)o2));
+                }
+            }
+        } else if (o instanceof String) {
+            ht.getTypes().add(QName.valueOf((String)o));
+        } 
+        if (ht.getTypes().isEmpty()) {
+            QName sn = ServiceModelUtil.getServiceQName(server.getEndpoint().getEndpointInfo());
+            ht.getTypes().add(sn);
+        }
+
         
-        Object o = server.getEndpoint().get("ws-discovery-scopes");
+        o = server.getEndpoint().get("ws-discovery-scopes");
         if (o != null) {
             setScopes(ht, o);
         }



Mime
View raw message