ws-scout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r538277 - /webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
Date Tue, 15 May 2007 18:56:57 GMT
Author: dims
Date: Tue May 15 11:56:56 2007
New Revision: 538277

URL: http://svn.apache.org/viewvc?view=rev&rev=538277
Log:
Fix for   SCOUT-34 - DiscoveryURLs aren't constructed correctly when there is more than 1
discoveryURLs for a businessEntity

Modified:
    webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
URL: http://svn.apache.org/viewvc/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java?view=diff&rev=538277&r1=538276&r2=538277
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
Tue May 15 11:56:56 2007
@@ -537,18 +537,23 @@
 
             biz.setBusinessServices(bss);
 
-			// External Links
+            // External Links
             Iterator exiter = org.getExternalLinks().iterator();
-			while (exiter.hasNext()) {
-				ExternalLink link = (ExternalLink) exiter.next();
-				/** Note: jUDDI adds its own discoverURL as the businessEntity* */
-				DiscoveryURLs emptyDUs = biz.addNewDiscoveryURLs();
-				DiscoveryURL emptyDU = emptyDUs.addNewDiscoveryURL();
-				emptyDU.setUseType("businessEntityExt");
+            DiscoveryURLs emptyDUs = null;
+            boolean first = true;
+            while (exiter.hasNext()) {
+                ExternalLink link = (ExternalLink) exiter.next();
+                /** Note: jUDDI adds its own discoverURL as the businessEntity* */
+                if (first) {
+                    emptyDUs = biz.addNewDiscoveryURLs();
+                    first = false;
+                }
+                DiscoveryURL emptyDU = emptyDUs.addNewDiscoveryURL();
+                emptyDU.setUseType("businessEntityExt");
 				
-				if (link.getExternalURI() != null) {
-					emptyDU.setStringValue(link.getExternalURI());
-				}
+                if (link.getExternalURI() != null) {
+                    emptyDU.setStringValue(link.getExternalURI());
+                }
             }
 			
 		  biz.setIdentifierBag(getIdentifierBagFromExternalIdentifiers(org.getExternalIdentifiers()));



---------------------------------------------------------------------
To unsubscribe, e-mail: scout-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: scout-dev-help@ws.apache.org


Mime
View raw message