@Target(value={TYPE,METHOD,字段}) @Retention(value=RUNTIME) @Documented public @interface WebServiceRef
WebServiceRef注释用于定义对Web服务的引用,(可选)定义其注入目标。 
       它可以用于注入服务和代理实例。 
       这些注入的引用不是线程安全的。 
       如果引用由多个线程访问,则通常的同步技术可以用于支持多个线程。 
        Web服务引用是Java EE 5意义上的资源。 使用元注释WebServiceFeatureAnnotation注释的注释(例如Addressing )可以与WebServiceRef结合WebServiceRef 。 创建的引用必须配置注释的Web服务功能。 
 例如,在下面的代码中,注入的StockQuoteProvider代理必须启用WS-Addressing,如Addressing注释所指定。 
   public class MyClient { @Addressing @WebServiceRef(StockQuoteService.class) private StockQuoteProvider stockQuoteProvider; ... }   
        如果JAX-WS实现遇到与注释不支持的或无法识别的注解WebServiceFeatureAnnotation一个与指定WebServiceRef ,错误应予重视。 
Resource , WebServiceFeatureAnnotation 
       | Modifier and Type | Optional Element and Description | 
|---|---|
| String | lookup
              解析为目标Web服务引用的便携式JNDI查找名称。 
             | 
| String | mappedName
              该资源应映射到的产品特定名称。 
             | 
| String | name
              资源的JNDI名称。 
             | 
| 类<?> | type
              资源的Java类型。 
             | 
| 类<? extends Service> | value
              服务类,一个类型扩展 
              javax.xml.ws.Service。 | 
| String | wsdlLocation
              指向Web服务的WSDL文档的URL。 
             | 
public abstract String name
java:comp/env命名空间。 
          public abstract 类<?> type
public abstract String mappedName
name元素或默认值定义,是使用该资源的应用程序组件本地的名称。 
           (当指定了相对的JNDI名称时,它是JNDI java:comp/env命名空间中的一个名称)许多应用程序服务器提供了一种将这些本地名称映射到应用程序服务器已知的资源名称的方法。 
           此映射名称通常是全局 JNDI名称,但可以是任何形式的名称。 
           应用程序服务器不需要支持任何特定形式或类型的映射名称,也不支持使用映射名称的功能。 映射名称取决于产品,通常依赖于安装。 不使用映射名称是可移植的。
public abstract String wsdlLocation
public abstract String lookup
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.