uTools-Manuals/docs/java/javax/xml/ws/WebServiceRefs.html

83 lines
4.3 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
javax.xml.ws
</div>
<h2 class="title" title="Annotation Type WebServiceRefs">Annotation Type WebServiceRefs</h2>
</div><div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr/> <br/> <pre><a href="../../../java/lang/annotation/Documented.html" title="annotation in java.lang.annotation">@Documented</a>
<a href="../../../java/lang/annotation/Retention.html" title="annotation in java.lang.annotation">@Retention</a>(<a href="../../../java/lang/annotation/Retention.html#value--">value</a>=<a href="../../../java/lang/annotation/RetentionPolicy.html#RUNTIME">RUNTIME</a>)
<a href="../../../java/lang/annotation/Target.html" title="annotation in java.lang.annotation">@Target</a>(<a href="../../../java/lang/annotation/Target.html#value--">value</a>=<a href="../../../java/lang/annotation/ElementType.html#TYPE">TYPE</a>)
public @interface <span class="memberNameLabel">WebServiceRefs</span></pre>
<div class="block">
<span><code>WebServiceRefs</code>注释允许在类级别声明多个Web服务引用。</span>
<p> <span>它可以用于注入服务和代理实例。</span> <span>这些注入的引用不是线程安全的。</span> <span>如果引用由多个线程访问,则可以使用通常的同步技术来支持多个线程。</span> </p>
<p> <span>没有办法将Web服务功能与注入的实例相关联。</span> <span>如果实例需要配置Web服务功能请使用@WebServiceRef来注入资源及其功能。</span> </p>
<p> <span><b>示例</b> <code>StockQuoteProvider</code>代理实例和<code>StockQuoteService</code>服务实例使用@WebServiceRefs注入。</span> </p>
<pre> <span><code> @WebServiceRefs({@WebServiceRef(name="service/stockquoteservice", value=StockQuoteService.class), @WebServiceRef(name="service/stockquoteprovider", type=StockQuoteProvider.class, value=StockQuoteService.class}) public class MyClient { void init() { Context ic = new InitialContext(); StockQuoteService service = (StockQuoteService) ic.lookup("java:comp/env/service/stockquoteservice"); StockQuoteProvider port = (StockQuoteProvider) ic.lookup("java:comp/env/service/stockquoteprovider"); ... } ... } </code></span> </pre>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
2.0
</dd>
<dt>
<span class="seeLabel">另请参见:</span>
</dt>
<dd>
<span><a href="../../../javax/xml/ws/WebServiceRef.html" title="javax.xml.ws中的注释"><code>WebServiceRef</code></a></span>
</dd>
</dl> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.required.element.summary">
<!-- --> </a> <h3>Required Element Summary</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Required Element Summary table, listing required elements, and an explanation">
<caption>
<span>Required Elements</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Required Element and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../javax/xml/ws/WebServiceRef.html" title="annotation in javax.xml.ws">WebServiceRef</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/xml/ws/WebServiceRefs.html#value--">value</a></span></code>
<div class="block">
数组用于多个Web服务引用声明。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.element.detail">
<!-- --> </a> <h3>Element Detail</h3> <a name="value--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>value</h4> <pre>public abstract <a href="../../../javax/xml/ws/WebServiceRef.html" title="annotation in javax.xml.ws">WebServiceRef</a>[] value</pre>
<div class="block">
数组用于多个Web服务引用声明。
</div> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>