uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

16.2.19 javax.xml.ws.soap.Addressing annotation

You must have the javax.xml.ws.soap.Addressing annotation for using the addressing functionality.

The description of the javax.xml.ws.soap.Addressing annotation is as follows:

Web Services
You can specify the javax.xml.ws.soap.Addressing annotation only in a Service Implementation Class. If you specify the javax.xml.ws.soap.Addressing annotation in SEI, a warning message will output to the standard error output and logs, and the processing will continue (KDJW61094-W).

Web Services client
You can specify this annotation in the setter method or a field that injects the port. For details, see 10.21.1(4) Enabling features. The annotation will be ignored if you specify the annotation in any other fields or methods.

The following figure shows an example of the customization using the javax.xml.ws.soap.Addressing annotation:

Figure 16-25 Example of customization using the javax.xml.ws.soap.Addressing annotation (Web Service)

[Figure]

Organization of this subsection
(1) enabled element (javax.xml.ws.soap.Addressing)
(2) required element (javax.xml.ws.soap.Addressing)
(3) responses element (javax.xml.ws.soap.Addressing)

(1) enabled element (javax.xml.ws.soap.Addressing)

In the enabled element, specify whether to enable the addressing functionality in the Web Service. If you specify true, the addressing functionality is enabled, and if you specify false, the addressing functionality is disabled. The default value is true.

The enabled element is referenced only when starting the Web Services. This is not interpreted when executing the apt command or the cjwsgen command.

(2) required element (javax.xml.ws.soap.Addressing)

In the required element, specify whether the addressing header is required in the request message, when you invoke Web Services. If you specify true, the addressing header will be required, and if you specify false, the addressing header becomes optional. The default value is false.

The required element is referenced only when starting the Web Services. This is not interpreted when executing the apt command or the cjwsgen command.

(3) responses element (javax.xml.ws.soap.Addressing)

In the responses element, specify the type of the response end point requested by the end point when WS-Addressing is enabled. The following table describes the values that can be specified in the responses element.

Table 16-24 Values that can be specified in the responses element

No. Values of responses element Explanation
1 javax.xml.ws.soap.AddressingFeature.Responses.ALL The default value.
You can specify all the URIs.
2 javax.xml.ws.soap.AddressingFeature.Responses.ANONYMOUS You can specify only an anonymous URI.
3 javax.xml.ws.soap.AddressingFeature.Responses.NON_ANONYMOUS You can specify only a non-anonymous URI.

If you specify javax.xml.ws.soap.AddressingFeatures.Responses.ANONYMOUS in the element value of the responses element, you must specify an anonymous URI in the wsa:ReplyTo element and wsa:FaultTo element of the addressing header of the message to be sent to the end point. If you specify a non-anonymous URI, javax.xml.ws.WebServiceException is returned.

If you specify javax.xml.ws.soap.AddressingFeatures.Responses.NON_ANONYMOUS in the element value of the responses element, you must specify a non-anonymous URI. If an anonymous URI is specified, javax.xml.ws.WebServiceException is returned.

By default, you can specify all the same URIs as that in the case when javax.xml.ws.soap.AddressingFeatures.Responses.ALL is specified.

The responses element is referenced only when starting the Web Services and is not interpreted when executing the apt or cjwsgen command.