ws-scout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r558579 - /webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
Date Mon, 23 Jul 2007 01:18:43 GMT
Author: kstam
Date: Sun Jul 22 18:18:42 2007
New Revision: 558579

URL: http://svn.apache.org/viewvc?view=rev&rev=558579
Log:
SCOUT-46 applying patch

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

Modified: webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
URL: http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java?view=diff&rev=558579&r1=558578&r2=558579
==============================================================================
--- webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
(original)
+++ webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
Sun Jul 22 18:18:42 2007
@@ -48,6 +48,7 @@
 import org.apache.ws.scout.uddi.Address;
 import org.apache.ws.scout.uddi.AddressLine;
 import org.apache.ws.scout.uddi.BindingTemplate;
+import org.apache.ws.scout.uddi.BindingTemplates;
 import org.apache.ws.scout.uddi.BusinessEntity;
 import org.apache.ws.scout.uddi.BusinessService;
 import org.apache.ws.scout.uddi.BusinessServices;
@@ -243,7 +244,7 @@
 				// http://issues.apache.org/jira/browse/JUDDI-78
 				kr.setTModelKey("");
 			} else {
-            kr.setTModelKey(key.getId());
+                kr.setTModelKey(key.getId());
 			}
             kr.setKeyName("Concept");
 
@@ -330,7 +331,11 @@
 
 			bs.setCategoryBag(getCategoryBagFromClassifications(serve.getClassifications()));
 
-   		    // TODO: need to do ServiceBindings->BindingTemplates
+            //Add the ServiceBinding information
+            BindingTemplates bt = getBindingTemplates(serve.getServiceBindings());
+            if (bt != null) {
+                bs.setBindingTemplates(bt);
+            }
    		    
             log.debug("BusinessService=" + bs.toString());
 		} catch (Exception ud) {
@@ -813,5 +818,23 @@
 			throw new JAXRException("Apache JAXR Impl:", ud);
 		}
     }
-    
+
+    private static BindingTemplates getBindingTemplates(Collection serviceBindings)
+        throws JAXRException {
+        BindingTemplates bt = BindingTemplates.Factory.newInstance();
+        if(serviceBindings != null) {
+            Iterator iter = serviceBindings.iterator();
+            int currLoc = 0;
+            BindingTemplate[] bindingTemplateArray = new BindingTemplate[serviceBindings.size()];
+            while(iter.hasNext()) {
+                ServiceBinding sb = (ServiceBinding)iter.next();
+                bindingTemplateArray[currLoc] = getBindingTemplateFromJAXRSB(sb);
+                currLoc++;
+            }
+            if (bindingTemplateArray != null) {
+                bt.setBindingTemplateArray(bindingTemplateArray);
+            }
+        }
+        return bt; 
+    } 
 }



---------------------------------------------------------------------
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