uCosminexus Application Server, Web Service Development Guide
In the development examples described in this chapter, develop a Web Service, starting from SEI. The developed Web Service uses attachments.
This section provides an overview and describes the information used for the Web Service whose development will be illustrated.
Table 29-1 Request information from the Web Service client
| Information name | Java data type |
|---|---|
| Employee identification number | java.lang.String |
| Photograph | javax.activation.DataHandler |
Table 29-2 Response information from the server
| Information name | Java data type |
|---|---|
| Confirm registration message | java.lang.String |
| Name | java.lang.String |
| Affiliation | java.lang.String |
The response information from the server is stored using the UserData class of the user-defined type class.
The following table describes the configuration of the current directory used in the Web Service development.
Table 29-3 Configuration of the current directory (Starting from SEI and attachments)
| Directory | Description | |||
|---|---|---|---|---|
| c:\temp\jaxws\works\attachments | This is the current directory. | |||
| server\ | Used for Web Service development. | |||
| META-INF\ | Corresponds to the META-INF directory of the EAR file. | |||
| application.xml | Created in 29.3.4 Creating application.xml. | |||
| src\ | Stores the source file (*.java) for the Web Service. Used in 29.3.1 Creating Web Services Implementation Class and 29.3.2 Compiling Web Services Implementation Class. | |||
| WEB-INF\ | Corresponds to the WEB-INF directory of the WAR file. | |||
| web.xml | Created in 29.3.3 Creating web.xml. | |||
| classes\ | Stores the compiled class file (*.class). Used in 29.3.2 Compiling Web Services Implementation Class. | |||
| attachments_dynamic_generate.ear | Created in 29.3.5 Creating EAR files. | |||
| attachments_dynamic_generate.war | Created in 29.3.5 Creating EAR files. | |||
| client\ | Used for the development of the Web Service client. | |||
| src\ | Stores the source file (*.java) of the Web Service client. Used in 29.5.1 Generating a service class and 29.5.2 Creating Web Services Implementation Class . | |||
| classes\ | Stores the compiled class file (*.class). Used in 29.5.3 Compiling Implementation Class for the Web Services client. | |||
| image.jpg | Used in the JPEG file to be used in the Web Service client. | |||
| usrconf.cfg | Created in 29.6.1 Creating an option definition file for Java applications. | |||
| usrconf.properties | Created in 29.6.2 Creating the user property file for Java applications. | |||
Change the current directory path according to the environment to be developed.
Note that the directory and file names listed in the above table will be used in the description hereafter. The part formatted in bold in the command execution examples and in the Java source indicates the specified values and generated values that are used in this example. Read according to the environment you want to build.
Furthermore, in the development examples described in this chapter, the Web Service and Web Service client are developed in the same environment, but you can also develop them in separate environments. When you want to develop the Web Service and Web Service client in different environments, read the current directory path suitable to the respective environments.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.