uCosminexus Service Platform, Reception and Adapter Definition Guide
This subsection describes how to define Session Bean adapters. You can define Session Bean adapters in the Service Adapter Settings window.
For Session Bean, the message format definition file automatically created from the EAR file will be the message format definition file for the service component. Therefore, you do not have to set the message format for a service component.
If the message format of the service requester is different from the message format of the service component to be called by the service adapter, data transformation is required.
To perform data transformation of a request message, in the Service Adapter Settings window, set the message to be input from the service requester as the standard message, and in the Data-conversion definition screen, define the data transformation. To perform data transformation of a response message, set the standard message as the message returned from the service component, and in the Data-conversion definition screen, define the data transformation.
For details about data transformation, see Chapter 6. Defining Data Transformation in the manual Service Platform Basic Development Guide.
In the Service Adapter Settings window, specify the service component name that is to be called, from among those registered in the JNDI namespace. Specify the address so that remote call is used. You cannot use local call for service components (Session Bean). The following gives examples of specifying a service component name.
corbaname::myhost:900#HITACHI_EJB/SERVERS/J2EEServer/EJB/slsbsmpl/MyAdder
corbaname::localhost:900#HITACHI_EJB/SERVERS/J2EEServer/EJB/slsbsmpl/MyAdder corbaname::127.0.0.1:900#HITACHI_EJB/SERVERS/J2EEServer/EJB/slsbsmpl/MyAdder corbaname::HITACHI_EJB/SERVERS/J2EEServer/EJB/slsbsmpl/MyAdder
For the names registered in the JNDI namespace, see the following locations:
For Session Bean, you need to set a user definition class (JAR file) in order to use a stub to call a service component.
Note that, when setting a JAR file in the Service Adapter Settings window (Session Bean detailed window), you must set the file extension to jar by using lower-case letters.
Also, do not set the following file names for a JAR file:
If the above file names are used, a warning message is displayed. If a warning message appears, delete the above file names from the user definition class. Then, rename the files and then retry.
Use the J2EE server's cjgetstubsjar command to acquire an RMI-IIOP stub and interface. For details about the cjgetstubsjar command, see cjgetstubsjar(get RMI-IIOP stub and interface for application) in the manual Application Server Command Reference Guide.
To define a Session Bean adapter:
In the same way as the Web service, set the client definition file that controls operations on the client (service requester) side.
Set the client definition file, as necessary, by using either of the following methods:
Setting the client definition file is optional. If you do not set the client definition file, the contents of the template file are used as is.
To edit the template file:
To create a new client definition file and overwrite the template file:
For details about the settings in the client definition file, see 10.3 Setting up the client definition file in the manual Application Server SOAP Application Development Guide.
Note that, for a Session Bean adapter, some items can be set in the client definition file, but other items cannot. The following table lists and describes the items that can be set in the client definition file when a Session Bean adapter is used.
Table 3-2 Setting items in the client definition file
| Key name | Description | Specifiable |
|---|---|---|
| c4web.logger.log_level | Importance of trace file output | Y |
| c4web.logger.aplog_level | Importance of application log output | Y |
| c4web.logger.aplog_error_record | Application log output when an abnormality occurs | Y |
| c4web.logger.log_file_dir | Output directory of the trace file and application log | Y |
| c4web.logger.log_file_num | Number of trace files | Y |
| c4web.logger.log_file_size | Size of trace files | Y |
| c4web.logger.aplog_file_num | Number of application log files | Y |
| c4web.logger.aplog_file_size | Size of application log files | Y |
| c4web.logger.log_file_prefix | Prefix of trace files and application logs | N# |
| c4web.common.do_multirefs | Multi-reference (runtime option) | N |
| c4web.common.send_xsi_types | Data type definition (runtime option) | N |
| c4web.application.app_maintainsession | Retention of HTTP session (runtime option) | N |
| c4web.application.proxy_host | Host name of the proxy server (runtime option) | N |
| c4web.application.non_proxy_hosts | Group of host names that do not use the proxy server (runtime option) | N |
| c4web.application.proxy_port | Port number of the proxy server (runtime option) | N |
| c4web.application.proxy_user | Authentication user ID of the proxy server (runtime option) | N |
| c4web.application.proxy_password | Password for the authentication user ID of the proxy server (runtime option) | N |
| c4web.common.enable_soapheader_check | Option for checking the qualification of SOAP header names (runtime option) | N |
| c4web.application.socket_write_timeout | Timeout value for writing to the client socket (runtime option) | N |
| c4web.application.socket_read_timeout | Timeout value for reading from the client socket (runtime option) | N |
| c4web.application.socket_connect_timeout | Timeout value for connecting to the client socket (runtime option) | N |
| c4web.attachment.file_body_encoding | Body encoding type | N |
| c4web.attachment.attachment_temp_directory | Backup directory | N |
| c4web.attachment.attachment_file_delete_by_date | Number of days to retain unnecessary storage files | N |
| c4web.common.prf_trace_level | Option for trace output of performance analyses | Y |
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.