uCosminexus Application Server, Web Service Development Guide

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

15.1.3 Mapping from an operation to a method name

This subsection describes the mapping of WSDL operations (name attribute of the wsdl:operation element) to Java method names.

Organization of this subsection
(1) Mapping
(2) Conditions for the operation name
(3) Number of operations and its child elements coded

(1) Mapping

The WSDL operations and Java method names are mapped in accordance with the JAX-WS 2.2 specifications. The following figure shows an example of mapping:

Figure 15-3 Example of mapping operations to method names

[Figure]

During the mapping, the first character of the WSDL operation name is converted into a lower case character. The prefixes get and set are not added. The following is an example of conversion:

Before conversion: OperationName

After conversion: operationName

(2) Conditions for the operation name

In the operation name, you can code a string that fulfills all the conditions described in the following table. However, when customizing with the binding declaration, you can code the strings that can be used as xsd:NCName type of the XML Schema specification.

Table 15-5 Conditions for strings that can be coded in the operation name

No. Conditions Examples of invalid strings Operations when invalid strings are specified
1 Strings using only one-byte alphanumeric characters (0 to 9, A to Z, a to z) and underscore (_) Hitachi_operation The operation might not function properly (error message is not displayed).
2 Strings other than Java reserved words# abstract An error message is output in the standard error output and log and the processing ends (KDJW51007-E).
3 Strings that do not begin with numeric characters 1User_operation An error message is output in the standard error output and log and the processing ends (KDJW51029-E).

#
You cannot code strings such as 'Abstract' where the first character of the Java reserved word is in upper case (since the first character is converted into a lower case character due to mapping).

(3) Number of operations and its child elements coded

You can code 1 to 255 operations for one port type in WSDL. Also, in the child element of the operation, you can code one wsdl: input element, zero or one wsdl:output element, and 0 to 255 wsdl:fault elements.

The following table describes the relationship between the number of operations coded and the operations:

Table 15-6 Relationship between the number of operations coded and the operations

No. Elements Number of coding Operations when invalid strings are specified
1 wsdl:operation 0 An error message is output in the standard error output and log and the processing ends (KDJW51029-E).
2 1 to 255 Terminates normally.
3 256 or more An error message is output in the standard error output and log and the processing ends (KDJW51029-E).

The following table describes the relationship between the number of child elements coded for the operation and the operations:

Table 15-7 Relationship between the number of child elements coded for the operation and the operations

No. Elements Number of coding Operations when invalid strings are specified
1 wsdl:input 0 An error message is output in the standard error output and log and the processing ends (KDJW51029-E).
2 1 Terminates normally.
3 2 or more An error message is output in the standard error output and log and the processing ends (KDJW51029-E).
4 wsdl:output 0 If zero wsdl:fault elements are coded, the wsdl:output element is mapped to a one-way operation and the process ends successfully.
If one or more wsdl:fault elements are coded, an error message is output in the standard error output and log and the processing ends (KDJW51029-E).
5 1 The wsdl:output element is mapped to the Request-response operation and the process ends successfully.
6 2 or more An error message is output in the standard error output and log and the processing ends (KDJW51029-E).
7 wsdl:fault 0 to 255 Terminates normally.
8 256 or more An error message is output in the standard error output and log and the processing ends (KDJW51029-E).