uCosminexus Application Server, Web Service Development Guide
This subsection describes the mapping of the parameters of the method of SEI to WSDL (name attribute of the wsdl:part element).
This subsection describes the mapping for the non-wrapper style.
For the non-wrapper style, the method parameters of SEI are mapped to the WSDL part and global elements using the same name as the operation name. The return value is mapped to the WSDL part and global element using the name with "Response" suffixed to the operation name. The non-wrapper style does not require the request and response beans. Therefore, the apt and cjwsgen commands do not automatically generate the request and response beans. However, you can check for errors beforehand by executing the cjwsgen command for the compiled Web resource Implementation Class. For details, see 10.23(1) Using the cjwsgen command for checking errors.
The following figure shows an example of mapping:
Figure 16-7 Example of mapping the method parameters and return values to the message parts (Non-wrapper style)
The Java types that can be specified in the parameters are the same as for the wrapper type. For details, see 16.1.5(2) Java types that can be specified in the parameters.
The parameter names of the Java methods are not mapped to WSDL; therefore, code the Java method parameters in accordance with the Java identifier naming rules provided in the Java language specifications.
You can specify any number of method parameters that are SOAP Header. However, as far as the method parameters that are the SOAP Body are concerned, the specifiability and the specified number are determined by the relationship with the return value. The following table describes the conditions for the return values of the methods and the specification method of the parameters:
Table 16-6 Conditions for the return values of the methods and the specification method of the parameters
| No. | Conditions for the return values | Specification method of the parameters | |
|---|---|---|---|
| Presence of return values | Specified location | ||
| 1 | No | -- |
|
| 2 | Yes | SOAP header |
|
| 3 | Yes | SOAP body |
|
If the out parameter or inout parameter is used in the non-wrapper style, you must specify the name element of the javax.jws.WebParam annotation. If the name element of the javax.jws.WebParam annotation is not specified, an error message is output to the standard error output and logs (KDJW61085-E).
The mapping of the method parameter to the WSDL part (name attribute of the wsdl:part element) depends on the element values of the javax.jws.WebParam annotation and javax.jws.WebMethod annotation.
The following table describes the relationship between the specification of the annotation and the mapping methods:
Table 16-7 Relationship between the specification of annotations and the mapping to the WSDL part name
| No. | Specification of annotation elements | Method of mapping to the WSDL part name | ||
|---|---|---|---|---|
| javax.jws.WebParam @partName |
javax.jws.WebParam @name |
javax.jws.WebMethod @operationName |
||
| 1 | Specified | -- | -- | The element value of the specified annotation is mapped to the name attribute of the wsdl:part element. |
| 2 | Not specified | Specified | -- | |
| 3 | Not specified | Specified | The Java method name is mapped to the name attribute of the wsdl:part element. | |
| 4 | Not specified | |||
This point describes the operations for a name conflict of the part names and global elements.
For details about using the java.util.Map class, see 16.1.5(6) Using the java.util.Map class.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.