uCosminexus Application Server, Web Service Development Guide

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

16.2.8 javax.jws.WebResult annotation

Use the javax.jws.WebResult annotation to customize the mapping of the return values.

The following figure shows an example of customization with the javax.jws.WebResult annotation:

Figure 16-16 Example of customization with the javax.jws.WebResult annotation

[Figure]

Organization of this subsection
(1) header element (javax.jws.WebResult)
(2) name element (javax.jws.WebResult)
(3) partName element (javax.jws.WebResult)
(4) targetNamespace element (javax.jws.WebResult)

(1) header element (javax.jws.WebResult)

To map a return value as a header parameter, specify true in the element value of the header element.

You can specify the header element in the non-wrapper style. In the wrapper style, if true is specified in the element value of the header element, an error message is output to the standard error output and logs (KDJW61038-E).

(2) name element (javax.jws.WebResult)

The name element is used to customize the child element name of the wrapper element that is mapped from the return value in the wrapper style. For the non-wrapper style, the name element is used to customize the local name of the global element that is mapped from the argument. If the partName element is not specified in the non-wrapper style, you can also customize the part name by specifying the element value of the name element.

The precautions for specifying the name element are as follows:

(3) partName element (javax.jws.WebResult)

You specify the partName element to customize the mapping of the part names.

The precautions for specifying the partName element are as follows:

(4) targetNamespace element (javax.jws.WebResult)

Use the targetNamespace element to customize the name space of the global element that is mapped from the return value.

In the targetNamespace element, the http:// or urn: protocol is specified as a name space. The following name space formats and strings can be specified: