8
|
1 |
/*
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
3 |
*
|
|
4 |
* This code is free software; you can redistribute it and/or modify it
|
|
5 |
* under the terms of the GNU General Public License version 2 only, as
|
|
6 |
* published by the Free Software Foundation. Sun designates this
|
|
7 |
* particular file as subject to the "Classpath" exception as provided
|
|
8 |
* by Sun in the LICENSE file that accompanied this code.
|
|
9 |
*
|
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
14 |
* accompanied this code).
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License version
|
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
19 |
*
|
|
20 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
21 |
* CA 95054 USA or visit www.sun.com if you need additional information or
|
|
22 |
* have any questions.
|
|
23 |
*/
|
|
24 |
|
|
25 |
/*
|
|
26 |
* Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
|
|
27 |
*/
|
|
28 |
|
|
29 |
package javax.jws;
|
|
30 |
|
|
31 |
import java.lang.annotation.Retention;
|
|
32 |
import java.lang.annotation.RetentionPolicy;
|
|
33 |
import java.lang.annotation.Target;
|
|
34 |
import java.lang.annotation.ElementType;
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Customizes the mapping of an individual parameter to a Web Service message part and XML element.
|
|
38 |
*
|
|
39 |
* @author Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
|
|
40 |
*/
|
|
41 |
@Retention(value = RetentionPolicy.RUNTIME)
|
|
42 |
@Target(value = {ElementType.PARAMETER})
|
|
43 |
public @interface WebParam {
|
|
44 |
|
|
45 |
/**
|
|
46 |
* The direction in which the parameter flows
|
|
47 |
*/
|
|
48 |
public enum Mode {
|
|
49 |
IN,
|
|
50 |
OUT,
|
|
51 |
INOUT
|
|
52 |
};
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Name of the parameter.
|
|
56 |
* <p>
|
|
57 |
* If the operation is rpc style and @WebParam.partName has not been specified, this is name of the wsdl:part
|
|
58 |
* representing the parameter.
|
|
59 |
* <br>
|
|
60 |
* If the operation is document style or the parameter maps to a header, this is the local name of the XML element
|
|
61 |
* representing the parameter.
|
|
62 |
* <p>
|
|
63 |
* A name MUST be specified if the operation is document style, the parameter style is BARE, and the mode is OUT
|
|
64 |
* or INOUT.
|
|
65 |
*
|
|
66 |
* @specdefault
|
|
67 |
* If the operation is document style and the parameter style is BARE, {@code @WebMethod.operationName}.<br>
|
|
68 |
* Otherwise, argN, where N represents the index of the parameter in the method signature (starting at arg0).
|
|
69 |
*/
|
|
70 |
String name() default "";
|
|
71 |
|
|
72 |
/**
|
|
73 |
* The name of the wsdl:part representing this parameter.
|
|
74 |
* <p>
|
|
75 |
* This is only used if the operation is rpc style or if the operation is document style and the parameter style
|
|
76 |
* is BARE.
|
|
77 |
*
|
|
78 |
* @specdefault {@code @WebParam.name}
|
|
79 |
*
|
|
80 |
* @since 2.0
|
|
81 |
*/
|
|
82 |
String partName() default "";
|
|
83 |
|
|
84 |
/**
|
|
85 |
* The XML namespace for the parameter.
|
|
86 |
* <p>
|
|
87 |
* Only used if the operation is document style or the paramater maps to a header.
|
|
88 |
* If the target namespace is set to "", this represents the empty namespace.
|
|
89 |
*
|
|
90 |
* @specdefault
|
|
91 |
* If the operation is document style, the parameter style is WRAPPED, and the parameter does not map to a
|
|
92 |
* header, the empty namespace.<br>
|
|
93 |
* Otherwise, the targetNamespace for the Web Service.
|
|
94 |
*/
|
|
95 |
String targetNamespace() default "";
|
|
96 |
|
|
97 |
/**
|
|
98 |
* The direction in which the parameter is flowing (One of IN, OUT, or INOUT).
|
|
99 |
* <p>
|
|
100 |
* The OUT and INOUT modes may only be specified for parameter types that conform to the definition of Holder types
|
|
101 |
* (JAX-WS 2.0 [5], section 2.3.3). Parameters that are Holder Types MUST be OUT or INOUT.
|
|
102 |
*
|
|
103 |
* @specdefault
|
|
104 |
* INOUT if a Holder type.<br>
|
|
105 |
* IN if not a Holder type.
|
|
106 |
*/
|
|
107 |
Mode mode() default Mode.IN;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* If true, the parameter is pulled from a message header rather then the message body.
|
|
111 |
*/
|
|
112 |
boolean header() default false;
|
|
113 |
};
|