WebServiceRef (Java EE 5)

Java EE API


javax.xml.ws Annotation Type WebServiceRef


@Target(value={TYPE,METHOD,FIELD})
@Retention(value=RUNTIME)
@Documented
public @interface WebServiceRef

Implements: Annotation
@Target(value={TYPE, METHOD, FIELD})
@Retention(value=RUNTIME)
@Documented

WebServiceRef 注释用于定义 Web 服务及其(可选)注入目标的引用。 对于 Java EE 5 来说 Web 服务引用属于资源。
英文文档:

The WebServiceRef annotation is used to define a reference to a web service and (optionally) an injection target for it. Web service references are resources in the Java EE 5 sense.

Since:
JAX-WS 2.0
See Also:
Resource

Optional Element Summary
 String
 String
 Class
 Class
 String
 

abstract public String name()
资源的 JNDI 名称。对于字段注释,默认值为字段名称。对于方法注释,默认值为与该方法对应的 JavaBean 属性名称。对于类注释,没有默认值,必须指定此项。
英文文档:

name

public abstract String name
The JNDI name of the resource. For field annotations, the default is the field name. For method annotations, the default is the JavaBeans property name corresponding to the method. For class annotations, there is no default and this must be specified.

Default:
""

abstract public Class<T> type()
资源的 Java 类型。对于字段注释,默认值为字段的类型。对于方法注释,默认值为 JavaBean 属性的类型。对于类注释,没有默认值,必须指定此项。
英文文档:

type

public abstract Class type
The Java type of the resource. For field annotations, the default is the type of the field. For method annotations, the default is the type of the JavaBeans property. For class annotations, there is no default and this must be specified.

Default:
java.lang.Object.class

abstract public String mappedName()
此资源应该映射到的特定于产品的名称。此资源的名称(由 name 元素定义或为默认值)是使用该资源的应用程序组件的本地名称。(它的名称位于 JNDI java:comp/env 名称空间中。)许多应用程序服务器都提供一种方式将这些本地名称映射到应用程序服务器已知的资源名称。此映射的名称通常是全局 JNDI 名称,但也可以是任何形式的名称。

应用程序服务器不需要支持任何特殊形式或类型的映射名称,也不需要具有使用映射名称的能力。映射的名称与产品有关,并且通常与安装有关。任何对映射名称的使用都不可移植。

英文文档:

mappedName

public abstract String mappedName
A product specific name that this resource should be mapped to. The name of this resource, as defined by the name element or defaulted, is a name that is local to the application component using the resource. (It's a name in the JNDI java:comp/env namespace.) Many application servers provide a way to map these local names to names of resources known to the application server. This mapped name is often a global JNDI name, but may be a name of any form.

Application servers are not required to support any particular form or type of mapped name, nor the ability to use mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is portable.

Default:
""

abstract public Class<T> value()
服务类,总是扩展 javax.xml.ws.Service 的类型。只要引用的类型是服务端点接口,就必须指定此元素。
英文文档:

value

public abstract Class value
The service class, always a type extending javax.xml.ws.Service. This element must be specified whenever the type of the reference is a service endpoint interface.

Default:
java.lang.Object.class

abstract public String wsdlLocation()
指向 Web 服务 WSDL 文档的 URL。如果没有指定,则使用在资源类型上由注释指定的 WSDL 位置。
英文文档:

wsdlLocation

public abstract String wsdlLocation
A URL pointing to the WSDL document for the web service. If not specified, the WSDL location specified by annotations on the resource type is used instead.

Default:
""


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!