You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by ks...@apache.org on 2012/02/06 19:11:18 UTC
svn commit: r1241100 [25/41] - in /juddi/scout/site: ./ apidocs/
apidocs/org/apache/ws/scout/model/uddi/v2/
apidocs/org/apache/ws/scout/model/uddi/v2/class-use/
apidocs/org/apache/ws/scout/registry/
apidocs/org/apache/ws/scout/registry/class-use/ apido...
Modified: juddi/scout/site/cobertura/org.apache.ws.scout.util.XMLUtils.html
URL: http://svn.apache.org/viewvc/juddi/scout/site/cobertura/org.apache.ws.scout.util.XMLUtils.html?rev=1241100&r1=1241099&r2=1241100&view=diff
==============================================================================
--- juddi/scout/site/cobertura/org.apache.ws.scout.util.XMLUtils.html (original)
+++ juddi/scout/site/cobertura/org.apache.ws.scout.util.XMLUtils.html Mon Feb 6 18:10:50 2012
@@ -97,6 +97,6 @@
<td class="src"><pre class="src"> }</pre></td></tr>
</table>
-<div class="footer">Report generated by <a href="http://cobertura.sourceforge.net/" target="_top">Cobertura</a> 1.9 on 10/14/10 3:19 PM.</div>
+<div class="footer">Report generated by <a href="http://cobertura.sourceforge.net/" target="_top">Cobertura</a> 1.9 on 2/6/12 1:04 PM.</div>
</body>
</html>
Modified: juddi/scout/site/cpd.html
URL: http://svn.apache.org/viewvc/juddi/scout/site/cpd.html?rev=1241100&r1=1241099&r2=1241100&view=diff
==============================================================================
--- juddi/scout/site/cpd.html (original)
+++ juddi/scout/site/cpd.html Mon Feb 6 18:10:50 2012
@@ -64,7 +64,7 @@
- Last Published: 14 Oct 2010
+ Last Published: 06 Feb 2012
</div>
<div class="clear">
<hr/>
@@ -409,169 +409,10 @@
<th>Line</th>
</tr>
<tr class="b"><td>org/apache/ws/scout/util/ScoutJaxrUddiHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#247">247</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#238">238</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> log.debug("BindingTemplate=" + bt.toString());
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
- return bt;
- }
-
- public static PublisherAssertion getPubAssertionFromJAXRAssociation(
- Association association) throws JAXRException {
- PublisherAssertion pa = objectFactory.createPublisherAssertion();
- try {
- if (association.getSourceObject().getKey() != null &&
- association.getSourceObject().getKey().getId() != null) {
- pa.setFromKey(association.getSourceObject().getKey().getId());
- }
-
- if (association.getTargetObject().getKey() != null &&
- association.getTargetObject().getKey().getId() != null) {
- pa.setToKey(association.getTargetObject().getKey().getId());
- }
- Concept c = association.getAssociationType();
- String v = c.getValue();
- KeyedReference kr = objectFactory.createKeyedReference();
- Key key = c.getKey();
- if (key == null) {
- // TODO:Need to check this. If the concept is a predefined
- // enumeration, the key can be the parent classification scheme
- key = c.getClassificationScheme().getKey();
- }
- if (key != null && key.getId() != null) {
- kr.setTModelKey(key.getId());
- }
- kr.setKeyName("Concept");
-
- if (v != null) {
- kr.setKeyValue(v);
- }
-
- pa.setKeyedReference(kr);
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
- return pa;
- }
-
- public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(
- String key) throws JAXRException {
- PublisherAssertion pa = objectFactory.createPublisherAssertion();
- try {
- StringTokenizer token = new StringTokenizer(key, ":");
- if (token.hasMoreTokens()) {
- pa.setFromKey(getToken(token.nextToken()));
- pa.setToKey(getToken(token.nextToken()));
- KeyedReference kr = objectFactory.createKeyedReference();
- // Sometimes the Key is UUID:something
- String str = getToken(token.nextToken());
- if ("UUID".equals(str))
- str += ":" + getToken(token.nextToken());
- kr.setTModelKey(str);
- kr.setKeyName(getToken(token.nextToken()));
- kr.setKeyValue(getToken(token.nextToken()));
- pa.setKeyedReference(kr);
- }
-
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
- return pa;
- }
-
- public static BusinessService getBusinessServiceFromJAXRService(
- Service service) throws JAXRException {
- BusinessService bs = objectFactory.createBusinessService();
- try {
- InternationalString iname = service.getName();
-
- addNames(bs.getName(), iname);
-
- InternationalString idesc = service.getDescription();
-
- addDescriptions(bs.getDescription(), idesc);
-
- Organization o = service.getProvidingOrganization();
-
- /*
- * there may not always be a key...
- */
- if (o != null) {
- Key k = o.getKey();
-
- if (k != null && k.getId() != 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 (service.getKey() != null && service.getKey().getId() != null) {
- bs.setServiceKey(service.getKey().getId());
- } else {
- bs.setServiceKey("");
- }
-
- CategoryBag catBag = getCategoryBagFromClassifications(service.getClassifications());
- if (catBag!=null) {
- bs.setCategoryBag(catBag);
- }
-
- //Add the ServiceBinding information
- BindingTemplates bt = getBindingTemplates(service.getServiceBindings());
- if (bt != null) {
- bs.setBindingTemplates(bt);
- }
-
- log.debug("BusinessService=" + bs.toString());
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
- return bs;
- }
-
- public static TModel getTModelFromJAXRClassificationScheme(
- ClassificationScheme classificationScheme) throws JAXRException {
- TModel tm = objectFactory.createTModel();
- try {
- /*
- * a fresh scheme might not have a key
- */
-
- Key k = classificationScheme.getKey();
-
- if (k != null && k.getId() != null) {
- tm.setTModelKey(k.getId());
- } else {
- tm.setTModelKey("");
- }
-
- /*
- * There's no reason to believe these are here either
- */
-
- Slot s = classificationScheme.getSlot("authorizedName");</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
-<tr class="b"><td>org/apache/ws/scout/util/ScoutJaxrUddiHelper.java</td>
<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#763">763</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#757">757</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#765">765</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> return uri;
}
@@ -1132,10 +973,10 @@
<th>Line</th>
</tr>
<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#493">493</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#489">489</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#437">437</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#472">472</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> }
}
@@ -1250,7 +1091,7 @@
<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#551">551</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#543">543</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#551">551</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> .getBusinessServiceFromJAXRService((Service) iter
.next());
@@ -1460,7 +1301,7 @@
<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#458">458</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#450">450</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#458">458</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> tm.getOverviewDoc().add(getOverviewDocFromExternalLink((ExternalLink)externalLinks.iterator().next()));
}
@@ -1547,182 +1388,243 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#301">301</a></td>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutJaxrUddiHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#303">303</a></td>
</tr>
-<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#259">259</a></td>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#302">302</a></td>
</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> }
- }
- //External Links
- DiscoveryURLs durls = entity.getDiscoveryURLs();
- if (durls != null)
- {
- List<DiscoveryURL> discoveryURL_List = durls.getDiscoveryURL();
- for (DiscoveryURL discoveryURL : discoveryURL_List) {
- ExternalLink link = new ExternalLinkImpl(lifeCycleManager);
- link.setExternalURI(discoveryURL.getValue());
- org.addExternalLink(link);
- }
- }
-
- org.addExternalIdentifiers(getExternalIdentifiers(entity.getIdentifierBag(), lifeCycleManager));
- org.addClassifications(getClassifications(entity.getCategoryBag(), lifeCycleManager));
-
- return org;
- }
-
- private static PostalAddress getPostalAddress(AddressLine[] addressLineArr) throws JAXRException {
- PostalAddress pa = new PostalAddressImpl();
- HashMap<String, String> hm = new HashMap<String, String>();
- for (AddressLine anAddressLineArr : addressLineArr) {
- hm.put(anAddressLineArr.getKeyName(), anAddressLineArr.getKeyValue());
- }
+<tr class="b"><td colspan='2'><div class="source"><pre> if ("UUID".equalsIgnoreCase(str))
+ str += ":" + getToken(token.nextToken());
+ kr.setTModelKey(str);
+ kr.setKeyName(getToken(token.nextToken()));
+ kr.setKeyValue(getToken(token.nextToken()));
+ pa.setKeyedReference(kr);
+ }
- if (hm.containsKey("STREET_NUMBER")) {
- pa.setStreetNumber(hm.get("STREET_NUMBER"));
- }
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
+ return pa;
+ }
- if (hm.containsKey("STREET")) {
- pa.setStreet(hm.get("STREET"));
- }
+ public static BusinessService getBusinessServiceFromJAXRService(
+ Service service) throws JAXRException {
+ BusinessService bs = objectFactory.createBusinessService();
+ try {
+ InternationalString iname = service.getName();
+
+ addNames(bs.getName(), iname);
+
+ InternationalString idesc = service.getDescription();
+
+ addDescriptions(bs.getDescription(), idesc);
- if (hm.containsKey("CITY")) {
- pa.setCity(hm.get("CITY"));
- }
+ Organization o = service.getProvidingOrganization();
- if (hm.containsKey("COUNTRY")) {
- pa.setCountry(hm.get("COUNTRY"));
- }
+ /*
+ * there may not always be a key...
+ */
+ if (o != null) {
+ Key k = o.getKey();
- if (hm.containsKey("POSTALCODE")) {
- pa.setPostalCode(hm.get("POSTALCODE"));
- }
+ if (k != null && k.getId() != 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 (hm.containsKey("STATE")) {
- pa.setStateOrProvince(hm.get("STATE"));
- }
+ if (service.getKey() != null && service.getKey().getId() != null) {
+ bs.setServiceKey(service.getKey().getId());
+ } else {
+ bs.setServiceKey("");
+ }
- return pa;
- }
+ CategoryBag catBag = getCategoryBagFromClassifications(service.getClassifications());
+ if (catBag!=null) {
+ bs.setCategoryBag(catBag);
+ }
- private static InternationalString getIString(String lang, String str, LifeCycleManager lifeCycleManager)
- throws JAXRException
- {
- if (str!=null) {
- return lifeCycleManager.createInternationalString(getLocale(lang), str);
- } else {
- return null;
- }
- }
+ //Add the ServiceBinding information
+ BindingTemplates bt = getBindingTemplates(service.getServiceBindings());
+ if (bt != null) {
+ bs.setBindingTemplates(bt);
+ }
+
+ log.debug("BusinessService=" + bs.toString());
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
+ return bs;
+ }
- public static InternationalString getIString(String str, LifeCycleManager lifeCycleManager)
- throws JAXRException
- {
- return lifeCycleManager.createInternationalString(str);
- }
+ public static TModel getTModelFromJAXRClassificationScheme(
+ ClassificationScheme classificationScheme) throws JAXRException {
+ TModel tm = objectFactory.createTModel();
+ try {
+ /*
+ * a fresh scheme might not have a key
+ */
- public static Service getService(BusinessService businessService, LifeCycleManager lifeCycleManager)
- throws JAXRException
- {
- Service serve = new ServiceImpl(lifeCycleManager);
+ Key k = classificationScheme.getKey();
- String keystr = businessService.getServiceKey();
+ if (k != null && k.getId() != null) {
+ tm.setTModelKey(k.getId());
+ } else {
+ tm.setTModelKey("");
+ }
- if (keystr != null)
- {
- serve.setKey(lifeCycleManager.createKey(keystr));
- }</pre>
+ /*
+ * There's no reason to believe these are here either
+ */
+
+ Slot s = classificationScheme.getSlot("authorizedName");</pre>
</div>
</td></tr>
<table class="bodyTable"></p>
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#150">150</a></td>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutJaxrUddiHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#247">247</a></td>
</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#153">153</a></td>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#246">246</a></td>
</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> public RegistryV3Impl(Properties props) {
- super();
+<tr class="b"><td colspan='2'><div class="source"><pre> log.debug("BindingTemplate=" + bt.toString());
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
+ return bt;
+ }
- this.init(props);
- }
+ public static PublisherAssertion getPubAssertionFromJAXRAssociation(
+ Association association) throws JAXRException {
+ PublisherAssertion pa = objectFactory.createPublisherAssertion();
+ try {
+ if (association.getSourceObject().getKey() != null &&
+ association.getSourceObject().getKey().getId() != null) {
+ pa.setFromKey(association.getSourceObject().getKey().getId());
+ }
+
+ if (association.getTargetObject().getKey() != null &&
+ association.getTargetObject().getKey().getId() != null) {
+ pa.setToKey(association.getTargetObject().getKey().getId());
+ }
+ Concept c = association.getAssociationType();
+ String v = c.getValue();
+ KeyedReference kr = objectFactory.createKeyedReference();
+ Key key = c.getKey();
+ if (key == null) {
+ // TODO:Need to check this. If the concept is a predefined
+ // enumeration, the key can be the parent classification scheme
+ key = c.getClassificationScheme().getKey();
+ }
+ if (key != null && key.getId() != null) {
+ kr.setTModelKey(key.getId());
+ }
+ kr.setKeyName("Concept");
- /**
- *
- */
- private void init(Properties props) {
- // We need to have a non-null Properties
- // instance so initialization takes place.
- if (props == null)
- props = new Properties();
+ if (v != null) {
+ kr.setKeyValue(v);
+ }
- // Override defaults with specific specific values
+ pa.setKeyedReference(kr);
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
+ return pa;
+ }
+
+ public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(
+ String key) throws JAXRException {
+ PublisherAssertion pa = objectFactory.createPublisherAssertion();
try {
- String iURL = props.getProperty(INQUIRY_ENDPOINT_PROPERTY_NAME);
- if (iURL != null)
- this.setInquiryURI(new URI(iURL));
- else
- this.setInquiryURI(new URI(DEFAULT_INQUIRY_ENDPOINT));
-
- String pURL = props.getProperty(PUBLISH_ENDPOINT_PROPERTY_NAME);
- if (pURL != null)
- this.setPublishURI(new URI(pURL));
- else
- this.setPublishURI(new URI(DEFAULT_PUBLISH_ENDPOINT));
-
- String sURL = props.getProperty(SECURITY_ENDPOINT_PROPERTY_NAME);
- if (sURL != null)
- this.setSecurityURI(new URI(sURL));
- else
- this.setSecurityURI(new URI(DEFAULT_SECURITY_ENDPOINT));
-
- String aURL = props.getProperty(ADMIN_ENDPOINT_PROPERTY_NAME);
- if (aURL != null)
- this.setAdminURI(new URI(aURL));
- else
- this.setAdminURI(new URI(DEFAULT_ADMIN_ENDPOINT));
- } catch (URISyntaxException muex) {
- throw new RuntimeException(muex);
- }
+ StringTokenizer token = new StringTokenizer(key, "|");
+ if (token.hasMoreTokens()) {
+ pa.setFromKey(getToken(token.nextToken()));
+ pa.setToKey(getToken(token.nextToken()));
+ KeyedReference kr = objectFactory.createKeyedReference();
+ // Sometimes the Key is UUID:something
+ String str = getToken(token.nextToken());
+ if ("UUID".equalsIgnoreCase(str))</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#411">411</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#393">393</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> }
+ serve.addClassifications(getClassifications(businessService.getCategoryBag(), lifeCycleManager));
- String secProvider = props.getProperty(SECURITY_PROVIDER_PROPERTY_NAME);
- if (secProvider != null)
- this.setSecurityProvider(secProvider);
- else
- this.setSecurityProvider(DEFAULT_SECURITY_PROVIDER);
+ return serve;
+ }
- String protoHandler = props.getProperty(PROTOCOL_HANDLER_PROPERTY_NAME);
- if (protoHandler != null)
- this.setProtocolHandler(protoHandler);
- else
- this.setProtocolHandler(DEFAULT_PROTOCOL_HANDLER);
+ public static Service getService(ServiceInfo serviceInfo, LifeCycleManager lifeCycleManager)
+ throws JAXRException
+ {
+ Service service = new ServiceImpl(lifeCycleManager);
- String uddiVer = props.getProperty(UDDI_VERSION_PROPERTY_NAME);
- if (uddiVer != null)
- this.setUddiVersion(uddiVer);
- else
- this.setUddiVersion(DEFAULT_UDDI_VERSION);
+ String keystr = serviceInfo.getServiceKey();
- String uddiNS = props.getProperty(UDDI_NAMESPACE_PROPERTY_NAME);
- if (uddiNS != null)
- this.setUddiNamespace(uddiNS);
- else
- this.setUddiNamespace(DEFAULT_UDDI_NAMESPACE);
+ if (keystr != null)
+ {
+ service.setKey(lifeCycleManager.createKey(keystr));
+ }
- String transClass = props.getProperty(TRANSPORT_CLASS_PROPERTY_NAME);
- if (transClass != null)
- this.setTransport(this.getTransport(transClass));
- else
- this.setTransport(this.getTransport(DEFAULT_TRANSPORT_CLASS));
-
- try
+ List<Name> namesList = serviceInfo.getName();
+ InternationalString is = null;
+ for (Name n : namesList) {
+ if (is == null) {
+ is = lifeCycleManager.createInternationalString(getLocale(n.getLang()), n.getValue());
+ } else {
+ is.setValue(getLocale(n.getLang()), n.getValue());
+ }
+ }
+ service.setName(is);
+ return service;
+ }
+
+ public static ServiceBinding getServiceBinding(BindingTemplate businessTemplate, LifeCycleManager lifeCycleManager)
+ throws JAXRException
+ {
+ ServiceBinding serviceBinding = new ServiceBindingImpl(lifeCycleManager);
+
+ String keystr = businessTemplate.getServiceKey();
+ if (keystr != null)
{
- JAXBContext v3context = JAXBContextUtil.getContext(JAXBContextUtil.UDDI_V3_VERSION);</pre>
+ Service svc = new ServiceImpl(lifeCycleManager);
+ svc.setKey(lifeCycleManager.createKey(keystr));
+ ((ServiceBindingImpl)serviceBinding).setService(svc);
+ }
+ String bindingKey = businessTemplate.getBindingKey();
+ if(bindingKey != null) serviceBinding.setKey(new KeyImpl(bindingKey));
+
+ //Access URI
+ AccessPoint access = businessTemplate.getAccessPoint();
+ if (access != null) serviceBinding.setAccessURI(access.getValue());
+
+ //Description
+ Description desc = null;
+ if (businessTemplate.getDescription().size()>0) desc = businessTemplate.getDescription().get(0);
+ if (desc!=null) {
+ serviceBinding.setDescription(new InternationalStringImpl(desc.getValue()));
+ }
+ /**Section D.10 of JAXR 1.0 Specification */
+
+ TModelInstanceDetails details = businessTemplate.getTModelInstanceDetails();</pre>
</div>
</td></tr>
<table class="bodyTable"></p>
@@ -1733,7 +1635,7 @@
<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#684">684</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#678">678</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#686">686</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> addarr[addarrPos] = ScoutJaxrUddiV3Helper.getAddress(post);
addarrPos++;
@@ -1809,197 +1711,6 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/BusinessQueryManagerImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerImpl.html#964">964</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/BusinessQueryManagerV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerV3Impl.html#939">939</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> } catch (RegistryV3Exception re) {
- throw new JAXRException(re);
- }
- return new BulkResponseImpl(orgs);
- }
- else if (LifeCycleManager.SERVICE.equalsIgnoreCase(id)) {
- List<String> a = new ArrayList<String>();
- a.add("%");
-
- BulkResponse br = this.findServices(null,null, a, null, null);
-
- return br;
- }
- else
- {
- throw new JAXRException("Unsupported type for getRegistryObjects() :" + id);
- }
-
- }
-
- static FindQualifiers mapFindQualifiers(Collection jaxrQualifiers) throws UnsupportedCapabilityException
- {
- if (jaxrQualifiers == null)
- {
- return null;
- }
- FindQualifiers result = objectFactory.createFindQualifiers();
- for (Iterator i = jaxrQualifiers.iterator(); i.hasNext();)
- {
- String jaxrQualifier = (String) i.next();
- String juddiQualifier = jaxrQualifier;
- if (juddiQualifier == null)
- {
- throw new UnsupportedCapabilityException("jUDDI does not support FindQualifer: " + jaxrQualifier);
- }
- result.getFindQualifier().add(juddiQualifier);
- }
- return result;
- }
-
- static Name[] mapNamePatterns(Collection namePatterns)
- throws JAXRException
- {
- if (namePatterns == null)
- return null;
- Name[] result = new Name[namePatterns.size()];
- int currLoc = 0;
- for (Iterator i = namePatterns.iterator(); i.hasNext();)
- {
- Object obj = i.next();
- Name name = objectFactory.createName();
- if (obj instanceof String) {
- name.setValue((String)obj);
- } else if (obj instanceof LocalizedString) {
- LocalizedString ls = (LocalizedString)obj;
- name.setValue(ls.getValue());
- name.setLang(ls.getLocale().getLanguage());
- }
- result[currLoc] = name;
- currLoc++;
- }
- return result;
- }
-
- /**
- * Get the Auth Token from the registry
- *
- * @param connection
- * @param ireg
- * @return auth token
- * @throws JAXRException
- */
- private AuthToken getAuthToken(ConnectionImpl connection, IRegistryV3 ireg)</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#1151">1151</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#1160">1160</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> throws RegistryV3Exception {
- SaveTModel request = this.objectFactory.createSaveTModel();
-
- if (authInfo != null) {
- request.setAuthInfo(authInfo);
- }
-
- if (tModelArray != null) {
- request.getTModel().addAll(Arrays.asList(tModelArray));
- }
-
- TModelDetail tmd;
- JAXBElement<?> o = execute(this.objectFactory.createSaveTModel(request),
- this.getPublishURI());
- tmd = (TModelDetail) o.getValue();
- return tmd;
- }
-
- /**
- * Returns an implementation of Transport based on the className passed in.
- * If a null value is passed then the default Transport implementation
- * "org.apache.ws.scout.transport.AxisTransport" is created and returned.
- *
- * @return Transport
- */
- public Transport getTransport(String className) {
- Transport transport = null;
- Class transportClass = null;
-
- // If a Transport class name isn't supplied use
- // the default Transport implementation.
- if (className == null)
- className = DEFAULT_TRANSPORT_CLASS;
-
- try {
- // instruct class loader to load the TransportFactory
- transportClass = getClassForName(className);
- } catch (ClassNotFoundException cnfex) {
- throw new RuntimeException(cnfex);
- }
-
- try {
- // try to instantiate the TransportFactory
- transport = (Transport) transportClass.newInstance();
- } catch (Exception ex) {
- throw new RuntimeException(ex);
- }
-
- return transport;
- }
-
- /**
- *
- * @param name
- * @return The class object for the name given
- * @throws ClassNotFoundException
- * @throws NoClassDefFoundError
- */
- public static Class getClassForName(String name)
- throws ClassNotFoundException, NoClassDefFoundError {
- Class clazz = null;
-
- try {
- // log.info("Using the Context ClassLoader");
- ClassLoader ccl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
-
- clazz = Class.forName(name, true, ccl);
- } catch (Exception e) {
- log.debug("Failed to load the class " + name + " with context class loader " + e);
- }
-
- if (null == clazz) {
- ClassLoader scl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
-
- try {
- clazz = Class.forName(name, true, scl);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- return clazz;
- }
-}</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
<tr class="b"><td>org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java</td>
<td><a href="./xref/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.html#925">925</a></td>
</tr>
@@ -2087,7 +1798,7 @@
keyarr[currLoc] = key.getId();
currLoc++;
}
- // Save business
+ // Delete operation
DispositionReport bd = (DispositionReport) executeOperation(keyarr, op);
List<Result> resultList = bd.getResult();
keyResultArr = new Result[resultList.size()];
@@ -2148,22 +1859,93 @@
bulk.setCollection(coll);
bulk.setExceptions(exceptions);
- return bulk;
- }
+ return bulk;
+ }
+
+ public BulkResponse saveClassificationSchemes(Collection schemes) throws JAXRException {
+ //Now we need to convert the collection into a vector for juddi
+ BulkResponseImpl bulk = new BulkResponseImpl();
+ TModel[] entityarr = new TModel[schemes.size()];
+
+ LinkedHashSet<Key> coll = new LinkedHashSet<Key>();
+ Collection<Exception> exceptions = new ArrayList<Exception>();
+
+ Iterator iter = schemes.iterator();
+ int currLoc = 0;
+ while (iter.hasNext()) {
+ try {
+ TModel en =</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#322">322</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#306">306</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> hm.put(anAddressLineArr.getKeyName(), anAddressLineArr.getValue());
+ }
+
+ if (hm.containsKey("STREET_NUMBER")) {
+ pa.setStreetNumber(hm.get("STREET_NUMBER"));
+ }
+
+ if (hm.containsKey("STREET")) {
+ pa.setStreet(hm.get("STREET"));
+ }
+
+ if (hm.containsKey("CITY")) {
+ pa.setCity(hm.get("CITY"));
+ }
+
+ if (hm.containsKey("COUNTRY")) {
+ pa.setCountry(hm.get("COUNTRY"));
+ }
+
+ if (hm.containsKey("POSTALCODE")) {
+ pa.setPostalCode(hm.get("POSTALCODE"));
+ }
+
+ if (hm.containsKey("STATE")) {
+ pa.setStateOrProvince(hm.get("STATE"));
+ }
+
+ return pa;
+ }
+
+ private static InternationalString getIString(String lang, String str, LifeCycleManager lifeCycleManager)
+ throws JAXRException
+ {
+ if (str!=null) {
+ return lifeCycleManager.createInternationalString(getLocale(lang), str);
+ } else {
+ return null;
+ }
+ }
+
+ public static InternationalString getIString(String str, LifeCycleManager lifeCycleManager)
+ throws JAXRException
+ {
+ return lifeCycleManager.createInternationalString(str);
+ }
+
+ public static Service getService(BusinessService businessService, LifeCycleManager lifeCycleManager)
+ throws JAXRException
+ {
+ Service serve = new ServiceImpl(lifeCycleManager);
- public BulkResponse saveClassificationSchemes(Collection schemes) throws JAXRException {
- //Now we need to convert the collection into a vector for juddi
- BulkResponseImpl bulk = new BulkResponseImpl();
- TModel[] entityarr = new TModel[schemes.size()];
+ String keystr = businessService.getServiceKey();
- LinkedHashSet<Key> coll = new LinkedHashSet<Key>();
- Collection<Exception> exceptions = new ArrayList<Exception>();
+ if (keystr != null)
+ {
+ serve.setKey(lifeCycleManager.createKey(keystr));
+ }
- Iterator iter = schemes.iterator();
- int currLoc = 0;
- while (iter.hasNext()) {
- try {
- TModel en =</pre>
+ List<Name> namesList = businessService.getName();</pre>
</div>
</td></tr>
<table class="bodyTable"></p>
@@ -2171,10 +1953,10 @@
<th>Line</th>
</tr>
<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#265">265</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#261">261</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#222">222</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#245">245</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> user.setType(contact.getUseType());
user.setPersonName(new PersonNameImpl(pname));
@@ -2340,12 +2122,12 @@
<th>Line</th>
</tr>
<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#397">397</a></td>
+<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#336">336</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#395">395</a></td>
+<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#355">355</a></td>
</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> }
+<tr class="b"><td colspan='2'><div class="source"><pre> }
return uddiResponse;
}
@@ -2499,47 +2281,6 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#115">115</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#213">213</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> List<Description> descriptionList = entity.getDescription();
-
- Organization org = new OrganizationImpl(lifeCycleManager);
- if ((namesList != null) && (namesList.size() > 0)) {
- InternationalString is = null;
- for (int i = 0; i < namesList.size(); i++) {
- Name n = namesList.get(i);
- if (is == null) {
- is = getIString(n.getLang(), n.getValue(), lifeCycleManager);
- } else {
- is.setValue(getLocale(n.getLang()), n.getValue());
- }
- }
- org.setName(is);
- }
- if ((descriptionList != null) && (descriptionList.size() > 0)) {
- InternationalString is = null;
- for (int i = 0; i < descriptionList.size(); i++) {
- Description desc = descriptionList.get(i);
- if (is == null) {
- is = getIString(desc.getLang(), desc.getValue(), lifeCycleManager);
- } else {
- is.setValue(getLocale(desc.getLang()), desc.getValue());
- }
- }
- org.setDescription(is);
- }
-
- org.setKey(lifeCycleManager.createKey(entity.getBusinessKey()));</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
<tr class="b"><td>org/apache/ws/scout/registry/BusinessQueryManagerImpl.java</td>
<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerImpl.html#472">472</a></td>
</tr>
@@ -2619,10 +2360,10 @@
<th>Line</th>
</tr>
<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#607">607</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#603">603</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#555">555</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#590">590</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> }
return alist;
@@ -2678,46 +2419,46 @@
<th>Line</th>
</tr>
<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#329">329</a></td>
+<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#268">268</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#351">351</a></td>
+<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#310">310</a></td>
</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> throw (new RegistryV3Exception(xmle));
- }
-
- if (responseName.toLowerCase().equals("fault")) {
- NodeList nodeList = null;
-
- // Child Elements
- String fCode = null;
- nodeList = response.getElementsByTagName("faultcode");
- if (nodeList.getLength() > 0)
- fCode = nodeList.item(0).getNodeValue();
-
- String fString = null;
- nodeList = response.getElementsByTagName("faultstring");
- if (nodeList.getLength() > 0)
- fString = nodeList.item(0).getNodeValue();
-
- String fActor = null;
- nodeList = response.getElementsByTagName("faultactor");
- if (nodeList.getLength() > 0)
- fActor = nodeList.item(0).getNodeValue();
-
- DispositionReport dispRpt = null;
-
- nodeList = response.getElementsByTagName("detail");
- if (nodeList.getLength() > 0) {
- nodeList = ((Element) nodeList.item(0))
- .getElementsByTagName("dispositionReport");
+<tr class="b"><td colspan='2'><div class="source"><pre> throw (new RegistryV3Exception(xmle));
+ }
+
+ if (responseName.toLowerCase().equals("fault")) {
+ NodeList nodeList = null;
+
+ // Child Elements
+ String fCode = null;
+ nodeList = response.getElementsByTagName("faultcode");
+ if (nodeList.getLength() > 0)
+ fCode = nodeList.item(0).getNodeValue();
+
+ String fString = null;
+ nodeList = response.getElementsByTagName("faultstring");
+ if (nodeList.getLength() > 0)
+ fString = nodeList.item(0).getNodeValue();
+
+ String fActor = null;
+ nodeList = response.getElementsByTagName("faultactor");
+ if (nodeList.getLength() > 0)
+ fActor = nodeList.item(0).getNodeValue();
+
+ DispositionReport dispRpt = null;
+
+ nodeList = response.getElementsByTagName("detail");
if (nodeList.getLength() > 0) {
- JAXBElement<DispositionReport> dispRptObj = null;
- try {
- dispRptObj = (JAXBElement<DispositionReport>) unmarshaller.unmarshal((Element) nodeList
- .item(0));
- } catch (JAXBException xmle) {
- throw (new RegistryV3Exception(xmle));</pre>
+ nodeList = ((Element) nodeList.item(0))
+ .getElementsByTagName("dispositionReport");
+ if (nodeList.getLength() > 0) {
+ JAXBElement<DispositionReport> dispRptObj = null;
+ try {
+ dispRptObj = (JAXBElement<DispositionReport>) unmarshaller.unmarshal((Element) nodeList
+ .item(0));
+ } catch (JAXBException xmle) {
+ throw (new RegistryV3Exception(xmle));</pre>
</div>
</td></tr>
<table class="bodyTable"></p>
@@ -2864,6 +2605,98 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#129">129</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#103">103</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> if ((descriptionList != null) && (descriptionList.size() > 0)) {
+ InternationalString is = null;
+ for (Description desc : descriptionList) {
+ if (is == null) {
+ is = getIString(desc.getLang(), desc.getValue(), lifeCycleManager);
+ } else {
+ is.setValue(getLocale(desc.getLang()), desc.getValue());
+ }
+ }
+ org.setDescription(is);
+ }
+ org.setKey(lifeCycleManager.createKey(businessEntity.getBusinessKey()));
+
+ //Set Services also
+ BusinessServices services = businessEntity.getBusinessServices();
+ if(services != null)
+ {
+ List<BusinessService> bizServiceList = services.getBusinessService();
+ for (BusinessService businessService : bizServiceList) {
+ org.addService(getService(businessService, lifeCycleManager));
+ }
+ }
+
+ /*
+ * Users
+ *
+ * we need to take the first contact and designate as the
+ * 'primary contact'. Currently, the OrganizationImpl
+ * class does that automatically as a safety in case
+ * user forgets to set - lets be explicit here as to not
+ * depend on that behavior
+ */
+
+ Contacts contacts = businessEntity.getContacts();
+ if(contacts != null)
+ {
+ List<Contact> contactList = contacts.getContact();
+ if (contactList!=null) {
+ boolean isFirst=true;
+ for (Contact contact : contactList) {
+ User user = new UserImpl(null);</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#115">115</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#211">211</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> List<Description> descriptionList = entity.getDescription();
+
+ Organization org = new OrganizationImpl(lifeCycleManager);
+ if ((namesList != null) && (namesList.size() > 0)) {
+ InternationalString is = null;
+ for (Name n : namesList) {
+ if (is == null) {
+ is = getIString(n.getLang(), n.getValue(), lifeCycleManager);
+ } else {
+ is.setValue(getLocale(n.getLang()), n.getValue());
+ }
+ }
+ org.setName(is);
+ }
+ if ((descriptionList != null) && (descriptionList.size() > 0)) {
+ InternationalString is = null;
+ for (Description desc : descriptionList) {
+ if (is == null) {
+ is = getIString(desc.getLang(), desc.getValue(), lifeCycleManager);
+ } else {
+ is.setValue(getLocale(desc.getLang()), desc.getValue());
+ }
+ }
+ org.setDescription(is);
+ }
+
+ org.setKey(lifeCycleManager.createKey(entity.getBusinessKey()));</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
<tr class="b"><td>org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java</td>
<td><a href="./xref/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.html#427">427</a></td>
</tr>
@@ -2909,145 +2742,54 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#106">106</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#109">109</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre>public class RegistryV3Impl implements IRegistryV3 {
-
- public static final String INQUIRY_ENDPOINT_PROPERTY_NAME = "scout.proxy.inquiryURL";
- public static final String PUBLISH_ENDPOINT_PROPERTY_NAME = "scout.proxy.publishURL";
- public static final String SECURITY_ENDPOINT_PROPERTY_NAME = "scout.proxy.securityURL";
- public static final String ADMIN_ENDPOINT_PROPERTY_NAME = "scout.proxy.adminURL";
- public static final String TRANSPORT_CLASS_PROPERTY_NAME = "scout.proxy.transportClass";
- public static final String SECURITY_PROVIDER_PROPERTY_NAME = "scout.proxy.securityProvider";
- public static final String PROTOCOL_HANDLER_PROPERTY_NAME = "scout.proxy.protocolHandler";
- public static final String UDDI_VERSION_PROPERTY_NAME = "scout.proxy.uddiVersion";
- public static final String UDDI_NAMESPACE_PROPERTY_NAME = "scout.proxy.uddiNamespace";
-
- public static final String DEFAULT_INQUIRY_ENDPOINT = "http://localhost/juddi/inquiry";
- public static final String DEFAULT_PUBLISH_ENDPOINT = "http://localhost/juddi/publish";
- public static final String DEFAULT_SECURITY_ENDPOINT = "http://localhost/juddi/security";
- public static final String DEFAULT_ADMIN_ENDPOINT = "http://localhost/juddi/admin";
- public static final String DEFAULT_TRANSPORT_CLASS = "org.apache.ws.scout.transport.AxisTransport";
- public static final String DEFAULT_SECURITY_PROVIDER = "com.sun.net.ssl.internal.ssl.Provider";
- public static final String DEFAULT_PROTOCOL_HANDLER = "com.sun.net.ssl.internal.www.protocol";
- public static final String DEFAULT_UDDI_VERSION = "2.0";
- public static final String DEFAULT_UDDI_NAMESPACE = "urn:uddi-org:api_v2";
-
- private URI adminURI;
- private URI inquiryURI;
- private URI publishURI;
- private URI securityURI;
-
- private Transport transport;
-
- private String securityProvider;
- private String protocolHandler;
- private String uddiVersion;
- private String uddiNamespace;
-
- private ObjectFactory objectFactory = new ObjectFactory();
-
- private Marshaller marshaller = null;
- private Unmarshaller unmarshaller = null;
-
- private static Log log = LogFactory.getLog(RegistryV3Impl.class);</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
-<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#444">444</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#386">386</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> return service;
- }
-
- public static ServiceBinding getServiceBinding(BindingTemplate businessTemplate, LifeCycleManager lifeCycleManager)
- throws JAXRException
- {
- ServiceBinding serviceBinding = new ServiceBindingImpl(lifeCycleManager);
-
- String keystr = businessTemplate.getServiceKey();
- if (keystr != null)
- {
- Service svc = new ServiceImpl(lifeCycleManager);
- svc.setKey(lifeCycleManager.createKey(keystr));
- ((ServiceBindingImpl)serviceBinding).setService(svc);
- }
- String bindingKey = businessTemplate.getBindingKey();
- if(bindingKey != null) serviceBinding.setKey(new KeyImpl(bindingKey));
-
- //Access URI
- AccessPoint access = businessTemplate.getAccessPoint();
- if (access != null) serviceBinding.setAccessURI(access.getValue());
-
- //Description
- Description desc = null;
- if (businessTemplate.getDescription().size()>0) desc = businessTemplate.getDescription().get(0);
- if (desc!=null) {
- serviceBinding.setDescription(new InternationalStringImpl(desc.getValue()));
- }
- /**Section D.10 of JAXR 1.0 Specification */
-
- TModelInstanceDetails details = businessTemplate.getTModelInstanceDetails();</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
-<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#174">174</a></td>
+<tr class="b"><td>org/apache/ws/scout/registry/BusinessQueryManagerImpl.java</td>
+<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerImpl.html#995">995</a></td>
</tr>
-<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#138">138</a></td>
+<tr class="a"><td>org/apache/ws/scout/registry/BusinessQueryManagerV3Impl.java</td>
+<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerV3Impl.html#977">977</a></td>
</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> if (isFirst) {
- isFirst=false;
- org.setPrimaryContact(user);
- } else {
- org.addUser(user);
- }
- }
- }
- }
-
- //External Links
- DiscoveryURLs durls = businessEntity.getDiscoveryURLs();
- if (durls != null)
- {
- List<DiscoveryURL> discoveryURL_List = durls.getDiscoveryURL();
- for (DiscoveryURL discoveryURL : discoveryURL_List) {
- ExternalLink link = new ExternalLinkImpl(lifeCycleManager);
- link.setExternalURI(discoveryURL.getValue());
- org.addExternalLink(link);
- }
- }
-
- org.addExternalIdentifiers(getExternalIdentifiers(businessEntity.getIdentifierBag(), lifeCycleManager));
- org.addClassifications(getClassifications(businessEntity.getCategoryBag(), lifeCycleManager));
-
- return org;
- }
+<tr class="b"><td colspan='2'><div class="source"><pre> if (juddiQualifier == null)
+ {
+ throw new UnsupportedCapabilityException("jUDDI does not support FindQualifer: " + jaxrQualifier);
+ }
+ result.getFindQualifier().add(juddiQualifier);
+ }
+ return result;
+ }
+ static Name[] mapNamePatterns(Collection namePatterns)
+ throws JAXRException
+ {
+ if (namePatterns == null)
+ return null;
+ Name[] result = new Name[namePatterns.size()];
+ int currLoc = 0;
+ for (Iterator i = namePatterns.iterator(); i.hasNext();)
+ {
+ Object obj = i.next();
+ Name name = objectFactory.createName();
+ if (obj instanceof String) {
+ name.setValue((String)obj);
+ } else if (obj instanceof LocalizedString) {
+ LocalizedString ls = (LocalizedString)obj;
+ name.setValue(ls.getValue());
+ name.setLang(ls.getLocale().getLanguage());
+ }
+ result[currLoc] = name;
+ currLoc++;
+ }
+ return result;
+ }
- public static Organization getOrganization(BusinessDetail bizdetail,
- LifeCycleManager lifeCycleManager)
- throws JAXRException
- {
- List<BusinessEntity> bizEntityList = bizdetail.getBusinessEntity();
- if (bizEntityList.size() != 1) {
- throw new JAXRException("Unexpected count of organizations in BusinessDetail: " + bizEntityList.size());
- }
- BusinessEntity entity = bizEntityList.get(0);</pre>
+ /**
+ * Get the Auth Token from the registry
+ *
+ * @param connection
+ * @param ireg
+ * @return auth token
+ * @throws JAXRException
+ */
+ private AuthToken getAuthToken(ConnectionImpl connection, IRegistryV3 ireg)</pre>
</div>
</td></tr>
<table class="bodyTable"></p>
@@ -3058,7 +2800,7 @@
<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#405">405</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#396">396</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#404">404</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> InternationalString iname = classificationScheme.getName();
@@ -3100,11 +2842,73 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
+<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
+<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#1129">1129</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
+<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#1185">1185</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> } catch (Exception ex) {
+ throw new RuntimeException(ex);
+ }
+
+ return transport;
+ }
+
+ /**
+ *
+ * @param name
+ * @return The class object for the name given
+ * @throws ClassNotFoundException
+ * @throws NoClassDefFoundError
+ */
+ public static Class getClassForName(String name)
+ throws ClassNotFoundException, NoClassDefFoundError {
+ Class clazz = null;
+
+ try {
+ // log.info("Using the Context ClassLoader");
+ ClassLoader ccl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run() {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+
+ clazz = Class.forName(name, true, ccl);
+ } catch (Exception e) {
+ log.debug("Failed to load the class " + name + " with context class loader " + e);
+ }
+
+ if (null == clazz) {
+ ClassLoader scl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run() {
+ return ClassLoader.getSystemClassLoader();
+ }
+ });
+
+ try {
+ clazz = Class.forName(name, true, scl);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ return clazz;
+ }
+}</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
<tr class="b"><td>org/apache/ws/scout/util/ScoutJaxrUddiHelper.java</td>
<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiHelper.html#921">921</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#918">918</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.html#926">926</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> InternationalString extDesc = link.getDescription();
if(extDesc != null) {
@@ -3199,6 +3003,54 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
+<tr class="b"><td>org/apache/ws/scout/transport/LocalTransport.java</td>
+<td><a href="./xref/org/apache/ws/scout/transport/LocalTransport.html#79">79</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/transport/RMITransport.java</td>
+<td><a href="./xref/org/apache/ws/scout/transport/RMITransport.html#87">87</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> if (node.getFirstChild()!=null) {
+ response = (Element) node.getFirstChild();
+ }
+ }
+ catch (Exception ex) {
+ throw new TransportException(ex);
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("\nResponse message:\n" + XMLUtils.convertNodeToXMLString(response));
+ }
+ return response;
+ }
+
+ /**
+ * Sends an XML, responds with an XML.
+ */
+ public String send(String request,URI endpointURI)
+ throws TransportException
+ {
+ String response = null;
+ log.debug("\nRequest message:\n" + request);
+ try {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder parser = factory.newDocumentBuilder();
+ Document document = parser.parse(request);
+ Element element = document.getDocumentElement();
+ response= XMLUtils.convertNodeToXMLString(send(element, endpointURI));
+ } catch (Exception ex) {
+ throw new TransportException(ex);
+ }
+ log.debug("\nResponse message:\n" + response);
+ return response;
+ }
+
+
+}</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
<tr class="b"><td>org/apache/ws/scout/registry/BusinessLifeCycleManagerV3Impl.java</td>
<td><a href="./xref/org/apache/ws/scout/registry/BusinessLifeCycleManagerV3Impl.html#320">320</a></td>
</tr>
@@ -3316,54 +3168,37 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#764">764</a></td>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#297">297</a></td>
</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#761">761</a></td>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#282">282</a></td>
</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> throws RegistryV3Exception {
- FindService request = this.objectFactory.createFindService();
-
- if (businessKey != null) {
- request.setBusinessKey(businessKey);
- }
-
- if (nameArray != null) {
- request.getName().addAll(Arrays.asList(nameArray));
- }
-
- if (categoryBag != null) {
- request.setCategoryBag(categoryBag);
- }
-
- if (tModelBag != null) {
- request.setTModelBag(tModelBag);
+<tr class="b"><td colspan='2'><div class="source"><pre> }
}
-
- if (findQualifiers != null) {
- request.setFindQualifiers(findQualifiers);
+ //External Links
+ DiscoveryURLs durls = entity.getDiscoveryURLs();
+ if (durls != null)
+ {
+ List<DiscoveryURL> discoveryURL_List = durls.getDiscoveryURL();
+ for (DiscoveryURL discoveryURL : discoveryURL_List) {
+ ExternalLink link = new ExternalLinkImpl(lifeCycleManager);
+ link.setExternalURI(discoveryURL.getValue());
+ org.addExternalLink(link);
+ }
}
- request.setMaxRows(maxRows);
-
- ServiceList sl;
- JAXBElement<?> o = execute(this.objectFactory.createFindService(request),
- this.getInquiryURI());
- sl = (ServiceList) o.getValue();
+ org.addExternalIdentifiers(getExternalIdentifiers(entity.getIdentifierBag(), lifeCycleManager));
+ org.addClassifications(getClassifications(entity.getCategoryBag(), lifeCycleManager));
- return sl;
+ return org;
}
- /**
- * "Used to locate one or more tModel information structures. Returns a
- * tModelList structure."
- *
- * @exception RegistryV3Exception;
- */
- public TModelList findTModel(String name, CategoryBag categoryBag,
- IdentifierBag identifierBag, FindQualifiers findQualifiers,
- int maxRows) throws RegistryV3Exception {</pre>
+ private static PostalAddress getPostalAddress(AddressLine[] addressLineArr) throws JAXRException {
+ PostalAddress pa = new PostalAddressImpl();
+ HashMap<String, String> hm = new HashMap<String, String>();
+ for (AddressLine anAddressLineArr : addressLineArr) {
+ hm.put(anAddressLineArr.getKeyName(), anAddressLineArr.getValue());</pre>
</div>
</td></tr>
<table class="bodyTable"></p>
@@ -3431,31 +3266,125 @@
bulk.setCollection(coll);
bulk.setExceptions(exceptions);
- return bulk;
- }
+ return bulk;
+ }
+
+ private String getUsernameFromCredentials(Set credentials) {
+ String username = "", pwd = "";
+
+ if (credentials != null) {
+ Iterator it = credentials.iterator();
+ while (it.hasNext()) {
+ PasswordAuthentication pass = (PasswordAuthentication) it.next();
+ username = pass.getUserName();
+ }
+ }
+ return username;
+ }
+
+ /**
+ * Get the Auth Token from the registry
+ *
+ * @param connection
+ * @param ireg
+ * @return auth token
+ * @throws JAXRException
+ */
+ private AuthToken getAuthToken(ConnectionImpl connection, IRegistryV3 ireg)</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#172">172</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#149">149</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> if (isFirst) {
+ isFirst=false;
+ org.setPrimaryContact(user);
+ } else {
+ org.addUser(user);
+ }
+ }
+ }
+ }
+
+ //External Links
+ DiscoveryURLs durls = businessEntity.getDiscoveryURLs();
+ if (durls != null)
+ {
+ List<DiscoveryURL> discoveryURL_List = durls.getDiscoveryURL();
+ for (DiscoveryURL discoveryURL : discoveryURL_List) {
+ ExternalLink link = new ExternalLinkImpl(lifeCycleManager);
+ link.setExternalURI(discoveryURL.getValue());
+ org.addExternalLink(link);
+ }
+ }
+
+ org.addExternalIdentifiers(getExternalIdentifiers(businessEntity.getIdentifierBag(), lifeCycleManager));
+ org.addClassifications(getClassifications(businessEntity.getCategoryBag(), lifeCycleManager));
+
+ return org;
+ }
+
+
+ public static Organization getOrganization(BusinessDetail bizdetail,
+ LifeCycleManager lifeCycleManager)
+ throws JAXRException
+ {
+ List<BusinessEntity> bizEntityList = bizdetail.getBusinessEntity();</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
+<tr class="b"><td>org/apache/ws/scout/registry/BusinessQueryManagerImpl.java</td>
+<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerImpl.html#964">964</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/registry/BusinessQueryManagerV3Impl.java</td>
+<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerV3Impl.html#938">938</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> } catch (RegistryV3Exception re) {
+ throw new JAXRException(re);
+ }
+ return new BulkResponseImpl(orgs);
+ }
+ else if (LifeCycleManager.SERVICE.equalsIgnoreCase(id)) {
+ List<String> a = new ArrayList<String>();
+ a.add("%");
+
+ BulkResponse br = this.findServices(null,null, a, null, null);
- private String getUsernameFromCredentials(Set credentials) {
- String username = "", pwd = "";
-
- if (credentials != null) {
- Iterator it = credentials.iterator();
- while (it.hasNext()) {
- PasswordAuthentication pass = (PasswordAuthentication) it.next();
- username = pass.getUserName();
- }
+ return br;
}
- return username;
+ else
+ {
+ throw new JAXRException("Unsupported type for getRegistryObjects() :" + id);
+ }
+
}
- /**
- * Get the Auth Token from the registry
- *
- * @param connection
- * @param ireg
- * @return auth token
- * @throws JAXRException
- */
- private AuthToken getAuthToken(ConnectionImpl connection, IRegistryV3 ireg)</pre>
+ static FindQualifiers mapFindQualifiers(Collection jaxrQualifiers) throws UnsupportedCapabilityException
+ {
+ if (jaxrQualifiers == null)
+ {
+ return null;
+ }
+ FindQualifiers result = objectFactory.createFindQualifiers();
+ for (Iterator i = jaxrQualifiers.iterator(); i.hasNext();)
+ {
+ String jaxrQualifier = (String) i.next();
+ String juddiQualifier = jaxrQualifier;
+
+ // SCOUT-111
+ // If the JAXR qualifier is exactNameMatch, then
+ // set the UDDI v3 qualifier to exactMatch
+ if ("exactNameMatch".equals(jaxrQualifier)) {</pre>
</div>
</td></tr>
<table class="bodyTable"></p>
@@ -3463,10 +3392,10 @@
<th>Line</th>
</tr>
<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#475">475</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#471">471</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#418">418</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#453">453</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> List<TModelInstanceInfo> tmodelInstanceInfoList = details.getTModelInstanceInfo();
@@ -3494,102 +3423,6 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/transport/LocalTransport.java</td>
-<td><a href="./xref/org/apache/ws/scout/transport/LocalTransport.html#66">66</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/transport/RMITransport.java</td>
-<td><a href="./xref/org/apache/ws/scout/transport/RMITransport.html#87">87</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> response = (Element) node.getFirstChild();
- }
- catch (Exception ex) {
- throw new TransportException(ex);
- }
- if (log.isDebugEnabled()) {
- log.debug("\nResponse message:\n" + XMLUtils.convertNodeToXMLString(response));
- }
- return response;
- }
-
- /**
- * Sends an XML, responds with an XML.
- */
- public String send(String request,URI endpointURI)
- throws TransportException
- {
- String response = null;
- log.debug("\nRequest message:\n" + request);
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder parser = factory.newDocumentBuilder();
- Document document = parser.parse(request);
- Element element = document.getDocumentElement();
- response= XMLUtils.convertNodeToXMLString(send(element, endpointURI));
- } catch (Exception ex) {
- throw new TransportException(ex);
- }
- log.debug("\nResponse message:\n" + response);
- return response;
- }
-
-
-}</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#805">805</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#802">802</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> int maxRows) throws RegistryV3Exception {
- FindTModel request = this.objectFactory.createFindTModel();
-
- Name jaxbName = this.objectFactory.createName();
-
- if (name != null) {
- jaxbName.setValue(name);
- }
-
- request.setName(jaxbName);
-
- if (categoryBag != null) {
- request.setCategoryBag(categoryBag);
- }
-
- if (identifierBag != null) {
- request.setIdentifierBag(identifierBag);
- }
-
- if (findQualifiers != null) {
- request.setFindQualifiers(findQualifiers);
- }
-
- request.setMaxRows(maxRows);
-
- TModelList tml;
- JAXBElement<?> o = execute(this.objectFactory.createFindTModel(request),
- this.getInquiryURI());
- tml = (TModelList) o.getValue();
-
- return tml;
- }
-
- /**
- * @exception RegistryV3Exception;
- */
- public AssertionStatusReport getAssertionStatusReport(String authInfo,
- String completionStatus) throws RegistryV3Exception {</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
<tr class="b"><td>org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java</td>
<td><a href="./xref/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.html#327">327</a></td>
</tr>
@@ -3654,77 +3487,48 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/BusinessQueryManagerImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerImpl.html#830">830</a></td>
+<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
+<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#170">170</a></td>
</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/BusinessQueryManagerV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerV3Impl.html#802">802</a></td>
+<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
+<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#183">183</a></td>
</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> IRegistryV3 registry = (IRegistryV3) registryService.getRegistry();
- //Convert into a vector of strings
- String[] keys = new String[objectKeys.size()];
- int currLoc = 0;
- for (Key key : (Collection<Key>) objectKeys) {
- keys[currLoc] = key.getId();
- currLoc++;
+<tr class="b"><td colspan='2'><div class="source"><pre> JAXBContext context = JAXBContextUtil.getContext(JAXBContextUtil.UDDI_V3_VERSION);
+ unmarshaller = context.createUnmarshaller();
+ marshaller = context.createMarshaller();
+
+ } catch (URISyntaxException muex) {
+ throw new InvalidRequestException(muex.getMessage(), muex);
+ } catch(JAXBException e) {
+ throw new RuntimeException(e);
}
- LinkedHashSet<RegistryObject> col = new LinkedHashSet<RegistryObject>();
- LifeCycleManager lcm = registryService.getLifeCycleManagerImpl();
-
- if (LifeCycleManager.CLASSIFICATION_SCHEME.equalsIgnoreCase(objectType))
- {
- try
- {
- TModelDetail tmodeldetail = registry.getTModelDetail(keys);
- List<TModel> tmodelList = tmodeldetail.getTModel();
+ }
- for (TModel tModel: tmodelList)
- {
- col.add(ScoutUddiV3JaxrHelper.getConcept(tModel, lcm));</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
-<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#140">140</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#101">101</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> org.setDescription(getIString(desc.getLang(), desc.getValue(), lifeCycleManager));
- }
- org.setKey(lifeCycleManager.createKey(businessEntity.getBusinessKey()));
+ /**
+ *
+ * @param uddiRequest
+ * @return String
+ * @throws RegistryV3Exception
+ */
+ public String execute(String uddiRequest, String urltype)
+ throws TransportException {
+ URI endPointURL = null;
+ if (urltype.equalsIgnoreCase("INQUIRY"))
+ endPointURL = this.getInquiryURI();
+ else
+ endPointURL = this.getPublishURI();
- //Set Services also
- BusinessServices services = businessEntity.getBusinessServices();
- if(services != null)
- {
- List<BusinessService> bizServiceList = services.getBusinessService();
- for (BusinessService businessService : bizServiceList) {
- org.addService(getService(businessService, lifeCycleManager));
- }
- }
+ // A SOAP request is made and a SOAP response
+ // is returned.
- /*
- * Users
- *
- * we need to take the first contact and designate as the
- * 'primary contact'. Currently, the OrganizationImpl
- * class does that automatically as a safety in case
- * user forgets to set - lets be explicit here as to not
- * depend on that behavior
- */
+ return transport.send(uddiRequest, endPointURL);
+ }
- Contacts contacts = businessEntity.getContacts();
- if(contacts != null)
- {
- List<Contact> contactList = contacts.getContact();
- if (contactList!=null) {
- boolean isFirst=true;
- for (Contact contact : contactList) {
- User user = new UserImpl(null);</pre>
+ /**
+ *
+ */
+ public JAXBElement<?> execute(JAXBElement<?> uddiRequest, URI endPointURI)
+ throws RegistryV3Exception {</pre>
</div>
</td></tr>
<table class="bodyTable"></p>
@@ -3732,10 +3536,10 @@
<th>Line</th>
</tr>
<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#513">513</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#509">509</a></td>
</tr>
<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#533">533</a></td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#529">529</a></td>
</tr>
<tr class="b"><td colspan='2'><div class="source"><pre> concept.setKey(lifeCycleManager.createKey(tmodel.getTModelKey()));
concept.setName(lifeCycleManager.createInternationalString(getLocale(tmodel.getName().getLang()),
@@ -3802,94 +3606,6 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#643">643</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#641">641</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> String[] tModelKeyArray) throws RegistryV3Exception {
- DeleteTModel request = this.objectFactory.createDeleteTModel();
-
- if (authInfo != null) {
- request.setAuthInfo(authInfo);
- }
-
- if (tModelKeyArray != null) {
- request.getTModelKey().addAll(Arrays.asList(tModelKeyArray));
- }
-
- DispositionReport dr;
- JAXBElement<?> o = execute(this.objectFactory.createDeleteTModel(request),
- this.getPublishURI());
- dr = (DispositionReport) o.getValue();
-
- return dr;
- }
-
- /**
- * Used to locate information about one or more businesses. Returns a
- * businessList message that matches the conditions specified.
- *
- * @exception RegistryV3Exception;
- */
- public BusinessList findBusiness(Name[] nameArray,
- DiscoveryURLs discoveryURLs, IdentifierBag identifierBag,
- CategoryBag categoryBag, TModelBag tModelBag,
- FindQualifiers findQualifiers, int maxRows)
- throws RegistryV3Exception {</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
-<tr class="b"><td>org/apache/ws/scout/registry/RegistryImpl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryImpl.html#870">870</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/registry/RegistryV3Impl.java</td>
-<td><a href="./xref/org/apache/ws/scout/registry/RegistryV3Impl.html#868">868</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> throws RegistryV3Exception {
- GetAuthToken request = this.objectFactory.createGetAuthToken();
-
- if (userID != null) {
- request.setUserID(userID);
- }
-
- if (cred != null) {
- request.setCred(cred);
- }
-
- URI getAuthTokenURI = null;
- if ("3.0".equals(uddiVersion)) {
- getAuthTokenURI = this.getSecurityURI();
- } else {
- getAuthTokenURI = this.getPublishURI();
- }
-
- AuthToken at;
- JAXBElement<?> o = execute(this.objectFactory.createGetAuthToken(request),
- getAuthTokenURI);
- at = (AuthToken) o.getValue();
-
- return at;
- }
-
- /**
- * Used to get the full businessEntity information for a particular business
- * entity. Returns a businessDetail message.
- *
- * @exception RegistryV3Exception;
- */
- public BusinessDetail getBusinessDetail(String businessKey)
- throws RegistryV3Exception {</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
<tr class="b"><td>org/apache/ws/scout/model/uddi/v2/AddPublisherAssertions.java</td>
<td><a href="./xref/org/apache/ws/scout/model/uddi/v2/AddPublisherAssertions.html#47">47</a></td>
</tr>
@@ -4021,6 +3737,33 @@
<p><table class="bodyTable"><tr class="a"><th>File</th>
<th>Line</th>
</tr>
+<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiJaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiJaxrHelper.html#225">225</a></td>
+</tr>
+<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
+<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#202">202</a></td>
+</tr>
+<tr class="b"><td colspan='2'><div class="source"><pre> if ((descriptionList != null) && (descriptionList.size() > 0)) {
+ InternationalString is = null;
+ for (Description desc : descriptionList) {
+ if (is == null) {
+ is = getIString(desc.getLang(), desc.getValue(), lifeCycleManager);
+ } else {
+ is.setValue(getLocale(desc.getLang()), desc.getValue());
+ }
+ }
+ org.setDescription(is);
+ }
+ org.setKey(lifeCycleManager.createKey(entity.getBusinessKey()));
+
+ //Set Services also
+ BusinessServices services = entity.getBusinessServices();</pre>
+</div>
+</td></tr>
+<table class="bodyTable"></p>
+<p><table class="bodyTable"><tr class="a"><th>File</th>
+<th>Line</th>
+</tr>
<tr class="b"><td>org/apache/ws/scout/registry/BusinessQueryManagerImpl.java</td>
<td><a href="./xref/org/apache/ws/scout/registry/BusinessQueryManagerImpl.html#668">668</a></td>
</tr>
@@ -4079,30 +3822,6 @@
</div>
</td></tr>
<table class="bodyTable"></p>
-<p><table class="bodyTable"><tr class="a"><th>File</th>
-<th>Line</th>
-</tr>
-<tr class="b"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#92">92</a></td>
-</tr>
-<tr class="a"><td>org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java</td>
-<td><a href="./xref/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.html#179">179</a></td>
-</tr>
-<tr class="b"><td colspan='2'><div class="source"><pre> List<Description> descriptionList = entity.getDescription();
- Description desc =null;
- if (descriptionList.size()>0) desc = descriptionList.get(0);
-
- Organization org = new OrganizationImpl(lifeCycleManager);
- if( n != null ) {
- org.setName(getIString(n.getLang(), n.getValue(), lifeCycleManager));
- }
- if( desc != null ) {
- org.setDescription(getIString(desc.getLang(), desc.getValue(), lifeCycleManager));
- }
- org.setKey(lifeCycleManager.createKey(entity.getBusinessKey()));</pre>
-</div>
-</td></tr>
-<table class="bodyTable"></p>
</div>
</div>
@@ -4112,7 +3831,7 @@
</div>
<div id="footer">
<div class="xright">©
- 2004-2010
+ 2004-2012
The Apache Software Foundation
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org