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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]