uCosminexus Application Server, Web Service Development Guide

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

16.1.7 Mapping the Java wrapper exception class to the fault

This subsection describes the mapping of the Java wrapper exception class to the WSDL fault (wsdl:fault element, wsdl:message element with one wsdl:part child element, and the global element declaration of the XML Schema).

Organization of this subsection
(1) Mapping
(2) Conditions for the wrapper exception class
(3) Conditions for the wrapper exception class name
(4) Operations during name conflict

(1) Mapping

The Java wrapper exception class and the fault are mapped in accordance with the JAX-WS 2.2 specifications. The following figure shows an example of mapping:

Figure 16-8 Example of mapping the exception class to the fault

[Figure]

The following are the rules for mapping the wrapper exception class to the fault:

(2) Conditions for the wrapper exception class

The following are the conditions for the wrapper exception class:

(3) Conditions for the wrapper exception class name

In the wrapper exception class name, you can code strings that fulfill all the conditions described in the following table. The wrapper exception class name is used in WSDL even though an annotation is specified, so the name must comply with the conditions described in the following table:

Table 16-8 Conditions for strings that can be coded in the wrapper exception class name

No. Condition Example 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) and underscore (_) Hitachi_exception The operations might not function properly (error message is not displayed).
2 Strings complying with the naming rules of the Java identifiers provided in the Java language specifications Abstract When the apt command is executed, a compilation error occurs and the processing ends. For details, see the JDK documentation.

(4) Operations during name conflict

The fault bean name must be unique in the package. However, the uppercase or lowercase differences are ignored. If a name conflict occurs between the fault bean and the JavaBean generated concurrently in the package, an error message is output to the standard error output and logs (KDJW61065-E).

If the name is duplicated with an existing class, the name is overwritten. However, if that class is included in the argument of the apt command, the error is checked with the apt command.

The global element (local name and name space) mapped from the fault bean must be unique in WSDL. If the global element is not unique, the operations might not function properly.