KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > ws > WebServiceRef


1 /*
2  * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */

5
6 package javax.xml.ws;
7
8 import java.lang.annotation.Documented JavaDoc;
9 import java.lang.annotation.Target JavaDoc;
10 import java.lang.annotation.ElementType JavaDoc;
11 import java.lang.annotation.Retention JavaDoc;
12 import java.lang.annotation.RetentionPolicy JavaDoc;
13
14 /**
15  * The <code>WebServiceRef</code> annotation is used to
16  * define a reference to a web service and
17  * (optionally) an injection target for it.
18  *
19  * Web service references are resources in the Java EE 5 sense.
20  *
21  * @see javax.annotation.Resource
22  *
23  * @since JAX-WS 2.0
24  *
25 **/

26
27 @Target JavaDoc({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
28 @Retention JavaDoc(RetentionPolicy.RUNTIME)
29 @Documented JavaDoc
30 public @interface WebServiceRef {
31      /**
32       * The JNDI name of the resource. For field annotations,
33       * the default is the field name. For method annotations,
34       * the default is the JavaBeans property name corresponding
35       * to the method. For class annotations, there is no default
36       * and this MUST be specified.
37       */

38      String JavaDoc name() default "";
39
40      /**
41       * The Java type of the resource. For field annotations,
42       * the default is the type of the field. For method annotations,
43       * the default is the type of the JavaBeans property.
44       * For class annotations, there is no default and this MUST be
45       * specified.
46       */

47      Class JavaDoc type() default Object JavaDoc.class ;
48
49      /**
50       * A product specific name that this resource should be mapped to.
51       * The name of this resource, as defined by the <code>name</code>
52       * element or defaulted, is a name that is local to the application
53       * component using the resource. (It's a name in the JNDI
54       * <code>java:comp/env</code> namespace.) Many application servers
55       * provide a way to map these local names to names of resources
56       * known to the application server. This mapped name is often a
57       * <i>global</i> JNDI name, but may be a name of any form. <p>
58       *
59       * Application servers are not required to support any particular
60       * form or type of mapped name, nor the ability to use mapped names.
61       * The mapped name is product-dependent and often installation-dependent.
62       * No use of a mapped name is portable.
63       */

64      String JavaDoc mappedName() default "";
65
66      /**
67       * The service class, always a type extending
68       * <code>javax.xml.ws.Service</code>. This element MUST be specified
69       * whenever the type of the reference is a service endpoint interface.
70       */

71      Class JavaDoc value() default Object JavaDoc.class ;
72
73      /**
74       * A URL pointing to the WSDL document for the web service.
75       * If not specified, the WSDL location specified by annotations
76       * on the resource type is used instead.
77       */

78      String JavaDoc wsdlLocation() default "";
79 }
80
Popular Tags