uCosminexus Application Server, Web Service Development Guide

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

16.2.21 javax.xml.ws.WebFault annotation

You can use the javax.xml.ws.WebFault annotation to customize the mapping of the return values.

The following figure shows an example of customization with the javax.xml.ws.WebFault annotation:

Figure 16-26 Example of customization with the javax.xml.ws.WebFault annotation

[Figure]

Organization of this subsection
(1) name element (javax.xml.ws.WebFault)
(2) targetNamespace element (javax.xml.ws.WebFault)
(3) faultBean element (javax.xml.ws.WebFault)
(4) messageName element (javax.xml.ws.WebFault)

(1) name element (javax.xml.ws.WebFault)

You use the name element to customize the local name of the global element mapped from the fault bean.

Specify the name element using one-byte alphanumeric characters and underscore (_). If other characters are specified, the operations might not function properly (error message is not output).

(2) targetNamespace element (javax.xml.ws.WebFault)

You specify the targetNamespace element to customize the name space of the global element mapped from the fault bean.

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:

(3) faultBean element (javax.xml.ws.WebFault)

The faultBean element specifies the class name of the generated fault bean using a fully qualified name. If the wrapper exception class has the getFaultInfo method that returns the javax.xml.ws.WebFault annotation and the fault bean, the fault bean is not generated even if the faultBean element is specified.

The precautions for specifying the faultBean element are as follows:

(4) messageName element (javax.xml.ws.WebFault)

Specify the messageName element when customizing the fault message name (the name attribute of the wsdl:message element referenced from the wsdl:fault element) corresponding to the wrapper exception class.

Specify the messageName element with one- byte alphanumeric characters and underscore (_). If you specify the messageName element with any other character, the operation is not guaranteed (no error message is output).