01: /*
02: * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
03: * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
04: */
05:
06: package javax.xml.ws.soap;
07:
08: import java.lang.annotation.Documented;
09: import java.lang.annotation.Target;
10: import java.lang.annotation.ElementType;
11: import java.lang.annotation.Retention;
12: import java.lang.annotation.RetentionPolicy;
13:
14: import javax.xml.ws.Action;
15: import javax.xml.ws.BindingProvider;
16: import javax.xml.ws.FaultAction;
17: import javax.xml.ws.spi.WebServiceFeatureAnnotation;
18:
19: /**
20: * <p>
21: * This feature represents the use of WS-Addressing with either
22: * the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this feature
23: * with any other binding is NOT required.
24: * <p>
25: * The following describes the effects of this feature with respect
26: * to be enabled or disabled:
27: * <ul>
28: * <li> ENABLED: In this Mode, WS-Addressing will be enabled.
29: * At runtime, WS-Addressing headers
30: * MUST be consumed by the receiver and produced by the
31: * sender even if the WSDL declares otherwise. The
32: * mustUnderstand="0" attribute MUST be used on the response WS-Addressing
33: * headers.
34: * <li> DISABLED: In this Mode, WS-Addressing will be disabled
35: * even if an associated WSDL specifies otherwise. At runtime,
36: * WS-Addressing headers MUST NOT be used. WS-Addressing may be explicitly
37: * disabled to prevent a JAX-WS implementation from consuming and producing
38: * WS-Addressing headers. If an application
39: * has implemented WS-Addressing itself, it MUST explicitly disable this feature.
40: * Not doing so may break compatibility with future versions of JAX-WS.
41: * </ul>
42: * <p>
43: * The <code>required</code> property can be used to
44: * specify if WS-Addressing headers MUST
45: * be present on incoming messages. By default the
46: * <code>required</code> property is <code>false</code>.
47: * <p>
48: * The definition of this annotation is incomplete in this release of JAX-WS as
49: * there is no standard way to convey the use of WS-Addressing via a WSDL and there is no
50: * standard definition for the default value of WS-Addressing <code>Action</code> headers;
51: * however, the runtime behavior of this annotation is well-defined.
52: * It is intended that a future version of
53: * JAX-WS will require the use of the standard mechanism to convey the use
54: * of WS-Addressing via WSDL and default values for WS-Addressing <code>Action</code> headers
55: * as defined by the W3C WG on WS-Addressing.
56: * <p>
57: * To write a portable endpoint and its corresponding client with this version of JAX-WS,
58: * an endpoint MUST explicitly specify what WS-Addressing <code>Actions</code> are to be used
59: * via the {@link Action} and {@link FaultAction} annotations. The client MUST explicitly
60: * enable addresssing via the {@link AddressingFeature}, and for each invocation, the client
61: * MUST explicitly set the {@link BindingProvider#SOAPACTION_URI_PROPERTY}.
62: * After the W3C WG on WS-Addressing has specified how the use of WS-Addressing is specified in the WSDL,
63: * and what the default value must be for Action headers, a future version of JAX-WS will remove these requirements.
64: * <p>
65: * See <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">Web Services Addressing - Core</a>
66: * and <a href="http://www.w3.org/TR/2006/REC-ws-addr-soap-20060509/">Web Services Addressing 1.0 - SOAP Binding</a>
67: * for more information on WS-Addressing.
68: *
69: * @since JAX-WS 2.1
70: */
71: @Target(ElementType.TYPE)
72: @Retention(RetentionPolicy.RUNTIME)
73: @Documented
74: @WebServiceFeatureAnnotation(id=AddressingFeature.ID,bean=AddressingFeature.class)
75: public @interface Addressing {
76: /**
77: * Specifies if this feature is enabled or disabled.
78: */
79: boolean enabled() default true;
80:
81: /**
82: * Property to determine if WS-Addressing headers MUST
83: * be present on incoming messages.
84: */
85: boolean required() default false;
86: }
|