📄 jaxr4.html
字号:
</p><a name="wp87333"> </a><p class="pBodyRelative">The postal address for the primary contact will appear correctly with the JAXR <code class="cCode">PostalAddress</code> methods. Any postal addresses found that use other postal address schemes will appear as <code class="cCode">Slot</code> lines. </p><a name="wp87328"> </a><div class="pSmartList1"><li>If you are using a public registry, make sure to follow the instructions in <a href="JAXR4.html#wp77280">Running the JAXRDelete Example</a> to delete the organization you published.</li></div></ol></div><a name="wp87493"> </a><h4 class="pHeading3">Deleting a Classification Scheme</h4><a name="wp87494"> </a><p class="pBody">To delete the classification scheme you published after you have finished using it, run the <code class="cCode">JAXRDeleteScheme</code> program using the <code class="cCode">run-delete-scheme</code> target:</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">asant -Duuid-string=<code class="cVariable">uuidstring</code> run-delete-scheme<a name="wp87501"> </a></pre></div><a name="wp87528"> </a><p class="pBody">For the public UDDI registries, deleting a classification scheme removes it from the registry logically but not physically. The classification scheme will still be visible if, for example, you call the method <code class="cCode">QueryManager.getRegisteredObjects</code>. However, you can no longer use the classification scheme. Therefore, you may prefer not to delete the classification scheme from the registry, in case you want to use it again. The public registries normally allow you to own up to 10 of these objects.</p><a name="wp141034"> </a><h4 class="pHeading3">Publishing a Concept for a WSDL Document</h4><a name="wp141035"> </a><p class="pBody">To publish the location of the WSDL document for the JAX-RPC Hello Service, first deploy the service as described in <a href="JAXRPC4.html#wp115211">Creating a Web Service with JAX-RPC</a>.</p><a name="wp144320"> </a><p class="pBody">Then run the <code class="cCode">JAXRPublishConcept</code> program using the <code class="cCode">run-publish-concept</code> target:</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">asant run-publish-concept<a name="wp141039"> </a></pre></div><a name="wp141047"> </a><p class="pBody">The program output displays the UUID string of the new concept, which is named "Hello Concept." You will use this string in the next section.</p><a name="wp141048"> </a><p class="pBody">After you run the <code class="cCode">JAXRPublishConcept</code> program, you can run <code class="cCode">JAXRPublishHelloOrg</code> to publish an organization that uses this concept.</p><a name="wp141042"> </a><h4 class="pHeading3">Publishing an Organization with a WSDL Document in its Service Binding</h4><a name="wp144352"> </a><p class="pBody">To run the <code class="cCode">JAXRPublishHelloOrg</code> example, use the <code class="cCode">asant</code> target <code class="cCode">run-publish-hello-org</code>. Specify the string returned from <code class="cCode">JAXRPublishConcept</code> (including the <code class="cCode">uuid:</code> prefix) as input to this target:</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">asant -Duuid-string=<code class="cVariable">uuidstring</code> run-publish-hello-org<a name="wp144353"> </a></pre></div><a name="wp144350"> </a><p class="pBody">The program output displays the string value of the key of the new organization, which is named "Hello Organization."</p><a name="wp144414"> </a><p class="pBody">After you publish the organization, run the <code class="cCode">JAXRQueryByWSDLClassification</code> example to search for it. To delete it, run <code class="cCode">JAXRDelete</code>.</p><a name="wp144284"> </a><h4 class="pHeading3">Running the JAXRQueryByWSDLClassification Example</h4><a name="wp144285"> </a><p class="pBody">To run the <code class="cCode">JAXRQueryByWSDLClassification</code> example, use the <code class="cCode">asant</code> target <code class="cCode">run-query-wsdl</code>. Specify a <code class="cCode">query-string</code> argument on the command line to search the registry for specification concepts whose names contain that string. For example, the following command line searches for concepts whose names contain the string "helloconcept" (searching is not case-sensitive):</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">asant -Dquery-string=helloconcept run-query-wsdl<a name="wp144286"> </a></pre></div><a name="wp144287"> </a><p class="pBody">This example finds the concept and organization you published. A common string like "hello" returns many results from the public registries and is likely to run for several minutes.</p><a name="wp144277"> </a><h4 class="pHeading3">Deleting a Concept</h4><a name="wp144276"> </a><p class="pBody">To run the <code class="cCode">JAXRDeleteConcept</code> program, specify the UUID string displayed by the <code class="cCode">JAXRPublishConcept</code> program as input to the <code class="cCode">run-delete-concept</code> target:</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">asant -Duuid-string=<code class="cVariable">uuidString</code> run-delete-concept<a name="wp141043"> </a></pre></div><a name="wp144259"> </a><p class="pBody">Deleting a concept from a public UDDI registry is similar to deleting a classification scheme: the concept is removed logically but not physically. Do not delete the concept until after you have deleted any organizations that refer to it.</p><a name="wp87575"> </a><h4 class="pHeading3">Getting a List of Your Registry Objects</h4><a name="wp87576"> </a><p class="pBody">To get a list of the objects you own in the registry--organizations, classification schemes, and concepts--run the <code class="cCode">JAXRGetMyObjects</code> program by using the <code class="cCode">run-get-objects</code> target:</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">asant run-get-objects<a name="wp87580"> </a></pre></div><a name="wp89782"> </a><p class="pBody">If you run this program with the Java WSDP Registry Server, it returns all the standard UDDI taxonomies provided with the Registry Server, not just the objects you have created.</p><a name="wp85879"> </a><h4 class="pHeading3">Other Targets</h4><a name="wp71823"> </a><p class="pBody">To remove the <code class="cCode">build</code> directory and class files, use the command</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">asant clean<a name="wp71824"> </a></pre></div><a name="wp75266"> </a><p class="pBody">To obtain a syntax reminder for the targets, use the command</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative">asant -projecthelp<a name="wp75267"> </a></pre></div> </blockquote> <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"> <table width="550" summary="layout" id="SummaryNotReq1"> <tr> <td align="left" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a> </td> <td align="center" valign="center"><a accesskey="p" href="JAXR3.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JAXR5.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a> </td> <td align="right" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font> </font> </td> </tr> </table> <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"><p><font size="-1">All of the material in <em>The J2EE(TM) 1.4 Tutorial</em> is <a href="J2EETutorialFront2.html">copyright</a>-protected and may not be published in other workswithout express written permission from Sun Microsystems.</font> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -