- java.lang.Object
-
- javax.xml.ws.WebServiceFeature
-
- javax.xml.ws.soap.AddressingFeature
-
public final class AddressingFeature extends WebServiceFeature
AddressingFeature represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this feature with any other binding is undefined.This feature can be used during the creation of SEI proxy, and
Dispatch
instances on the client side andEndpoint
instances on the server side. This feature cannot be used forService
instance creation on the client side.The following describes the effects of this feature with respect to be enabled or disabled:
- ENABLED: In this Mode, WS-Addressing will be enabled. It means the endpoint supports WS-Addressing but does not require its use. A sender could send messages with WS-Addressing headers or without WS-Addressing headers. But a receiver MUST consume both types of messages.
- DISABLED: In this Mode, WS-Addressing will be disabled. At runtime, WS-Addressing headers MUST NOT be used by a sender or receiver.
If the feature is enabled, the
required
property determines whether the endpoint requires WS-Addressing. If it is set true, WS-Addressing headers MUST be present on incoming and outgoing messages. By default therequired
property isfalse
.If the web service developer has not explicitly enabled this feature, WSDL's wsam:Addressing policy assertion is used to find the use of WS-Addressing. By using the feature explicitly, an application overrides WSDL's indication of the use of WS-Addressing. In some cases, this is really required. For example, if an application has implemented WS-Addressing itself, it can use this feature to disable addressing. That means a JAX-WS implementation doesn't consume or produce WS-Addressing headers.
If addressing is enabled, a corresponding wsam:Addressing policy assertion must be generated in the WSDL as per 3.1 WS-Policy Assertions
Example 1: Possible Policy Assertion in the generated WSDL for
@Addressing
<wsam:Addressing wsp:Optional="true"> <wsp:Policy/> </wsam:Addressing>
Example 2: Possible Policy Assertion in the generated WSDL for
@Addressing(required=true)
<wsam:Addressing> <wsp:Policy/> </wsam:Addressing>
Example 3: Possible Policy Assertion in the generated WSDL for
@Addressing(required=true, responses=Responses.ANONYMOUS)
<wsam:Addressing> <wsp:Policy> <wsam:AnonymousResponses/> </wsp:Policy> </wsam:Addressing>
See Web Services Addressing - Core, Web Services Addressing 1.0 - SOAP Binding, and Web Services Addressing 1.0 - Metadata for more information on WS-Addressing.
- Since:
- JAX-WS 2.1
- See Also:
Addressing
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AddressingFeature.Responses
If addressing is enabled, this property determines if endpoint requires the use of only anonymous responses, or only non-anonymous responses, or all.
-
Field Summary
Fields Modifier and Type Field and Description static String
ID
Constant value identifying the AddressingFeatureprotected boolean
required
If addressing is enabled, this property determines whether the endpoint requires WS-Addressing.-
Fields inherited from class javax.xml.ws.WebServiceFeature
enabled
-
-
Constructor Summary
Constructors Constructor and Description AddressingFeature()
Creates and configures anAddressingFeature
with the use of addressing requirements.AddressingFeature(boolean enabled)
Creates and configures anAddressingFeature
with the use of addressing requirements.AddressingFeature(boolean enabled, boolean required)
Creates and configures anAddressingFeature
with the use of addressing requirements.AddressingFeature(boolean enabled, boolean required, AddressingFeature.Responses responses)
Creates and configures anAddressingFeature
with the use of addressing requirements.
-
Method Summary
Methods Modifier and Type Method and Description String
getID()
Get the unique identifier for this WebServiceFeature.AddressingFeature.Responses
getResponses()
If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all responses.boolean
isRequired()
If addressing is enabled, this property determines whether the endpoint requires WS-Addressing.-
Methods inherited from class javax.xml.ws.WebServiceFeature
isEnabled
-
-
-
-
Field Detail
-
ID
public static final String ID
Constant value identifying the AddressingFeature- See Also:
- Constant Field Values
-
required
protected boolean required
If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. If required is true, WS-Addressing headers MUST be present on incoming and outgoing messages.
-
-
Constructor Detail
-
AddressingFeature
public AddressingFeature()
Creates and configures anAddressingFeature
with the use of addressing requirements. The created feature enables ws-addressing i.e. supports ws-addressing but doesn't require its use. It is also configured to accept all the response types.
-
AddressingFeature
public AddressingFeature(boolean enabled)
Creates and configures anAddressingFeature
with the use of addressing requirements. Ifenabled
is true, it enables ws-addressing i.e. supports ws-addressing but doesn't require its use. It also configures to accept all the response types.- Parameters:
enabled
- true enables ws-addressing i.e.ws-addressing is supported but doesn't require its use
-
AddressingFeature
public AddressingFeature(boolean enabled, boolean required)
Creates and configures anAddressingFeature
with the use of addressing requirements. Ifenabled
andrequired
are true, it enables ws-addressing and requires its use. It also configures to accept all the response types.- Parameters:
enabled
- true enables ws-addressing i.e.ws-addressing is supported but doesn't require its userequired
- true means requires the use of ws-addressing .
-
AddressingFeature
public AddressingFeature(boolean enabled, boolean required, AddressingFeature.Responses responses)
Creates and configures anAddressingFeature
with the use of addressing requirements. Ifenabled
andrequired
are true, it enables ws-addressing and requires its use. Also, the response types can be configured usingresponses
parameter.- Parameters:
enabled
- true enables ws-addressing i.e.ws-addressing is supported but doesn't require its userequired
- true means requires the use of ws-addressing .responses
- specifies what type of responses are required- Since:
- JAX-WS 2.2
-
-
Method Detail
-
getID
public String getID()
Get the unique identifier for this WebServiceFeature.- Specified by:
getID
in classWebServiceFeature
- Returns:
- the unique identifier for this feature.
-
isRequired
public boolean isRequired()
If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. If required is true, WS-Addressing headers MUST be present on incoming and outgoing messages.- Returns:
- the current required value
-
getResponses
public AddressingFeature.Responses getResponses()
If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all responses.- Returns:
AddressingFeature.Responses.ALL
when endpoint supports all types of responses,AddressingFeature.Responses.ANONYMOUS
when endpoint requires the use of only anonymous responses,AddressingFeature.Responses.NON_ANONYMOUS
when endpoint requires the use of only non-anonymous responses- Since:
- JAX-WS 2.2
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/xml/ws/soap/AddressingFeature.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.