JAX-WS
v2.1

javax.xml.ws.soap
Class AddressingFeature

java.lang.Object
  extended by javax.xml.ws.WebServiceFeature
      extended by javax.xml.ws.soap.AddressingFeature

public class AddressingFeature
extends WebServiceFeature

This feature represents the use of WS-Addressing.

Enabling this feature on the server will result in the wsaw:UsingAddressing element being added to the wsdl:Binding for the endpoint and the runtime being capable of responding to WS-Addressing headers.

Enabling this feature on the client will cause the JAX-WS runtime to include WS-Addressing headers in SOAP messages.

If the web service developer has not explicitly enabled this feature, it may be automatically enabled if the associated WSDL enables WS-Addressing via the wsaw:UsingAddressing element with the required attribute set to true.
See RespectBindingFeature for more information on required WSDL extensions.

The following describes the affects of this feature with respect to be enabled or disabled:

The setRequired(boolean) method can be used to specify if the required attribute on the wsaw:UsingAddressing element should be true or false. By default the required parameter is false. See WS-Addressing for more information on WS-Addressing. See WS-Addressing - WSDL 1.0 for more informaiton on wsaw:UsingAddressing.

Since:
JAX-WS 2.1

Field Summary
static java.lang.String ID
          Constant value identifying the AddressingFeature
static java.lang.String IS_REQUIRED
          Contant ID for the required feature parameter
protected  boolean required
          Property for required feature parameter.
 
Fields inherited from class javax.xml.ws.WebServiceFeature
enabled
 
Constructor Summary
AddressingFeature()
          Create an AddressingFeature.
AddressingFeature(boolean enabled)
          Create an AddressingFeature
AddressingFeature(boolean enabled, boolean required)
          Create an AddressingFeature
 
Method Summary
 java.lang.String getID()
          Get the unique identifier for this WebServiceFeature.
 boolean isRequired()
          Gets the boolean value used to set the required attribute on wsaw:UsingAddressing element in the WSDL.
 void setRequired(boolean required)
          Set the boolean value used to set the required attribute on wsaw:UsingAddressing element in the WSDL.
 
Methods inherited from class javax.xml.ws.WebServiceFeature
isEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
Constant value identifying the AddressingFeature

See Also:
Constant Field Values

IS_REQUIRED

public static final java.lang.String IS_REQUIRED
Contant ID for the required feature parameter

See Also:
Constant Field Values

required

protected boolean required
Property for required feature parameter. When Addressing is enabled, the value of this property will be set to the required attribute on wsaw:UsingAddressing element in the WSDL.

Constructor Detail

AddressingFeature

public AddressingFeature()
Create an AddressingFeature. The instance created will be enabled.


AddressingFeature

public AddressingFeature(boolean enabled)
Create an AddressingFeature

Parameters:
enabled - specifies whether this feature should be enabled or not.

AddressingFeature

public AddressingFeature(boolean enabled,
                         boolean required)
Create an AddressingFeature

Parameters:
enabled - specifies whether this feature should be enabled or not.
isRequired - specifies the value that will be used for the required attribute on the wsaw:UsingAddressing element.
Method Detail

getID

public java.lang.String getID()
Get the unique identifier for this WebServiceFeature.

Specified by:
getID in class WebServiceFeature
Returns:
the unique identifier for this feature.

isRequired

public boolean isRequired()
Gets the boolean value used to set the required attribute on wsaw:UsingAddressing element in the WSDL.

Returns:
the current required value

setRequired

public void setRequired(boolean required)
Set the boolean value used to set the required attribute on wsaw:UsingAddressing element in the WSDL.

Parameters:
required - specifies the value that will be used for the required attribute on wsaw:UsingAddressing element in the WSDL.

JAX-WS
v2.1


Comments to: jsr224-spec-comments@sun.com
More information at: http://java.sun.com/xml/jax-ws

Copyright © 2006 by Sun Microsystems, Inc., 4150 Network Circle,
Santa Clara, California 95054, U.S.A. All Rights Reserved.