ws-scout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r153320 - webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
Date Fri, 11 Feb 2005 02:22:43 GMT
Author: geirm
Date: Thu Feb 10 18:22:42 2005
New Revision: 153320

URL: http://svn.apache.org/viewcvs?view=rev&rev=153320
Log:
When making a jUDDI ServiceInfo from a JAXR Service, 
try to mine out the keyinformation that we do have

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/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java?view=diff&r1=153319&r2=153320
==============================================================================
--- 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
Thu Feb 10 18:22:42 2005
@@ -160,11 +160,31 @@
             String name = iname.getValue();
             //bs.setDefaultNameString( name, Locale.getDefault().getLanguage());
             bs.addName(new Name(name, Locale.getDefault().getLanguage()));
-            /**
-             bs.setBusinessKey( ((RegistryObject) serve).getKey().getId() );
-             **/
-
             bs.addDescription(new Description(((RegistryObject) serve).getDescription().getValue()));
+
+            Organization o = serve.getProvidingOrganization();
+
+            /*
+             * there may not always be a key...
+             */
+            if (o != null) {
+                Key k = o.getKey();
+
+                if (k != null) {
+                    bs.setBusinessKey(k.getId());
+                }
+            }
+            else {
+                /*
+                 * gmj - I *think* this is the right thing to do
+                 */
+                throw new JAXRException("Service has no associated organization");
+            }
+
+            if (serve.getKey() != null) {
+                bs.setServiceKey(serve.getKey().getId());
+            }
+
             System.out.println("BusinessService=" + bs.toString());
         } catch (Exception ud)
         {



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