You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by di...@apache.org on 2004/11/09 20:15:46 UTC
cvs commit: ws-site/targets/scout/xref/org/apache/ws/scout/uddi JAXRHelper.html JAXRUDDIManager.html package-frame.html package-summary.html UDDIDeleteWorker.html UDDIFindWorker.html UDDIHelper.html UDDISaveWorker.html
dims 2004/11/09 11:15:46
Added: targets/scout/xref/org/apache/ws/scout/uddi JAXRHelper.html
JAXRUDDIManager.html package-frame.html
package-summary.html UDDIDeleteWorker.html
UDDIFindWorker.html UDDIHelper.html
UDDISaveWorker.html
Log:
Initial check-in for Apache Scout
Revision Changes Path
1.1 ws-site/targets/scout/xref/org/apache/ws/scout/uddi/JAXRHelper.html
Index: JAXRHelper.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>JAXRHelper xref</title>
<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
</head>
<body>
<div id="overview"><a href="../../../../../../apidocs/org/apache/ws/scout/uddi/JAXRHelper.html">View Javadoc</a></div><pre>
<a name="1" href="#1">1</a> <em class="comment">/*</em>
<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
<a name="3" href="#3">3</a> <em class="comment"> *</em>
<a name="4" href="#4">4</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
<a name="5" href="#5">5</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
<a name="6" href="#6">6</a> <em class="comment"> * You may obtain a copy of the License at</em>
<a name="7" href="#7">7</a> <em class="comment"> *</em>
<a name="8" href="#8">8</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
<a name="9" href="#9">9</a> <em class="comment"> *</em>
<a name="10" href="#10">10</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
<a name="11" href="#11">11</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
<a name="12" href="#12">12</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
<a name="13" href="#13">13</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
<a name="14" href="#14">14</a> <em class="comment"> * limitations under the License.</em>
<a name="15" href="#15">15</a> <em class="comment"> */</em>
<a name="16" href="#16">16</a> <strong>package</strong> <a href="../../../../../org/apache/ws/scout/uddi/package-summary.html">org.apache.ws.scout.uddi</a>;
<a name="17" href="#17">17</a>
<a name="18" href="#18">18</a> <strong>import</strong> java.util.ArrayList;
<a name="19" href="#19">19</a> <strong>import</strong> java.util.Collection;
<a name="20" href="#20">20</a> <strong>import</strong> java.util.Vector;
<a name="21" href="#21">21</a>
<a name="22" href="#22">22</a> <strong>import</strong> javax.xml.registry.JAXRException;
<a name="23" href="#23">23</a> <strong>import</strong> javax.xml.registry.RegistryException;
<a name="24" href="#24">24</a> <strong>import</strong> javax.xml.registry.infomodel.Key;
<a name="25" href="#25">25</a> <strong>import</strong> javax.xml.registry.infomodel.Organization;
<a name="26" href="#26">26</a> <strong>import</strong> javax.xml.registry.infomodel.Service;
<a name="27" href="#27">27</a>
<a name="28" href="#28">28</a> <strong>import</strong> org.apache.ws.scout.registry.infomodel.InternationalStringImpl;
<a name="29" href="#29">29</a> <strong>import</strong> org.apache.ws.scout.registry.infomodel.KeyImpl;
<a name="30" href="#30">30</a> <strong>import</strong> org.apache.ws.scout.registry.infomodel.OrganizationImpl;
<a name="31" href="#31">31</a> <strong>import</strong> org.apache.ws.scout.registry.infomodel.ServiceImpl;
<a name="32" href="#32">32</a> <strong>import</strong> org.uddi4j.response.BusinessInfo;
<a name="33" href="#33">33</a> <strong>import</strong> org.uddi4j.response.DispositionReport;
<a name="34" href="#34">34</a> <strong>import</strong> org.uddi4j.response.ErrInfo;
<a name="35" href="#35">35</a> <strong>import</strong> org.uddi4j.response.Result;
<a name="36" href="#36">36</a> <strong>import</strong> org.uddi4j.response.ServiceInfo;
<a name="37" href="#37">37</a> <strong>import</strong> org.uddi4j.response.ServiceInfos;
<a name="38" href="#38">38</a>
<a name="39" href="#39">39</a> <em>/**<em>*</em></em>
<a name="40" href="#40">40</a> <em> * Utility Class that deals with conversion to JAXR Objects.</em>
<a name="41" href="#41">41</a> <em> * @author Anil Saldhana <anil@apache.org></em>
<a name="42" href="#42">42</a> <em> */</em>
<a name="43" href="#43">43</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRHelper.html">JAXRHelper</a> {
<a name="44" href="#44">44</a> <em>/**<em>*</em></em>
<a name="45" href="#45">45</a> <em> * Creates a JAXROrganization from a UDDI4J BusinessInfo Object</em>
<a name="46" href="#46">46</a> <em> */</em>
<a name="47" href="#47">47</a> <a href="../../../../../javax/xml/registry/infomodel/Organization.html">Organization</a> createJAXROrganization(BusinessInfo bizInfo)
<a name="48" href="#48">48</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="49" href="#49">49</a> <em class="comment">//Create a new JAXR Organization</em>
<a name="50" href="#50">50</a> <a href="../../../../../javax/xml/registry/infomodel/Organization.html">Organization</a> org = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/infomodel/OrganizationImpl.html">OrganizationImpl</a>();
<a name="51" href="#51">51</a> <strong>try</strong>{
<a name="52" href="#52">52</a> String namestr = bizInfo.getDefaultNameString();
<a name="53" href="#53">53</a> org.setName( <strong>new</strong> InternationalStringImpl( namestr));
<a name="54" href="#54">54</a>
<a name="55" href="#55">55</a> <em class="comment">//Get the Businmss Key</em>
<a name="56" href="#56">56</a> <a href="../../../../../javax/xml/registry/infomodel/Key.html">Key</a> key = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/infomodel/KeyImpl.html">KeyImpl</a>();
<a name="57" href="#57">57</a> key.setId( bizInfo.getBusinessKey() );
<a name="58" href="#58">58</a> org.setKey( key );
<a name="59" href="#59">59</a> org.setDescription(
<a name="60" href="#60">60</a> <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/infomodel/InternationalStringImpl.html">InternationalStringImpl</a>(
<a name="61" href="#61">61</a> bizInfo.getDefaultDescriptionString()));
<a name="62" href="#62">62</a>
<a name="63" href="#63">63</a> <em class="comment">//Get the Business Services Information</em>
<a name="64" href="#64">64</a> ServiceInfos sinfos = bizInfo.getServiceInfos();
<a name="65" href="#65">65</a> Vector svect = sinfos.getServiceInfoVector();
<a name="66" href="#66">66</a> addServiceInfoToJAXROrganization( svect, org);
<a name="67" href="#67">67</a> }<strong>catch</strong>(Exception ud){
<a name="68" href="#68">68</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="69" href="#69">69</a> }
<a name="70" href="#70">70</a>
<a name="71" href="#71">71</a> <strong>return</strong> org;
<a name="72" href="#72">72</a> }
<a name="73" href="#73">73</a> <em>/**<em>*Creates a JAXR Service from a UDDI4J ServiceInfo Object</em></em>
<a name="74" href="#74">74</a> <em> * @param info</em>
<a name="75" href="#75">75</a> <em> * @return</em>
<a name="76" href="#76">76</a> <em> */</em>
<a name="77" href="#77">77</a> <a href="../../../../../javax/xml/registry/infomodel/Service.html">Service</a> createJAXRService(ServiceInfo serviceinfo)
<a name="78" href="#78">78</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="79" href="#79">79</a> <em class="comment">// Create a new JAXR Organization</em>
<a name="80" href="#80">80</a> <a href="../../../../../javax/xml/registry/infomodel/Service.html">Service</a> serve = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/infomodel/ServiceImpl.html">ServiceImpl</a>();
<a name="81" href="#81">81</a> <strong>try</strong>{
<a name="82" href="#82">82</a> String namestr = serviceinfo.getDefaultNameString();
<a name="83" href="#83">83</a> serve.setName( <strong>new</strong> InternationalStringImpl( namestr));
<a name="84" href="#84">84</a>
<a name="85" href="#85">85</a> <em class="comment">//Get the Businmss Key</em>
<a name="86" href="#86">86</a> <a href="../../../../../javax/xml/registry/infomodel/Key.html">Key</a> key = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/infomodel/KeyImpl.html">KeyImpl</a>();
<a name="87" href="#87">87</a> key.setId( serviceinfo.getServiceKey() );
<a name="88" href="#88">88</a> serve.setKey( key );
<a name="89" href="#89">89</a> <em class="comment">//UDDI4J Does not provide description for service</em>
<a name="90" href="#90">90</a> <em class="comment">//Check juddi alternative</em>
<a name="91" href="#91">91</a> }<strong>catch</strong>(Exception ud){
<a name="92" href="#92">92</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="93" href="#93">93</a> }
<a name="94" href="#94">94</a> <strong>return</strong> serve;
<a name="95" href="#95">95</a> }
<a name="96" href="#96">96</a>
<a name="97" href="#97">97</a> <strong>void</strong> addServiceInfoToJAXROrganization( Vector svect,
<a name="98" href="#98">98</a> <a href="../../../../../javax/xml/registry/infomodel/Organization.html">Organization</a> org)
<a name="99" href="#99">99</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="100" href="#100">100</a> <strong>for</strong>( <strong>int</strong> i = 0; svect!= <strong>null</strong> && i < svect.size(); i++ )
<a name="101" href="#101">101</a> {
<a name="102" href="#102">102</a> ServiceInfo sInfo = (ServiceInfo)svect.elementAt(i);
<a name="103" href="#103">103</a> <a href="../../../../../org/apache/ws/scout/registry/infomodel/ServiceImpl.html">ServiceImpl</a> serve = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/infomodel/ServiceImpl.html">ServiceImpl</a>();
<a name="104" href="#104">104</a> String name = sInfo.getDefaultNameString();
<a name="105" href="#105">105</a> log( <span class="string">"Service Name to store="</span>+name);
<a name="106" href="#106">106</a> serve.setName(<strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/infomodel/InternationalStringImpl.html">InternationalStringImpl</a>(name));
<a name="107" href="#107">107</a> serve.setKey( <strong>new</strong> KeyImpl(sInfo.getServiceKey()));
<a name="108" href="#108">108</a> <em>/**<em>*</em></em>
<a name="109" href="#109">109</a> <em> * UDDI4J Does Not Have a Description for Service</em>
<a name="110" href="#110">110</a> <em> */</em>
<a name="111" href="#111">111</a> serve.setDescription( <strong>new</strong> InternationalStringImpl(name));
<a name="112" href="#112">112</a> org.addService( serve );
<a name="113" href="#113">113</a> }<em class="comment">//end for </em>
<a name="114" href="#114">114</a> }<em class="comment">//end method</em>
<a name="115" href="#115">115</a>
<a name="116" href="#116">116</a> Collection prepareBulkResponseExceptions(DispositionReport dr,
<a name="117" href="#117">117</a> <a href="../../../../../org/apache/ws/scout/registry/infomodel/KeyImpl.html">KeyImpl</a> key) throws JAXRException {
<a name="118" href="#118">118</a> Collection exceptions = <strong>new</strong> ArrayList();
<a name="119" href="#119">119</a> Vector resultvect = dr.getResultVector();
<a name="120" href="#120">120</a>
<a name="121" href="#121">121</a> <em class="comment">//Now convert Result objects into BulkResponse</em>
<a name="122" href="#122">122</a> <strong>for</strong>( <strong>int</strong> i = 0; resultvect != <strong>null</strong> && i< resultvect.size();
<a name="123" href="#123">123</a> i++ ){
<a name="124" href="#124">124</a> Result res = (Result)resultvect.elementAt( i );
<a name="125" href="#125">125</a> String str = <span class="string">"Error Num="</span>+res.getErrno();
<a name="126" href="#126">126</a> ErrInfo err = res.getErrInfo();
<a name="127" href="#127">127</a> <strong>if</strong>( err != <strong>null</strong>){
<a name="128" href="#128">128</a> str += <span class="string">": errCode:"</span> + err.getErrCode() +
<a name="129" href="#129">129</a> <span class="string">": errInfoText:"</span> + err.getText();
<a name="130" href="#130">130</a> }
<a name="131" href="#131">131</a> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> jax = <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>(str);
<a name="132" href="#132">132</a> <em class="comment">//Create a RegistryException object on JAXR end</em>
<a name="133" href="#133">133</a> <a href="../../../../../javax/xml/registry/RegistryException.html">RegistryException</a> re = <strong>new</strong> RegistryException(jax);
<a name="134" href="#134">134</a> re.setErrorObjectKey( key );
<a name="135" href="#135">135</a> <em class="comment">//Add the RegistryException object to the collections of</em>
<a name="136" href="#136">136</a> <em class="comment">//exceptions</em>
<a name="137" href="#137">137</a> exceptions.add( re );
<a name="138" href="#138">138</a> }
<a name="139" href="#139">139</a> <strong>return</strong> exceptions;
<a name="140" href="#140">140</a> }
<a name="141" href="#141">141</a> <strong>private</strong> <strong>void</strong> log( String str ){
<a name="142" href="#142">142</a> System.out.println( str );
<a name="143" href="#143">143</a> }
<a name="144" href="#144">144</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
1.1 ws-site/targets/scout/xref/org/apache/ws/scout/uddi/JAXRUDDIManager.html
Index: JAXRUDDIManager.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>JAXRUDDIManager xref</title>
<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
</head>
<body>
<div id="overview"><a href="../../../../../../apidocs/org/apache/ws/scout/uddi/JAXRUDDIManager.html">View Javadoc</a></div><pre>
<a name="1" href="#1">1</a> <em class="comment">/*</em>
<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
<a name="3" href="#3">3</a> <em class="comment"> *</em>
<a name="4" href="#4">4</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
<a name="5" href="#5">5</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
<a name="6" href="#6">6</a> <em class="comment"> * You may obtain a copy of the License at</em>
<a name="7" href="#7">7</a> <em class="comment"> *</em>
<a name="8" href="#8">8</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
<a name="9" href="#9">9</a> <em class="comment"> *</em>
<a name="10" href="#10">10</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
<a name="11" href="#11">11</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
<a name="12" href="#12">12</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
<a name="13" href="#13">13</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
<a name="14" href="#14">14</a> <em class="comment"> * limitations under the License.</em>
<a name="15" href="#15">15</a> <em class="comment"> */</em>
<a name="16" href="#16">16</a>
<a name="17" href="#17">17</a> <strong>package</strong> <a href="../../../../../org/apache/ws/scout/uddi/package-summary.html">org.apache.ws.scout.uddi</a>;
<a name="18" href="#18">18</a>
<a name="19" href="#19">19</a> <strong>import</strong> java.util.Collection;
<a name="20" href="#20">20</a> <strong>import</strong> java.util.Properties;
<a name="21" href="#21">21</a> <strong>import</strong> java.util.Vector;
<a name="22" href="#22">22</a>
<a name="23" href="#23">23</a> <strong>import</strong> javax.xml.registry.JAXRException;
<a name="24" href="#24">24</a>
<a name="25" href="#25">25</a>
<a name="26" href="#26">26</a> <strong>import</strong> org.uddi4j.client.UDDIProxy;
<a name="27" href="#27">27</a> <strong>import</strong> org.uddi4j.response.*;
<a name="28" href="#28">28</a> <strong>import</strong> org.uddi4j.util.*;
<a name="29" href="#29">29</a> <strong>import</strong> org.uddi4j.transport.TransportFactory;
<a name="30" href="#30">30</a>
<a name="31" href="#31">31</a> <strong>import</strong> <a href="../../../../../org/apache/ws/scout/registry/package-summary.html">org.apache.ws.scout.registry</a>.*;
<a name="32" href="#32">32</a> <em>/**<em>*</em></em>
<a name="33" href="#33">33</a> <em> * Class that handles JAXR -> UDDI4J calls</em>
<a name="34" href="#34">34</a> <em> * @author Anil Saldhana <anil@apache.org></em>
<a name="35" href="#35">35</a> <em> */</em>
<a name="36" href="#36">36</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRUDDIManager.html">JAXRUDDIManager</a> {
<a name="37" href="#37">37</a> <strong>private</strong> <a href="../../../../../org/apache/ws/scout/registry/ConnectionImpl.html">ConnectionImpl</a> connection = <strong>null</strong>;
<a name="38" href="#38">38</a>
<a name="39" href="#39">39</a> <strong>private</strong> UDDIProxy proxy = <strong>new</strong> UDDIProxy();
<a name="40" href="#40">40</a>
<a name="41" href="#41">41</a> <strong>private</strong> AuthToken token = <strong>null</strong>;
<a name="42" href="#42">42</a>
<a name="43" href="#43">43</a> <strong>private</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIFindWorker.html">UDDIFindWorker</a> finder = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIFindWorker.html">UDDIFindWorker</a>();
<a name="44" href="#44">44</a> <strong>private</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDISaveWorker.html">UDDISaveWorker</a> saver = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDISaveWorker.html">UDDISaveWorker</a>();
<a name="45" href="#45">45</a> <strong>private</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIDeleteWorker.html">UDDIDeleteWorker</a> deleter = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIDeleteWorker.html">UDDIDeleteWorker</a>();
<a name="46" href="#46">46</a>
<a name="47" href="#47">47</a> <em>/**<em>* Creates a new instance of UDDIManager */</em></em>
<a name="48" href="#48">48</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRUDDIManager.html">JAXRUDDIManager</a>() {
<a name="49" href="#49">49</a> <strong>if</strong> (System.getProperty(TransportFactory.PROPERTY_NAME)==<strong>null</strong>) {
<a name="50" href="#50">50</a> System.setProperty(TransportFactory.PROPERTY_NAME,
<a name="51" href="#51">51</a> <span class="string">"org.uddi4j.transport.ApacheAxisTransport"</span>);
<a name="52" href="#52">52</a> }
<a name="53" href="#53">53</a> }
<a name="54" href="#54">54</a>
<a name="55" href="#55">55</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRUDDIManager.html">JAXRUDDIManager</a>( String inquiry, String publish, String userid,
<a name="56" href="#56">56</a> String passwd )
<a name="57" href="#57">57</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="58" href="#58">58</a> <strong>this</strong>();
<a name="59" href="#59">59</a> getProxy(inquiry,publish,userid, passwd );
<a name="60" href="#60">60</a> }
<a name="61" href="#61">61</a>
<a name="62" href="#62">62</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRUDDIManager.html">JAXRUDDIManager</a>( Properties props)
<a name="63" href="#63">63</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="64" href="#64">64</a> <strong>this</strong>();
<a name="65" href="#65">65</a> <strong>if</strong>( props == <strong>null</strong> )
<a name="66" href="#66">66</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>(<span class="string">"Apache JAXR Impl:Connection Properties Null"</span>);
<a name="67" href="#67">67</a> <strong>try</strong>{
<a name="68" href="#68">68</a> proxy.setInquiryURL( props.getProperty(<span class="string">"javax.xml.registry.queryManagerURL"</span>) );
<a name="69" href="#69">69</a> proxy.setPublishURL( props.getProperty(<span class="string">"javax.xml.registry.lifeCycleManagerURL"</span>) );
<a name="70" href="#70">70</a> }<strong>catch</strong>( Exception e){
<a name="71" href="#71">71</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>(<span class="string">"Apache JAXR Impl:"</span>,e);
<a name="72" href="#72">72</a> }
<a name="73" href="#73">73</a>
<a name="74" href="#74">74</a> }<em class="comment">//end method</em>
<a name="75" href="#75">75</a>
<a name="76" href="#76">76</a> <strong>private</strong> <strong>void</strong> getProxy( String inquiry, String publish,
<a name="77" href="#77">77</a> String userid, String passwd )
<a name="78" href="#78">78</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="79" href="#79">79</a> <strong>try</strong> {
<a name="80" href="#80">80</a> <em class="comment">// Select the desired UDDI server node</em>
<a name="81" href="#81">81</a> proxy.setInquiryURL( inquiry );
<a name="82" href="#82">82</a> proxy.setPublishURL( publish );
<a name="83" href="#83">83</a>
<a name="84" href="#84">84</a> <em class="comment">// Pass in userid and password registered at the UDDI site</em>
<a name="85" href="#85">85</a> token = proxy.get_authToken( userid, passwd);
<a name="86" href="#86">86</a> }<strong>catch</strong>( Exception e){
<a name="87" href="#87">87</a> e.printStackTrace();
<a name="88" href="#88">88</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl Error::"</span>, e);
<a name="89" href="#89">89</a> }
<a name="90" href="#90">90</a> }
<a name="91" href="#91">91</a>
<a name="92" href="#92">92</a>
<a name="93" href="#93">93</a> <strong>public</strong> <strong>void</strong> setConnection( ConnectionImpl con)
<a name="94" href="#94">94</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="95" href="#95">95</a> connection = con;
<a name="96" href="#96">96</a> }
<a name="97" href="#97">97</a>
<a name="98" href="#98">98</a> <em class="comment">//--------------------------------------------------------------------------</em>
<a name="99" href="#99">99</a> <em class="comment">/*<em class="comment"> FIND METHODS */</em></em>
<a name="100" href="#100">100</a> <em class="comment">//-----------------------------------------------------------------------</em>
<a name="101" href="#101">101</a> <em>/**<em>*</em></em>
<a name="102" href="#102">102</a> <em> * Finds Businesses with give business key.</em>
<a name="103" href="#103">103</a> <em> */</em>
<a name="104" href="#104">104</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> find_business( Vector names,
<a name="105" href="#105">105</a> DiscoveryURLs discoveryURLs,
<a name="106" href="#106">106</a> IdentifierBag identifierBag,
<a name="107" href="#107">107</a> CategoryBag categoryBag,
<a name="108" href="#108">108</a> TModelBag tModelBag,
<a name="109" href="#109">109</a> FindQualifiers findQualifiers,
<a name="110" href="#110">110</a> <strong>int</strong> maxRows)
<a name="111" href="#111">111</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="112" href="#112">112</a> <strong>return</strong> finder.find_business(proxy,names,discoveryURLs,
<a name="113" href="#113">113</a> identifierBag,categoryBag,
<a name="114" href="#114">114</a> tModelBag,findQualifiers, maxRows );
<a name="115" href="#115">115</a> }
<a name="116" href="#116">116</a> <em>/**<em>*</em></em>
<a name="117" href="#117">117</a> <em> * Finds Services with give business key.</em>
<a name="118" href="#118">118</a> <em> */</em>
<a name="119" href="#119">119</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> find_service( String businessKey,
<a name="120" href="#120">120</a> Vector names, CategoryBag categoryBag,
<a name="121" href="#121">121</a> TModelBag tModelBag,
<a name="122" href="#122">122</a> FindQualifiers findQualifiers,
<a name="123" href="#123">123</a> <strong>int</strong> maxRows) throws JAXRException {
<a name="124" href="#124">124</a> <strong>return</strong> finder.find_service(proxy,businessKey,names,
<a name="125" href="#125">125</a> categoryBag,tModelBag,findQualifiers, maxRows );
<a name="126" href="#126">126</a> }
<a name="127" href="#127">127</a>
<a name="128" href="#128">128</a> <em class="comment">//--------------------------------------------------------------------------</em>
<a name="129" href="#129">129</a> <em class="comment">/*<em class="comment"> DELETE METHODS */</em></em>
<a name="130" href="#130">130</a> <em class="comment">//-----------------------------------------------------------------------</em>
<a name="131" href="#131">131</a>
<a name="132" href="#132">132</a> <em>/**<em>*</em></em>
<a name="133" href="#133">133</a> <em> * Deletes Businesses whose keys are in the Collection.</em>
<a name="134" href="#134">134</a> <em> */</em>
<a name="135" href="#135">135</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> delete_business( Collection orgkeys)
<a name="136" href="#136">136</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="137" href="#137">137</a> <strong>return</strong> deleter.delete_business(proxy,orgkeys,connection, token);
<a name="138" href="#138">138</a> }
<a name="139" href="#139">139</a> <em>/**<em>*</em></em>
<a name="140" href="#140">140</a> <em> * Deletes Services whose keys are in the Collection.</em>
<a name="141" href="#141">141</a> <em> */</em>
<a name="142" href="#142">142</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> delete_service( Collection skeys)
<a name="143" href="#143">143</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="144" href="#144">144</a> <strong>return</strong> deleter.delete_service(proxy,skeys,connection, token);
<a name="145" href="#145">145</a> }
<a name="146" href="#146">146</a>
<a name="147" href="#147">147</a> <em class="comment">//--------------------------------------------------------------------------</em>
<a name="148" href="#148">148</a> <em class="comment">/*<em class="comment"> SAVE METHODS */</em></em>
<a name="149" href="#149">149</a> <em class="comment">//-----------------------------------------------------------------------</em>
<a name="150" href="#150">150</a> <em>/**<em>*</em></em>
<a name="151" href="#151">151</a> <em> * Save Businesses whose details are in the Collection.</em>
<a name="152" href="#152">152</a> <em> */</em>
<a name="153" href="#153">153</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> save_business( Collection orgs)
<a name="154" href="#154">154</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="155" href="#155">155</a> System.out.println( <span class="string">"Method:save_business:Args length="</span>+orgs.size() );
<a name="156" href="#156">156</a> <strong>return</strong> saver.save_business( proxy, orgs, connection, token);
<a name="157" href="#157">157</a> }
<a name="158" href="#158">158</a> <em>/**<em>*</em></em>
<a name="159" href="#159">159</a> <em> * Save Services whose details are in the Collection.</em>
<a name="160" href="#160">160</a> <em> */</em>
<a name="161" href="#161">161</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> save_service( Collection services )
<a name="162" href="#162">162</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="163" href="#163">163</a> <strong>return</strong> saver.save_service( proxy, services, connection, token);
<a name="164" href="#164">164</a> }
<a name="165" href="#165">165</a>
<a name="166" href="#166">166</a> }<em class="comment">//end class</em>
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
1.1 ws-site/targets/scout/xref/org/apache/ws/scout/uddi/package-frame.html
Index: package-frame.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
<title>Apache Scout 1.0 Reference Package org.apache.ws.scout.uddi</title>
<link rel="stylesheet" href="../../../../../stylesheet.css" type="text/css" title="style"></link>
</head>
<body>
<h3>
<a href="package-summary.html" target="classFrame">org.apache.ws.scout.uddi</a>
</h3>
<h3>Classes</h3>
<ul>
<li>
<a href="JAXRHelper.html" target="classFrame">JAXRHelper</a>
</li>
<li>
<a href="JAXRUDDIManager.html" target="classFrame">JAXRUDDIManager</a>
</li>
<li>
<a href="UDDIDeleteWorker.html" target="classFrame">UDDIDeleteWorker</a>
</li>
<li>
<a href="UDDIFindWorker.html" target="classFrame">UDDIFindWorker</a>
</li>
<li>
<a href="UDDIHelper.html" target="classFrame">UDDIHelper</a>
</li>
<li>
<a href="UDDISaveWorker.html" target="classFrame">UDDISaveWorker</a>
</li>
</ul>
</body>
</html>
1.1 ws-site/targets/scout/xref/org/apache/ws/scout/uddi/package-summary.html
Index: package-summary.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
<title>Apache Scout 1.0 Reference Package </title>
<link rel="stylesheet" href="../../../../../stylesheet.css" type="text/css" title="style"></link>
</head>
<body>
<div class="overview">
<ul>
<li>
<a href="../../../../../overview-summary.html">Overview</a>
</li>
<li class="selected">Package</li>
</ul>
</div>
<div class="framenoframe">
<ul>
<li>
<a href="../../../../../index.html" target="_top">FRAMES</a>
</li>
<li>
<a href="package-summary.html" target="_top">NO FRAMES</a>
</li>
</ul>
</div>
<h2>Package org.apache.ws.scout.uddi</h2>
<table class="summary">
<thead>
<tr>
<th>Class Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="JAXRHelper.html" target="classFrame">JAXRHelper</a>
</td>
</tr>
<tr>
<td>
<a href="JAXRUDDIManager.html" target="classFrame">JAXRUDDIManager</a>
</td>
</tr>
<tr>
<td>
<a href="UDDIDeleteWorker.html" target="classFrame">UDDIDeleteWorker</a>
</td>
</tr>
<tr>
<td>
<a href="UDDIFindWorker.html" target="classFrame">UDDIFindWorker</a>
</td>
</tr>
<tr>
<td>
<a href="UDDIHelper.html" target="classFrame">UDDIHelper</a>
</td>
</tr>
<tr>
<td>
<a href="UDDISaveWorker.html" target="classFrame">UDDISaveWorker</a>
</td>
</tr>
</tbody>
</table>
<div class="overview">
<ul>
<li>
<a href="../../../../../overview-summary.html">Overview</a>
</li>
<li class="selected">Package</li>
</ul>
</div>
<div class="framenoframe">
<ul>
<li>
<a href="../../../../../index.html" target="_top">FRAMES</a>
</li>
<li>
<a href="package-summary.html" target="_top">NO FRAMES</a>
</li>
</ul>
</div>
<hr></hr>
Copyright © Apache Web Services. All Rights Reserved.
</body>
</html>
1.1 ws-site/targets/scout/xref/org/apache/ws/scout/uddi/UDDIDeleteWorker.html
Index: UDDIDeleteWorker.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>UDDIDeleteWorker xref</title>
<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
</head>
<body>
<div id="overview"><a href="../../../../../../apidocs/org/apache/ws/scout/uddi/UDDIDeleteWorker.html">View Javadoc</a></div><pre>
<a name="1" href="#1">1</a> <em class="comment">/*</em>
<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
<a name="3" href="#3">3</a> <em class="comment"> *</em>
<a name="4" href="#4">4</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
<a name="5" href="#5">5</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
<a name="6" href="#6">6</a> <em class="comment"> * You may obtain a copy of the License at</em>
<a name="7" href="#7">7</a> <em class="comment"> *</em>
<a name="8" href="#8">8</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
<a name="9" href="#9">9</a> <em class="comment"> *</em>
<a name="10" href="#10">10</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
<a name="11" href="#11">11</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
<a name="12" href="#12">12</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
<a name="13" href="#13">13</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
<a name="14" href="#14">14</a> <em class="comment"> * limitations under the License.</em>
<a name="15" href="#15">15</a> <em class="comment"> */</em>
<a name="16" href="#16">16</a> <strong>package</strong> <a href="../../../../../org/apache/ws/scout/uddi/package-summary.html">org.apache.ws.scout.uddi</a>;
<a name="17" href="#17">17</a>
<a name="18" href="#18">18</a> <strong>import</strong> java.util.ArrayList;
<a name="19" href="#19">19</a> <strong>import</strong> java.util.Collection;
<a name="20" href="#20">20</a> <strong>import</strong> java.util.Iterator;
<a name="21" href="#21">21</a>
<a name="22" href="#22">22</a> <strong>import</strong> javax.xml.registry.JAXRException;
<a name="23" href="#23">23</a>
<a name="24" href="#24">24</a> <strong>import</strong> org.apache.ws.scout.registry.BulkResponseImpl;
<a name="25" href="#25">25</a> <strong>import</strong> org.apache.ws.scout.registry.ConnectionImpl;
<a name="26" href="#26">26</a> <strong>import</strong> org.apache.ws.scout.registry.infomodel.KeyImpl;
<a name="27" href="#27">27</a>
<a name="28" href="#28">28</a> <strong>import</strong> org.uddi4j.UDDIException;
<a name="29" href="#29">29</a> <strong>import</strong> org.uddi4j.client.UDDIProxy;
<a name="30" href="#30">30</a> <strong>import</strong> org.uddi4j.response.AuthToken;
<a name="31" href="#31">31</a> <strong>import</strong> org.uddi4j.response.DispositionReport;
<a name="32" href="#32">32</a> <strong>import</strong> org.uddi4j.transport.TransportException;
<a name="33" href="#33">33</a>
<a name="34" href="#34">34</a> <em>/**<em>*</em></em>
<a name="35" href="#35">35</a> <em> * Utility Class that deals with deletion of UDDI Objects.</em>
<a name="36" href="#36">36</a> <em> * @author Anil Saldhana <anil@apache.org></em>
<a name="37" href="#37">37</a> <em> */</em>
<a name="38" href="#38">38</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIDeleteWorker.html">UDDIDeleteWorker</a> {
<a name="39" href="#39">39</a> <strong>private</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRHelper.html">JAXRHelper</a> jaxr = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRHelper.html">JAXRHelper</a>();
<a name="40" href="#40">40</a>
<a name="41" href="#41">41</a> <em>/**<em>*</em></em>
<a name="42" href="#42">42</a> <em> * Delete businesses with given business keys.</em>
<a name="43" href="#43">43</a> <em> */</em>
<a name="44" href="#44">44</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> delete_business( UDDIProxy proxy,
<a name="45" href="#45">45</a> Collection orgkeys, <a href="../../../../../org/apache/ws/scout/registry/ConnectionImpl.html">ConnectionImpl</a> connection,
<a name="46" href="#46">46</a> AuthToken token)
<a name="47" href="#47">47</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="48" href="#48">48</a> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> bulk = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a>();
<a name="49" href="#49">49</a> Collection coll = <strong>new</strong> ArrayList();
<a name="50" href="#50">50</a> Collection exceptions = <strong>new</strong> ArrayList();
<a name="51" href="#51">51</a>
<a name="52" href="#52">52</a> <strong>try</strong>{
<a name="53" href="#53">53</a> token = proxy.get_authToken( connection.getUserName(),
<a name="54" href="#54">54</a> connection.getPassword() );
<a name="55" href="#55">55</a> Iterator iter = orgkeys.iterator();
<a name="56" href="#56">56</a> <strong>while</strong>( iter.hasNext()){
<a name="57" href="#57">57</a> <a href="../../../../../org/apache/ws/scout/registry/infomodel/KeyImpl.html">KeyImpl</a> key = (KeyImpl)iter.next();
<a name="58" href="#58">58</a> String keyid = key.getId();
<a name="59" href="#59">59</a>
<a name="60" href="#60">60</a> <em class="comment">// Delete business </em>
<a name="61" href="#61">61</a> DispositionReport dr = proxy.delete_business(
<a name="62" href="#62">62</a> token.getAuthInfoString(), keyid );
<a name="63" href="#63">63</a>
<a name="64" href="#64">64</a> <strong>if</strong>( dr.success()) { coll.add( key ); <strong>continue</strong>;}
<a name="65" href="#65">65</a>
<a name="66" href="#66">66</a> exceptions.addAll(jaxr.prepareBulkResponseExceptions( dr, key));
<a name="67" href="#67">67</a>
<a name="68" href="#68">68</a> }<em class="comment">//while iter</em>
<a name="69" href="#69">69</a>
<a name="70" href="#70">70</a> bulk.setCollection( coll );
<a name="71" href="#71">71</a> bulk.setExceptions( exceptions);
<a name="72" href="#72">72</a>
<a name="73" href="#73">73</a> }<strong>catch</strong>( UDDIException ud){
<a name="74" href="#74">74</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="75" href="#75">75</a> }<strong>catch</strong>( TransportException tran){
<a name="76" href="#76">76</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>,tran);
<a name="77" href="#77">77</a> }
<a name="78" href="#78">78</a> <strong>return</strong> bulk;
<a name="79" href="#79">79</a> }
<a name="80" href="#80">80</a>
<a name="81" href="#81">81</a> <em>/**<em>*</em></em>
<a name="82" href="#82">82</a> <em> * Delete services with given business keys.</em>
<a name="83" href="#83">83</a> <em> */</em>
<a name="84" href="#84">84</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> delete_service( UDDIProxy proxy,
<a name="85" href="#85">85</a> Collection skeys, <a href="../../../../../org/apache/ws/scout/registry/ConnectionImpl.html">ConnectionImpl</a> connection,
<a name="86" href="#86">86</a> AuthToken token)
<a name="87" href="#87">87</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="88" href="#88">88</a> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> bulk = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a>();
<a name="89" href="#89">89</a> Collection coll = <strong>new</strong> ArrayList();
<a name="90" href="#90">90</a> Collection exceptions = <strong>new</strong> ArrayList();
<a name="91" href="#91">91</a>
<a name="92" href="#92">92</a> <strong>try</strong>{
<a name="93" href="#93">93</a> token = proxy.get_authToken( connection.getUserName(),
<a name="94" href="#94">94</a> connection.getPassword() );
<a name="95" href="#95">95</a> Iterator iter = skeys.iterator();
<a name="96" href="#96">96</a> <strong>while</strong>( iter.hasNext()){
<a name="97" href="#97">97</a> <a href="../../../../../org/apache/ws/scout/registry/infomodel/KeyImpl.html">KeyImpl</a> key = (KeyImpl)iter.next();
<a name="98" href="#98">98</a> String keyid = key.getId();
<a name="99" href="#99">99</a>
<a name="100" href="#100">100</a> <em class="comment">// Delete business </em>
<a name="101" href="#101">101</a> DispositionReport dr = proxy.delete_service(
<a name="102" href="#102">102</a> token.getAuthInfoString(), keyid );
<a name="103" href="#103">103</a>
<a name="104" href="#104">104</a> <strong>if</strong>( dr.success()) { coll.add( key ); <strong>continue</strong>;}
<a name="105" href="#105">105</a>
<a name="106" href="#106">106</a> exceptions.addAll(jaxr.prepareBulkResponseExceptions( dr, key));
<a name="107" href="#107">107</a> }<em class="comment">//while iter</em>
<a name="108" href="#108">108</a>
<a name="109" href="#109">109</a> bulk.setCollection( coll );
<a name="110" href="#110">110</a> bulk.setExceptions( exceptions);
<a name="111" href="#111">111</a>
<a name="112" href="#112">112</a> }<strong>catch</strong>( UDDIException ud){
<a name="113" href="#113">113</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="114" href="#114">114</a> }<strong>catch</strong>( TransportException tran){
<a name="115" href="#115">115</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>,tran);
<a name="116" href="#116">116</a> }
<a name="117" href="#117">117</a> <strong>return</strong> bulk;
<a name="118" href="#118">118</a> }
<a name="119" href="#119">119</a>
<a name="120" href="#120">120</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
1.1 ws-site/targets/scout/xref/org/apache/ws/scout/uddi/UDDIFindWorker.html
Index: UDDIFindWorker.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>UDDIFindWorker xref</title>
<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
</head>
<body>
<div id="overview"><a href="../../../../../../apidocs/org/apache/ws/scout/uddi/UDDIFindWorker.html">View Javadoc</a></div><pre>
<a name="1" href="#1">1</a> <em class="comment">/*</em>
<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
<a name="3" href="#3">3</a> <em class="comment"> *</em>
<a name="4" href="#4">4</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
<a name="5" href="#5">5</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
<a name="6" href="#6">6</a> <em class="comment"> * You may obtain a copy of the License at</em>
<a name="7" href="#7">7</a> <em class="comment"> *</em>
<a name="8" href="#8">8</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
<a name="9" href="#9">9</a> <em class="comment"> *</em>
<a name="10" href="#10">10</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
<a name="11" href="#11">11</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
<a name="12" href="#12">12</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
<a name="13" href="#13">13</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
<a name="14" href="#14">14</a> <em class="comment"> * limitations under the License.</em>
<a name="15" href="#15">15</a> <em class="comment"> */</em>
<a name="16" href="#16">16</a> <strong>package</strong> <a href="../../../../../org/apache/ws/scout/uddi/package-summary.html">org.apache.ws.scout.uddi</a>;
<a name="17" href="#17">17</a>
<a name="18" href="#18">18</a> <strong>import</strong> java.util.ArrayList;
<a name="19" href="#19">19</a> <strong>import</strong> java.util.Collection;
<a name="20" href="#20">20</a> <strong>import</strong> java.util.Vector;
<a name="21" href="#21">21</a>
<a name="22" href="#22">22</a> <strong>import</strong> javax.xml.registry.JAXRException;
<a name="23" href="#23">23</a> <strong>import</strong> javax.xml.registry.infomodel.Organization;
<a name="24" href="#24">24</a> <strong>import</strong> javax.xml.registry.infomodel.Service;
<a name="25" href="#25">25</a>
<a name="26" href="#26">26</a> <strong>import</strong> org.apache.ws.scout.registry.BulkResponseImpl;
<a name="27" href="#27">27</a> <strong>import</strong> org.uddi4j.UDDIException;
<a name="28" href="#28">28</a> <strong>import</strong> org.uddi4j.client.UDDIProxy;
<a name="29" href="#29">29</a> <strong>import</strong> org.uddi4j.response.BusinessInfo;
<a name="30" href="#30">30</a> <strong>import</strong> org.uddi4j.response.BusinessList;
<a name="31" href="#31">31</a> <strong>import</strong> org.uddi4j.response.ServiceInfo;
<a name="32" href="#32">32</a> <strong>import</strong> org.uddi4j.response.ServiceList;
<a name="33" href="#33">33</a> <strong>import</strong> org.uddi4j.transport.TransportException;
<a name="34" href="#34">34</a> <strong>import</strong> org.uddi4j.util.CategoryBag;
<a name="35" href="#35">35</a> <strong>import</strong> org.uddi4j.util.DiscoveryURLs;
<a name="36" href="#36">36</a> <strong>import</strong> org.uddi4j.util.FindQualifiers;
<a name="37" href="#37">37</a> <strong>import</strong> org.uddi4j.util.IdentifierBag;
<a name="38" href="#38">38</a> <strong>import</strong> org.uddi4j.util.TModelBag;
<a name="39" href="#39">39</a>
<a name="40" href="#40">40</a> <em>/**<em>*</em></em>
<a name="41" href="#41">41</a> <em> * Helper Class that deals with finding UDDI Objects from the registry</em>
<a name="42" href="#42">42</a> <em> * @author Anil Saldhana <anil@apache.org></em>
<a name="43" href="#43">43</a> <em> */</em>
<a name="44" href="#44">44</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIFindWorker.html">UDDIFindWorker</a> {
<a name="45" href="#45">45</a> <strong>private</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRHelper.html">JAXRHelper</a> jaxr = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/uddi/JAXRHelper.html">JAXRHelper</a>();
<a name="46" href="#46">46</a>
<a name="47" href="#47">47</a> <em class="comment">// --------------------------------------------------------------------------</em>
<a name="48" href="#48">48</a> <em class="comment">/*<em class="comment"> FIND METHODS */</em></em>
<a name="49" href="#49">49</a> <em class="comment">//-----------------------------------------------------------------------</em>
<a name="50" href="#50">50</a>
<a name="51" href="#51">51</a> <em>/**<em>*</em></em>
<a name="52" href="#52">52</a> <em> * Find Businesses given business keys and pattern.</em>
<a name="53" href="#53">53</a> <em> */</em>
<a name="54" href="#54">54</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> find_business( UDDIProxy proxy, Vector names,
<a name="55" href="#55">55</a> DiscoveryURLs discoveryURLs,
<a name="56" href="#56">56</a> IdentifierBag identifierBag,
<a name="57" href="#57">57</a> CategoryBag categoryBag,
<a name="58" href="#58">58</a> TModelBag tModelBag,
<a name="59" href="#59">59</a> FindQualifiers findQualifiers,
<a name="60" href="#60">60</a> <strong>int</strong> maxRows)
<a name="61" href="#61">61</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="62" href="#62">62</a> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> bulk = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a>();
<a name="63" href="#63">63</a> <strong>try</strong>{
<a name="64" href="#64">64</a> BusinessList bizList = proxy.find_business(names,
<a name="65" href="#65">65</a> discoveryURLs, identifierBag,
<a name="66" href="#66">66</a> categoryBag, tModelBag,
<a name="67" href="#67">67</a> findQualifiers, maxRows);
<a name="68" href="#68">68</a>
<a name="69" href="#69">69</a> Collection coll = <strong>new</strong> ArrayList();
<a name="70" href="#70">70</a> <em class="comment">//Create JAXR Organization Objects now</em>
<a name="71" href="#71">71</a> Vector bizInfoVect = bizList.getBusinessInfos().getBusinessInfoVector();
<a name="72" href="#72">72</a> <strong>for</strong>( <strong>int</strong> i = 0; bizInfoVect!= <strong>null</strong> && i < bizInfoVect.size(); i++ )
<a name="73" href="#73">73</a> {
<a name="74" href="#74">74</a> BusinessInfo bizInfo = (BusinessInfo)bizInfoVect.elementAt(i);
<a name="75" href="#75">75</a> <a href="../../../../../javax/xml/registry/infomodel/Organization.html">Organization</a> org = jaxr.createJAXROrganization( bizInfo) ;
<a name="76" href="#76">76</a> <em class="comment">//Add the Org to the collection</em>
<a name="77" href="#77">77</a> coll.add( org );
<a name="78" href="#78">78</a> }<em class="comment">//end for </em>
<a name="79" href="#79">79</a>
<a name="80" href="#80">80</a> bulk.setCollection( coll );
<a name="81" href="#81">81</a>
<a name="82" href="#82">82</a> }<strong>catch</strong>( UDDIException ud){
<a name="83" href="#83">83</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="84" href="#84">84</a> }<strong>catch</strong>( TransportException tran){
<a name="85" href="#85">85</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>,tran);
<a name="86" href="#86">86</a> }
<a name="87" href="#87">87</a>
<a name="88" href="#88">88</a> <strong>return</strong> bulk;
<a name="89" href="#89">89</a> }
<a name="90" href="#90">90</a>
<a name="91" href="#91">91</a> <em>/**<em>*</em></em>
<a name="92" href="#92">92</a> <em> * Find Services given business keys and pattern.</em>
<a name="93" href="#93">93</a> <em> */</em>
<a name="94" href="#94">94</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> find_service( UDDIProxy proxy,String businessKey,
<a name="95" href="#95">95</a> Vector names, CategoryBag categoryBag,
<a name="96" href="#96">96</a> TModelBag tModelBag,
<a name="97" href="#97">97</a> FindQualifiers findQualifiers,
<a name="98" href="#98">98</a> <strong>int</strong> maxRows) throws JAXRException {
<a name="99" href="#99">99</a> System.out.println( <span class="string">"Inside find_service in UDDIFindHelper"</span>);
<a name="100" href="#100">100</a> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> bulk = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a>();
<a name="101" href="#101">101</a> <strong>try</strong>{
<a name="102" href="#102">102</a> ServiceList serveList = proxy.find_service(businessKey,names,
<a name="103" href="#103">103</a> categoryBag, tModelBag,
<a name="104" href="#104">104</a> findQualifiers, maxRows);
<a name="105" href="#105">105</a>
<a name="106" href="#106">106</a> Collection coll = <strong>new</strong> ArrayList();
<a name="107" href="#107">107</a> <em class="comment">//Create JAXR Organization Objects now</em>
<a name="108" href="#108">108</a> Vector sInfoVect = serveList.getServiceInfos().getServiceInfoVector();
<a name="109" href="#109">109</a> <strong>for</strong>( <strong>int</strong> i = 0; sInfoVect!= <strong>null</strong> && i < sInfoVect.size(); i++ )
<a name="110" href="#110">110</a> {
<a name="111" href="#111">111</a> ServiceInfo sInfo = (ServiceInfo)sInfoVect.elementAt(i);
<a name="112" href="#112">112</a> <a href="../../../../../javax/xml/registry/infomodel/Service.html">Service</a> serve = jaxr.createJAXRService( sInfo) ;
<a name="113" href="#113">113</a> <em class="comment">//Add the Org to the collection</em>
<a name="114" href="#114">114</a> coll.add( serve );
<a name="115" href="#115">115</a> }<em class="comment">//end for </em>
<a name="116" href="#116">116</a>
<a name="117" href="#117">117</a> bulk.setCollection( coll );
<a name="118" href="#118">118</a>
<a name="119" href="#119">119</a> }<strong>catch</strong>( UDDIException ud){
<a name="120" href="#120">120</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="121" href="#121">121</a> }<strong>catch</strong>( TransportException tran){
<a name="122" href="#122">122</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>,tran);
<a name="123" href="#123">123</a> }
<a name="124" href="#124">124</a> <strong>return</strong> bulk;
<a name="125" href="#125">125</a> }
<a name="126" href="#126">126</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
1.1 ws-site/targets/scout/xref/org/apache/ws/scout/uddi/UDDIHelper.html
Index: UDDIHelper.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>UDDIHelper xref</title>
<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
</head>
<body>
<div id="overview"><a href="../../../../../../apidocs/org/apache/ws/scout/uddi/UDDIHelper.html">View Javadoc</a></div><pre>
<a name="1" href="#1">1</a> <em class="comment">/*</em>
<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
<a name="3" href="#3">3</a> <em class="comment"> *</em>
<a name="4" href="#4">4</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
<a name="5" href="#5">5</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
<a name="6" href="#6">6</a> <em class="comment"> * You may obtain a copy of the License at</em>
<a name="7" href="#7">7</a> <em class="comment"> *</em>
<a name="8" href="#8">8</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
<a name="9" href="#9">9</a> <em class="comment"> *</em>
<a name="10" href="#10">10</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
<a name="11" href="#11">11</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
<a name="12" href="#12">12</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
<a name="13" href="#13">13</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
<a name="14" href="#14">14</a> <em class="comment"> * limitations under the License.</em>
<a name="15" href="#15">15</a> <em class="comment"> */</em>
<a name="16" href="#16">16</a> <strong>package</strong> <a href="../../../../../org/apache/ws/scout/uddi/package-summary.html">org.apache.ws.scout.uddi</a>;
<a name="17" href="#17">17</a>
<a name="18" href="#18">18</a> <strong>import</strong> java.util.Collection;
<a name="19" href="#19">19</a> <strong>import</strong> java.util.Iterator;
<a name="20" href="#20">20</a> <strong>import</strong> java.util.Locale;
<a name="21" href="#21">21</a> <strong>import</strong> java.util.Vector;
<a name="22" href="#22">22</a>
<a name="23" href="#23">23</a> <strong>import</strong> javax.xml.registry.JAXRException;
<a name="24" href="#24">24</a> <strong>import</strong> javax.xml.registry.infomodel.EmailAddress;
<a name="25" href="#25">25</a> <strong>import</strong> javax.xml.registry.infomodel.Organization;
<a name="26" href="#26">26</a> <strong>import</strong> javax.xml.registry.infomodel.PostalAddress;
<a name="27" href="#27">27</a> <strong>import</strong> javax.xml.registry.infomodel.RegistryObject;
<a name="28" href="#28">28</a> <strong>import</strong> javax.xml.registry.infomodel.Service;
<a name="29" href="#29">29</a> <strong>import</strong> javax.xml.registry.infomodel.TelephoneNumber;
<a name="30" href="#30">30</a> <strong>import</strong> javax.xml.registry.infomodel.User;
<a name="31" href="#31">31</a>
<a name="32" href="#32">32</a> <strong>import</strong> org.apache.ws.scout.registry.infomodel.InternationalStringImpl;
<a name="33" href="#33">33</a> <strong>import</strong> org.uddi4j.datatype.business.Address;
<a name="34" href="#34">34</a> <strong>import</strong> org.uddi4j.datatype.business.AddressLine;
<a name="35" href="#35">35</a> <strong>import</strong> org.uddi4j.datatype.business.BusinessEntity;
<a name="36" href="#36">36</a> <strong>import</strong> org.uddi4j.datatype.business.Contact;
<a name="37" href="#37">37</a> <strong>import</strong> org.uddi4j.datatype.business.Contacts;
<a name="38" href="#38">38</a> <strong>import</strong> org.uddi4j.datatype.business.Email;
<a name="39" href="#39">39</a> <strong>import</strong> org.uddi4j.datatype.business.Phone;
<a name="40" href="#40">40</a> <strong>import</strong> org.uddi4j.datatype.service.BusinessService;
<a name="41" href="#41">41</a> <strong>import</strong> org.uddi4j.datatype.service.BusinessServices;
<a name="42" href="#42">42</a>
<a name="43" href="#43">43</a> <em>/**<em>*</em></em>
<a name="44" href="#44">44</a> <em> * Helper class that creates UDDI4J objects from JAXR Objects sent from client.</em>
<a name="45" href="#45">45</a> <em> * @author Anil Saldhana <anil@apache.org></em>
<a name="46" href="#46">46</a> <em> */</em>
<a name="47" href="#47">47</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIHelper.html">UDDIHelper</a> {
<a name="48" href="#48">48</a> <em class="comment">// *****************************</em>
<a name="49" href="#49">49</a> <em class="comment">//UDDI Related Methods</em>
<a name="50" href="#50">50</a> /<em>/**<em>****************************</em></em>
<a name="51" href="#51">51</a> <em> </em>
<a name="52" href="#52">52</a> <em> </em>
<a name="53" href="#53">53</a> <em> /**</em>
<a name="54" href="#54">54</a> <em> * Package Protected:Gets UDDI4J BusinessService object from </em>
<a name="55" href="#55">55</a> <em> * JAXR Service Object.</em>
<a name="56" href="#56">56</a> <em> */</em>
<a name="57" href="#57">57</a> BusinessService getBusinessServiceFromJAXRService( Service serve )
<a name="58" href="#58">58</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="59" href="#59">59</a> BusinessService bs = <strong>new</strong> BusinessService();
<a name="60" href="#60">60</a> <strong>try</strong>{
<a name="61" href="#61">61</a> <a href="../../../../../org/apache/ws/scout/registry/infomodel/InternationalStringImpl.html">InternationalStringImpl</a> iname = (InternationalStringImpl)((RegistryObject) serve).getName();
<a name="62" href="#62">62</a> String name = iname.getValue();
<a name="63" href="#63">63</a> bs.setDefaultNameString( name, Locale.getDefault().getLanguage());
<a name="64" href="#64">64</a> bs.setBusinessKey( ((RegistryObject) serve).getKey().getId() );
<a name="65" href="#65">65</a> bs.setDefaultDescriptionString( ((RegistryObject) serve).getDescription().getValue() );
<a name="66" href="#66">66</a> System.out.println( <span class="string">"BusinessService="</span>+bs.toString());
<a name="67" href="#67">67</a> }<strong>catch</strong>(Exception ud){
<a name="68" href="#68">68</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="69" href="#69">69</a> }
<a name="70" href="#70">70</a> <strong>return</strong> bs;
<a name="71" href="#71">71</a> }
<a name="72" href="#72">72</a>
<a name="73" href="#73">73</a> <em>/**<em>*</em></em>
<a name="74" href="#74">74</a> <em> * Package Protected:Gets UDDI4J BusinessEntity object from JAXR Organization.</em>
<a name="75" href="#75">75</a> <em> */</em>
<a name="76" href="#76">76</a> BusinessEntity getBusinessEntityFromJAXROrg( Organization org )
<a name="77" href="#77">77</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="78" href="#78">78</a> BusinessEntity biz = <strong>new</strong> BusinessEntity();
<a name="79" href="#79">79</a> BusinessServices bss = <strong>new</strong> BusinessServices();
<a name="80" href="#80">80</a> Contacts cts = <strong>new</strong> Contacts();
<a name="81" href="#81">81</a> Vector bvect = <strong>new</strong> Vector();
<a name="82" href="#82">82</a> Vector cvect = <strong>new</strong> Vector();
<a name="83" href="#83">83</a>
<a name="84" href="#84">84</a> <strong>try</strong>{
<a name="85" href="#85">85</a> <em class="comment">//Lets get the Organization attributes at the top level</em>
<a name="86" href="#86">86</a> String language = Locale.getDefault().getLanguage();
<a name="87" href="#87">87</a>
<a name="88" href="#88">88</a> biz.setDefaultNameString( org.getName().getValue() , language);
<a name="89" href="#89">89</a> biz.setDefaultDescriptionString( org.getDescription().getValue() );
<a name="90" href="#90">90</a>
<a name="91" href="#91">91</a> Collection s = org.getServices();
<a name="92" href="#92">92</a> System.out.println( <span class="string">"?Org has services="</span>+s.isEmpty());
<a name="93" href="#93">93</a> Iterator iter = s.iterator();
<a name="94" href="#94">94</a> <strong>while</strong>( iter.hasNext()){
<a name="95" href="#95">95</a> BusinessService bs =
<a name="96" href="#96">96</a> getBusinessServiceFromJAXRService( (Service)iter.next());
<a name="97" href="#97">97</a> bvect.add(bs);
<a name="98" href="#98">98</a> }
<a name="99" href="#99">99</a>
<a name="100" href="#100">100</a> Collection users = org.getUsers();
<a name="101" href="#101">101</a> System.out.println( <span class="string">"?Org has users="</span>+users.isEmpty());
<a name="102" href="#102">102</a> Iterator it = users.iterator();
<a name="103" href="#103">103</a> <strong>while</strong>( it.hasNext()){
<a name="104" href="#104">104</a> Contact ct =
<a name="105" href="#105">105</a> getContactFromJAXRUser( (User)it.next());
<a name="106" href="#106">106</a> cvect.add(ct);
<a name="107" href="#107">107</a> }
<a name="108" href="#108">108</a>
<a name="109" href="#109">109</a> bss.setBusinessServiceVector( bvect );
<a name="110" href="#110">110</a> cts.setContactVector( cvect );
<a name="111" href="#111">111</a> biz.setContacts( cts );
<a name="112" href="#112">112</a> biz.setBusinessServices( bss );
<a name="113" href="#113">113</a> log(<span class="string">"Business="</span>+biz.toString());
<a name="114" href="#114">114</a> }<strong>catch</strong>(Exception ud){
<a name="115" href="#115">115</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="116" href="#116">116</a> }
<a name="117" href="#117">117</a> <strong>return</strong> biz;
<a name="118" href="#118">118</a>
<a name="119" href="#119">119</a> }
<a name="120" href="#120">120</a>
<a name="121" href="#121">121</a> <em>/**<em>*</em></em>
<a name="122" href="#122">122</a> <em> * Package Protected: Convert JAXR User Object to UDDI4J Contact</em>
<a name="123" href="#123">123</a> <em> */</em>
<a name="124" href="#124">124</a> Contact getContactFromJAXRUser( User user)
<a name="125" href="#125">125</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="126" href="#126">126</a> Contact ct = <strong>new</strong> Contact();
<a name="127" href="#127">127</a> Vector addvect = <strong>new</strong> Vector();
<a name="128" href="#128">128</a> Vector phonevect = <strong>new</strong> Vector();
<a name="129" href="#129">129</a> Vector emailvect = <strong>new</strong> Vector();
<a name="130" href="#130">130</a> <strong>try</strong>{
<a name="131" href="#131">131</a> ct.setPersonName( user.getPersonName().getFullName() );
<a name="132" href="#132">132</a> <em class="comment">//Postal Address</em>
<a name="133" href="#133">133</a> Collection postc = user.getPostalAddresses();
<a name="134" href="#134">134</a> Iterator iterator = postc.iterator();
<a name="135" href="#135">135</a> <strong>while</strong>( iterator.hasNext()){
<a name="136" href="#136">136</a> <a href="../../../../../javax/xml/registry/infomodel/PostalAddress.html">PostalAddress</a> post = (PostalAddress)iterator.next();
<a name="137" href="#137">137</a> addvect.add( getAddress( post) );
<a name="138" href="#138">138</a> }
<a name="139" href="#139">139</a> <em class="comment">//Phone Numbers</em>
<a name="140" href="#140">140</a> Collection ph = user.getTelephoneNumbers(<strong>null</strong>);
<a name="141" href="#141">141</a> Iterator it = ph.iterator();
<a name="142" href="#142">142</a> <strong>while</strong>( it.hasNext()){
<a name="143" href="#143">143</a> <a href="../../../../../javax/xml/registry/infomodel/TelephoneNumber.html">TelephoneNumber</a> t = (TelephoneNumber)it .next();
<a name="144" href="#144">144</a> Phone phone = <strong>new</strong> Phone();
<a name="145" href="#145">145</a> String str = t.getCountryCode()+<span class="string">"-"</span>+t.getAreaCode()+<span class="string">"-"</span>+t.getNumber();
<a name="146" href="#146">146</a> System.out.println( <span class="string">"Telephone="</span>+str );
<a name="147" href="#147">147</a> phone.setText( str );
<a name="148" href="#148">148</a> phonevect.add(phone);
<a name="149" href="#149">149</a> }
<a name="150" href="#150">150</a>
<a name="151" href="#151">151</a> <em class="comment">//Email Addresses</em>
<a name="152" href="#152">152</a> Collection ec = user.getEmailAddresses();
<a name="153" href="#153">153</a> Iterator iter = ec.iterator();
<a name="154" href="#154">154</a> <strong>while</strong>( iter.hasNext()){
<a name="155" href="#155">155</a> <a href="../../../../../javax/xml/registry/infomodel/EmailAddress.html">EmailAddress</a> ea = (EmailAddress)iter.next();
<a name="156" href="#156">156</a> Email email = <strong>new</strong> Email();
<a name="157" href="#157">157</a> email.setText( ea.getAddress() );
<a name="158" href="#158">158</a> email.setUseType(ea.getType());
<a name="159" href="#159">159</a> emailvect.add(email);
<a name="160" href="#160">160</a> }
<a name="161" href="#161">161</a> ct.setAddressVector( addvect );
<a name="162" href="#162">162</a> ct.setPhoneVector( phonevect );
<a name="163" href="#163">163</a> ct.setEmailVector( emailvect );
<a name="164" href="#164">164</a>
<a name="165" href="#165">165</a> }<strong>catch</strong>(Exception ud){
<a name="166" href="#166">166</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="167" href="#167">167</a> }
<a name="168" href="#168">168</a> <strong>return</strong> ct;
<a name="169" href="#169">169</a> }
<a name="170" href="#170">170</a>
<a name="171" href="#171">171</a> <em>/**<em>*</em></em>
<a name="172" href="#172">172</a> <em> * Package protected:Get UDDI4J Address given JAXR Postal Address</em>
<a name="173" href="#173">173</a> <em> */</em>
<a name="174" href="#174">174</a> Address getAddress( PostalAddress post)
<a name="175" href="#175">175</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="176" href="#176">176</a> Address address = <strong>new</strong> Address();
<a name="177" href="#177">177</a>
<a name="178" href="#178">178</a> Vector addvect = <strong>new</strong> Vector();
<a name="179" href="#179">179</a>
<a name="180" href="#180">180</a> String stnum = post.getStreetNumber();
<a name="181" href="#181">181</a> String st = post.getStreet();
<a name="182" href="#182">182</a> String city = post.getCity();
<a name="183" href="#183">183</a> String country = post.getCountry();
<a name="184" href="#184">184</a> String code = post.getPostalCode();
<a name="185" href="#185">185</a> String state = post.getStateOrProvince();
<a name="186" href="#186">186</a>
<a name="187" href="#187">187</a> AddressLine stnumAL = <strong>new</strong> AddressLine();
<a name="188" href="#188">188</a> stnumAL.setKeyName( <span class="string">"STREET_NUMBER"</span>);
<a name="189" href="#189">189</a> stnumAL.setKeyValue(stnum );
<a name="190" href="#190">190</a>
<a name="191" href="#191">191</a> AddressLine stAL = <strong>new</strong> AddressLine();
<a name="192" href="#192">192</a> stAL.setKeyName( <span class="string">"STREET"</span>);
<a name="193" href="#193">193</a> stAL.setKeyValue(st );
<a name="194" href="#194">194</a>
<a name="195" href="#195">195</a> AddressLine cityAL = <strong>new</strong> AddressLine();
<a name="196" href="#196">196</a> cityAL.setKeyName( <span class="string">"CITY"</span>);
<a name="197" href="#197">197</a> cityAL.setKeyValue(city );
<a name="198" href="#198">198</a>
<a name="199" href="#199">199</a> AddressLine countryAL = <strong>new</strong> AddressLine();
<a name="200" href="#200">200</a> countryAL.setKeyName( <span class="string">"COUNTRY"</span>);
<a name="201" href="#201">201</a> countryAL.setKeyValue(country );
<a name="202" href="#202">202</a>
<a name="203" href="#203">203</a> AddressLine codeAL = <strong>new</strong> AddressLine();
<a name="204" href="#204">204</a> codeAL.setKeyName( <span class="string">"POSTALCODE"</span>);
<a name="205" href="#205">205</a> codeAL.setKeyValue(code );
<a name="206" href="#206">206</a>
<a name="207" href="#207">207</a> AddressLine stateAL = <strong>new</strong> AddressLine();
<a name="208" href="#208">208</a> stateAL.setKeyName( <span class="string">"STATE"</span>);
<a name="209" href="#209">209</a> stateAL.setKeyValue(state );
<a name="210" href="#210">210</a>
<a name="211" href="#211">211</a> <em class="comment">//Add the AddressLine to vector</em>
<a name="212" href="#212">212</a> addvect.add(stnumAL);
<a name="213" href="#213">213</a> addvect.add(stAL);
<a name="214" href="#214">214</a> addvect.add(cityAL);
<a name="215" href="#215">215</a> addvect.add(countryAL);
<a name="216" href="#216">216</a> addvect.add(codeAL);
<a name="217" href="#217">217</a> addvect.add(stateAL);
<a name="218" href="#218">218</a>
<a name="219" href="#219">219</a> address.setAddressLineVector( addvect );
<a name="220" href="#220">220</a>
<a name="221" href="#221">221</a> <strong>return</strong> address;
<a name="222" href="#222">222</a> }
<a name="223" href="#223">223</a>
<a name="224" href="#224">224</a> <strong>private</strong> <strong>void</strong> log( String str ){
<a name="225" href="#225">225</a> System.out.println( str );
<a name="226" href="#226">226</a> }
<a name="227" href="#227">227</a>
<a name="228" href="#228">228</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
1.1 ws-site/targets/scout/xref/org/apache/ws/scout/uddi/UDDISaveWorker.html
Index: UDDISaveWorker.html
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>UDDISaveWorker xref</title>
<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
</head>
<body>
<div id="overview"><a href="../../../../../../apidocs/org/apache/ws/scout/uddi/UDDISaveWorker.html">View Javadoc</a></div><pre>
<a name="1" href="#1">1</a> <em class="comment">/*</em>
<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2001-2004 The Apache Software Foundation.</em>
<a name="3" href="#3">3</a> <em class="comment"> *</em>
<a name="4" href="#4">4</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
<a name="5" href="#5">5</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
<a name="6" href="#6">6</a> <em class="comment"> * You may obtain a copy of the License at</em>
<a name="7" href="#7">7</a> <em class="comment"> *</em>
<a name="8" href="#8">8</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
<a name="9" href="#9">9</a> <em class="comment"> *</em>
<a name="10" href="#10">10</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
<a name="11" href="#11">11</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
<a name="12" href="#12">12</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
<a name="13" href="#13">13</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
<a name="14" href="#14">14</a> <em class="comment"> * limitations under the License.</em>
<a name="15" href="#15">15</a> <em class="comment"> */</em>
<a name="16" href="#16">16</a> <strong>package</strong> <a href="../../../../../org/apache/ws/scout/uddi/package-summary.html">org.apache.ws.scout.uddi</a>;
<a name="17" href="#17">17</a>
<a name="18" href="#18">18</a> <strong>import</strong> java.util.ArrayList;
<a name="19" href="#19">19</a> <strong>import</strong> java.util.Collection;
<a name="20" href="#20">20</a> <strong>import</strong> java.util.Iterator;
<a name="21" href="#21">21</a> <strong>import</strong> java.util.Vector;
<a name="22" href="#22">22</a>
<a name="23" href="#23">23</a> <strong>import</strong> javax.xml.registry.JAXRException;
<a name="24" href="#24">24</a> <strong>import</strong> javax.xml.registry.JAXRResponse;
<a name="25" href="#25">25</a> <strong>import</strong> javax.xml.registry.infomodel.Organization;
<a name="26" href="#26">26</a> <strong>import</strong> javax.xml.registry.infomodel.Service;
<a name="27" href="#27">27</a>
<a name="28" href="#28">28</a> <strong>import</strong> org.apache.ws.scout.registry.BulkResponseImpl;
<a name="29" href="#29">29</a> <strong>import</strong> org.apache.ws.scout.registry.ConnectionImpl;
<a name="30" href="#30">30</a> <strong>import</strong> org.apache.ws.scout.registry.infomodel.KeyImpl;
<a name="31" href="#31">31</a> <strong>import</strong> org.uddi4j.UDDIException;
<a name="32" href="#32">32</a> <strong>import</strong> org.uddi4j.client.UDDIProxy;
<a name="33" href="#33">33</a> <strong>import</strong> org.uddi4j.datatype.business.BusinessEntity;
<a name="34" href="#34">34</a> <strong>import</strong> org.uddi4j.datatype.service.BusinessService;
<a name="35" href="#35">35</a> <strong>import</strong> org.uddi4j.response.AuthToken;
<a name="36" href="#36">36</a> <strong>import</strong> org.uddi4j.response.BusinessDetail;
<a name="37" href="#37">37</a> <strong>import</strong> org.uddi4j.response.ServiceDetail;
<a name="38" href="#38">38</a> <strong>import</strong> org.uddi4j.transport.TransportException;
<a name="39" href="#39">39</a>
<a name="40" href="#40">40</a> <em>/**<em>*</em></em>
<a name="41" href="#41">41</a> <em> * Helper class dealing with saving objects in UDDI Regisrty</em>
<a name="42" href="#42">42</a> <em> * @author Anil Saldhana <anil@apache.org></em>
<a name="43" href="#43">43</a> <em> */</em>
<a name="44" href="#44">44</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDISaveWorker.html">UDDISaveWorker</a> {
<a name="45" href="#45">45</a> <strong>private</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIHelper.html">UDDIHelper</a> uddi = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/uddi/UDDIHelper.html">UDDIHelper</a>();
<a name="46" href="#46">46</a>
<a name="47" href="#47">47</a> <em class="comment">// --------------------------------------------------------------------------</em>
<a name="48" href="#48">48</a> <em class="comment">/*<em class="comment"> SAVE METHODS */</em></em>
<a name="49" href="#49">49</a> <em class="comment">//-----------------------------------------------------------------------</em>
<a name="50" href="#50">50</a>
<a name="51" href="#51">51</a> <em>/**<em>*</em></em>
<a name="52" href="#52">52</a> <em> * Save businesses in the UDDI Registry.</em>
<a name="53" href="#53">53</a> <em> */</em>
<a name="54" href="#54">54</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> save_business( UDDIProxy proxy,
<a name="55" href="#55">55</a> Collection orgs, <a href="../../../../../org/apache/ws/scout/registry/ConnectionImpl.html">ConnectionImpl</a> connection,
<a name="56" href="#56">56</a> AuthToken token)
<a name="57" href="#57">57</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="58" href="#58">58</a> System.out.println( <span class="string">"Method:save_business:Args length="</span>+orgs.size() );
<a name="59" href="#59">59</a> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> bulk = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a>();
<a name="60" href="#60">60</a> Vector entityvect = <strong>new</strong> Vector();
<a name="61" href="#61">61</a>
<a name="62" href="#62">62</a> Collection coll = <strong>new</strong> ArrayList();
<a name="63" href="#63">63</a> Collection exceptions = <strong>new</strong> ArrayList();
<a name="64" href="#64">64</a>
<a name="65" href="#65">65</a> <strong>try</strong>{
<a name="66" href="#66">66</a> token = proxy.get_authToken( connection.getUserName(),
<a name="67" href="#67">67</a> connection.getPassword() );
<a name="68" href="#68">68</a> Iterator iter = orgs.iterator();
<a name="69" href="#69">69</a> <strong>while</strong>( iter.hasNext()){
<a name="70" href="#70">70</a> BusinessEntity en =
<a name="71" href="#71">71</a> uddi.getBusinessEntityFromJAXROrg( (Organization)iter.next());
<a name="72" href="#72">72</a> entityvect.add(en);
<a name="73" href="#73">73</a> }
<a name="74" href="#74">74</a> System.out.println( <span class="string">"Method:save_business: ENlength="</span>+entityvect.size() );
<a name="75" href="#75">75</a> <em class="comment">// Save business</em>
<a name="76" href="#76">76</a> BusinessDetail bd = proxy.save_business(
<a name="77" href="#77">77</a> token.getAuthInfoString(), entityvect);
<a name="78" href="#78">78</a>
<a name="79" href="#79">79</a> entityvect = bd.getBusinessEntityVector();
<a name="80" href="#80">80</a> System.out.println( <span class="string">"After Saving Business. Obtained vector size:"</span>+
<a name="81" href="#81">81</a> entityvect.size());
<a name="82" href="#82">82</a> <strong>for</strong>( <strong>int</strong> i = 0 ; entityvect != <strong>null</strong> && i < entityvect.size(); i++){
<a name="83" href="#83">83</a> BusinessEntity entity = (BusinessEntity)entityvect.elementAt(i);
<a name="84" href="#84">84</a> coll.add( <strong>new</strong> KeyImpl(entity.getBusinessKey() ));
<a name="85" href="#85">85</a> }
<a name="86" href="#86">86</a>
<a name="87" href="#87">87</a> bulk.setCollection( coll );
<a name="88" href="#88">88</a> bulk.setExceptions( exceptions);
<a name="89" href="#89">89</a> }<strong>catch</strong>( UDDIException ud){
<a name="90" href="#90">90</a> bulk.setStatus( JAXRResponse.STATUS_FAILURE);
<a name="91" href="#91">91</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="92" href="#92">92</a> }<strong>catch</strong>( TransportException tran){
<a name="93" href="#93">93</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>,tran);
<a name="94" href="#94">94</a> }
<a name="95" href="#95">95</a> <strong>return</strong> bulk;
<a name="96" href="#96">96</a> }
<a name="97" href="#97">97</a> <em>/**<em>*</em></em>
<a name="98" href="#98">98</a> <em> * Save services in the UDDI Registry.</em>
<a name="99" href="#99">99</a> <em> */</em>
<a name="100" href="#100">100</a> <strong>public</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> save_service( UDDIProxy proxy,Collection services,
<a name="101" href="#101">101</a> <a href="../../../../../org/apache/ws/scout/registry/ConnectionImpl.html">ConnectionImpl</a> connection,
<a name="102" href="#102">102</a> AuthToken token)
<a name="103" href="#103">103</a> throws <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a> {
<a name="104" href="#104">104</a> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a> bulk = <strong>new</strong> <a href="../../../../../org/apache/ws/scout/registry/BulkResponseImpl.html">BulkResponseImpl</a>();
<a name="105" href="#105">105</a> Vector svect = <strong>new</strong> Vector();
<a name="106" href="#106">106</a>
<a name="107" href="#107">107</a> Collection coll = <strong>new</strong> ArrayList();
<a name="108" href="#108">108</a> Collection exceptions = <strong>new</strong> ArrayList();
<a name="109" href="#109">109</a>
<a name="110" href="#110">110</a> <strong>try</strong>{
<a name="111" href="#111">111</a> token = proxy.get_authToken( connection.getUserName(),
<a name="112" href="#112">112</a> connection.getPassword() );
<a name="113" href="#113">113</a> Iterator iter = services.iterator();
<a name="114" href="#114">114</a> <strong>while</strong>( iter.hasNext()){
<a name="115" href="#115">115</a> BusinessService bs =
<a name="116" href="#116">116</a> uddi.getBusinessServiceFromJAXRService( (Service)iter.next());
<a name="117" href="#117">117</a> svect.add(bs);
<a name="118" href="#118">118</a> }
<a name="119" href="#119">119</a> <em class="comment">// Save Service</em>
<a name="120" href="#120">120</a> ServiceDetail sd = proxy.save_service(
<a name="121" href="#121">121</a> token.getAuthInfoString(), svect);
<a name="122" href="#122">122</a> svect = sd.getBusinessServiceVector();
<a name="123" href="#123">123</a> <strong>for</strong>( <strong>int</strong> i = 0 ; svect != <strong>null</strong> && i < svect.size(); i++){
<a name="124" href="#124">124</a> BusinessService entity = (BusinessService)svect.elementAt(i);
<a name="125" href="#125">125</a> coll.add( <strong>new</strong> KeyImpl(entity.getBusinessKey() ));
<a name="126" href="#126">126</a> }
<a name="127" href="#127">127</a> bulk.setCollection( coll );
<a name="128" href="#128">128</a> bulk.setExceptions( exceptions);
<a name="129" href="#129">129</a> }<strong>catch</strong>( UDDIException ud){
<a name="130" href="#130">130</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>, ud);
<a name="131" href="#131">131</a> }<strong>catch</strong>( TransportException tran){
<a name="132" href="#132">132</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../javax/xml/registry/JAXRException.html">JAXRException</a>( <span class="string">"Apache JAXR Impl:"</span>,tran);
<a name="133" href="#133">133</a> }
<a name="134" href="#134">134</a> <strong>return</strong> bulk;
<a name="135" href="#135">135</a> }
<a name="136" href="#136">136</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>