jaxws/src/share/classes/javax/jws/WebMethod.java
author tbell
Fri, 06 Feb 2009 09:43:27 -0800
changeset 1952 dbdfa384e375
parent 8 474761f14bca
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
474761f14bca Initial load
duke
parents:
diff changeset
     1
/*
474761f14bca Initial load
duke
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
474761f14bca Initial load
duke
parents:
diff changeset
     3
 *
474761f14bca Initial load
duke
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
474761f14bca Initial load
duke
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
474761f14bca Initial load
duke
parents:
diff changeset
     6
 * published by the Free Software Foundation.  Sun designates this
474761f14bca Initial load
duke
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
474761f14bca Initial load
duke
parents:
diff changeset
     8
 * by Sun in the LICENSE file that accompanied this code.
474761f14bca Initial load
duke
parents:
diff changeset
     9
 *
474761f14bca Initial load
duke
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
474761f14bca Initial load
duke
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
474761f14bca Initial load
duke
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
474761f14bca Initial load
duke
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
474761f14bca Initial load
duke
parents:
diff changeset
    14
 * accompanied this code).
474761f14bca Initial load
duke
parents:
diff changeset
    15
 *
474761f14bca Initial load
duke
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
474761f14bca Initial load
duke
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
474761f14bca Initial load
duke
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
474761f14bca Initial load
duke
parents:
diff changeset
    19
 *
474761f14bca Initial load
duke
parents:
diff changeset
    20
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
474761f14bca Initial load
duke
parents:
diff changeset
    21
 * CA 95054 USA or visit www.sun.com if you need additional information or
474761f14bca Initial load
duke
parents:
diff changeset
    22
 * have any questions.
474761f14bca Initial load
duke
parents:
diff changeset
    23
 */
474761f14bca Initial load
duke
parents:
diff changeset
    24
474761f14bca Initial load
duke
parents:
diff changeset
    25
/*
474761f14bca Initial load
duke
parents:
diff changeset
    26
 * Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
474761f14bca Initial load
duke
parents:
diff changeset
    27
 */
474761f14bca Initial load
duke
parents:
diff changeset
    28
474761f14bca Initial load
duke
parents:
diff changeset
    29
package javax.jws;
474761f14bca Initial load
duke
parents:
diff changeset
    30
474761f14bca Initial load
duke
parents:
diff changeset
    31
import java.lang.annotation.Target;
474761f14bca Initial load
duke
parents:
diff changeset
    32
import java.lang.annotation.ElementType;
474761f14bca Initial load
duke
parents:
diff changeset
    33
import java.lang.annotation.Retention;
474761f14bca Initial load
duke
parents:
diff changeset
    34
import java.lang.annotation.RetentionPolicy;
474761f14bca Initial load
duke
parents:
diff changeset
    35
474761f14bca Initial load
duke
parents:
diff changeset
    36
/**
474761f14bca Initial load
duke
parents:
diff changeset
    37
 * Customizes a method that is exposed as a Web Service operation.
474761f14bca Initial load
duke
parents:
diff changeset
    38
 * The associated method must be public and its parameters return value,
474761f14bca Initial load
duke
parents:
diff changeset
    39
 * and exceptions must follow the rules defined in JAX-RPC 1.1, section 5.
474761f14bca Initial load
duke
parents:
diff changeset
    40
 *
474761f14bca Initial load
duke
parents:
diff changeset
    41
 *  The method is not required to throw java.rmi.RemoteException.
474761f14bca Initial load
duke
parents:
diff changeset
    42
 *
474761f14bca Initial load
duke
parents:
diff changeset
    43
 * @author Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
474761f14bca Initial load
duke
parents:
diff changeset
    44
 */
474761f14bca Initial load
duke
parents:
diff changeset
    45
@Retention(value = RetentionPolicy.RUNTIME)
474761f14bca Initial load
duke
parents:
diff changeset
    46
@Target({ElementType.METHOD})
474761f14bca Initial load
duke
parents:
diff changeset
    47
public @interface WebMethod {
474761f14bca Initial load
duke
parents:
diff changeset
    48
474761f14bca Initial load
duke
parents:
diff changeset
    49
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    50
     * Name of the wsdl:operation matching this method.
474761f14bca Initial load
duke
parents:
diff changeset
    51
     *
474761f14bca Initial load
duke
parents:
diff changeset
    52
     * @specdefault Name of the Java method.
474761f14bca Initial load
duke
parents:
diff changeset
    53
     */
474761f14bca Initial load
duke
parents:
diff changeset
    54
    String operationName() default "";
474761f14bca Initial load
duke
parents:
diff changeset
    55
474761f14bca Initial load
duke
parents:
diff changeset
    56
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    57
     * The action for this operation.
474761f14bca Initial load
duke
parents:
diff changeset
    58
     * <p>
474761f14bca Initial load
duke
parents:
diff changeset
    59
     * For SOAP bindings, this determines the value of the soap action.
474761f14bca Initial load
duke
parents:
diff changeset
    60
     */
474761f14bca Initial load
duke
parents:
diff changeset
    61
    String action() default "";
474761f14bca Initial load
duke
parents:
diff changeset
    62
474761f14bca Initial load
duke
parents:
diff changeset
    63
    /**
474761f14bca Initial load
duke
parents:
diff changeset
    64
     * Marks a method to NOT be exposed as a web method.
474761f14bca Initial load
duke
parents:
diff changeset
    65
     * <p>
474761f14bca Initial load
duke
parents:
diff changeset
    66
     * Used to stop an inherited method from being exposed as part of this web service.
474761f14bca Initial load
duke
parents:
diff changeset
    67
     * If this element is specified, other elements MUST NOT be specified for the @WebMethod.
474761f14bca Initial load
duke
parents:
diff changeset
    68
     * <p>
474761f14bca Initial load
duke
parents:
diff changeset
    69
     * <i>This member-value is not allowed on endpoint interfaces.</i>
474761f14bca Initial load
duke
parents:
diff changeset
    70
     *
474761f14bca Initial load
duke
parents:
diff changeset
    71
     * @since 2.0
474761f14bca Initial load
duke
parents:
diff changeset
    72
     */
474761f14bca Initial load
duke
parents:
diff changeset
    73
    boolean exclude() default false;
474761f14bca Initial load
duke
parents:
diff changeset
    74
};