uCosminexus Application Server, Web Service Development Guide
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
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).
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:
You specify the partName element to customize the mapping of the part names.
The precautions for specifying the partName element are as follows:
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:
Table 16-15 Conditions for the strings that can be coded in the name space (javax.jws.WebResult)
| No. | Condition | Examples of invalid string | Operation when an invalid string is specified |
|---|---|---|---|
| 1 | Strings using only one-byte alphanumeric characters (0 to 9, A to Z, a to z) | http://hitachi.com http://133.145.224.19/ http://[1080:2C14;D30:BA04:275:806:270C:418A]/ |
The operations might not function properly (error message is not displayed). |
| 2 | Strings other than Java reserved words | http://hitachi.com/abstract | The operations might not function properly. |
| 3 | Strings that do not begin with numeric characters | http://1hitachi.com |
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.