Thu, 31 Aug 2017 15:18:52 +0800
merge
1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 package com.sun.xml.internal.ws.developer;
28 import java.lang.annotation.Documented;
29 import java.lang.annotation.Target;
30 import java.lang.annotation.ElementType;
31 import java.lang.annotation.Retention;
32 import java.lang.annotation.RetentionPolicy;
34 import javax.xml.ws.spi.WebServiceFeatureAnnotation;
36 /**
37 * This feature represents the use of WS-Addressing with either
38 * the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this feature
39 * with any other binding is NOT required.
40 * <p>
41 * Enabling this feature will result in the
42 * <code>wsaw:UsingAddressing</code> element being added to the
43 * <code>wsdl:Binding</code> for
44 * the endpoint and in the runtime being capable of responding to
45 * WS-Addressing headers.
46 * <p>
47 * The following describes the affects of this feature with respect
48 * to be enabled or disabled:
49 * <ul>
50 * <li> ENABLED: In this Mode, Addressing will be enabled.
51 * If there is not a WSDL associated with the Endpoint and
52 * a WSDL is to be generated, it MUST be generated with the
53 * wsaw:UsingAddressing element. At runtime, Addressing headers
54 * MUST be consumed by the receiver and generated by the
55 * sender even if the WSDL declares otherwise. The
56 * mustUnderstand="0" attribute MUST be used on the Addressing
57 * headers.
58 * <li> DISABLED: In this Mode, Addressing will be disabled
59 * even if an associated WSDL specifies otherwise. At runtime,
60 * Addressing headers MUST NOT be used.
61 * </ul>
62 * <p>
63 * The {@link #required} property can be used to
64 * specify if the <code>required</code> attribute on the
65 * <code>wsaw:UsingAddressing</code> element should
66 * be <code>true</code> or <code>false</code>. By default the
67 * <code>wsdl:required</code> parameter is <code>false</code>.
68 *
69 * See <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">WS-Addressing</a>
70 * for more information on WS-Addressing.
71 * See <a href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">WS-Addressing - WSDL 1.0
72 * </a> for more information on <code>wsaw:UsingAddressing</code>.
73 *
74 * @since JAX-WS 2.1
75 */
76 @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
77 @Retention(RetentionPolicy.RUNTIME)
78 @Documented
79 @WebServiceFeatureAnnotation(id= MemberSubmissionAddressingFeature.ID,bean=MemberSubmissionAddressingFeature.class)
80 public @interface MemberSubmissionAddressing {
81 /**
82 * Specifies if this feature is enabled or disabled.
83 */
84 boolean enabled() default true;
86 /**
87 * Property to determine the value of the
88 * <code>wsdl:required</code> attribute on
89 * <code>wsaw:UsingAddressing</code> element in the WSDL.
90 */
91 boolean required() default false;
93 /**
94 * Property to determine if the incoming messsages should be checked for conformance
95 * with MemberSubmission version of WS-Addressing.
96 *
97 * If Validation.LAX, then some WS-Adressing headers are not strictly checked.
98 */
99 public enum Validation { LAX, STRICT }
101 Validation validation() default Validation.LAX;
103 }