uCosminexus Application Server, Web Service Development Guide
This chapter describes examples for developing the Web Services starting from SEI. Note that this section describes how to develop the Web Services in the implicit SEI format (a format that does not create SEI in the explicit format) as described in the paragraph 3.3 of the JAX-WS2.2 specifications.
The following table describes the configuration of the Web Service to be developed:
Table 33-1 Configuration of the Web Service (Starting from SEI and addressing)
| No. | Item | Value | |
|---|---|---|---|
| 1 | Name of the J2EE server to be deployed | jaxwsserver | |
| 2 | Host name and port number of the Web server | webhost:8085 | |
| 3 | Naming Server URL | corbaname::testserver:900 | |
| 4 | Context route | addressing_dynamic_generate | |
| 5 | Style | document/literal/wrapped | |
| 6 | Namespace URI | http://sample.com | |
| 7 | Port type | Number | 1 |
| 8 | Local name | AddNumbersImpl | |
| 9 | Operation | Number | 3 |
| 10 | Local name 1 | add | |
| 11 | Local name 2 | add2 | |
| 12 | Local name 3 | add3 | |
| 13 | Service | Number | 1 |
| 14 | Local name | AddNumbersImplService | |
| 15 | Port | Number | 1 |
| 16 | Local name | AddNumbersImplPort | |
| 17 | Web Service Implementation Class | com.sample.AddNumbersImpl | |
| 18 | Methods made public in the Web Service Implementation Class | Number | 3 |
| 19 | Method name 1 | add | |
| 20 | Method name 2 | add2 | |
| 21 | Method name 3 | add3 | |
| 22 | Exceptions thrown in the Web Service Implementation Class methods | Number | 1 |
| 23 | Class name | com.sample.AddNumbersFault | |
The following table describes the configuration of the current directory, when the Web Service is developed:
Table 33-2 Configuration of the current directory (Starting from SEI and addressing)
| Directory | Explanation | |||
|---|---|---|---|---|
| c:\temp\jaxws\works\ streaming | 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 33.3.4 Creating application.xml. | |||
| src\ | Saves the source file (*.java) for the Web Service. Used in 33.3.1 Creating Web Services Implementation Classand 33.3.2 Compiling Web Services Implementation Class. | |||
| WEB-INF\ | Corresponds to the WEB-INF directory of the WAR file. | |||
| web.xml | Created in 33.3.3 Creating web.xml. | |||
| classes\ | Saves the compiled class file (*.class). Used in 33.3.2 Compiling Web Services Implementation Class. | |||
| addressing_dynamic_generate.ear | Created in 33.3.5 Creating EAR files. | |||
| addressing_dynamic_generate.war | Created in 33.3.5 Creating EAR files. | |||
| client\ | Used for the development of the Web Services client. | |||
| src\ | Saves the source file (*.java) of the Web Service client. Used in 33.5.1 Generating a service class and 33.5.2 Creating Implementation Class for the Web Services client. | |||
| classes\ | Saves the compiled class file (*.class). Used in 33.5.3 Compiling Implementation Class for the Web Services client. | |||
| usrconf.cfg | Created in 33.6.1 Creating an option definition file for Java applications. | |||
| usrconf.properties | Created in 33.6.2 Creating a 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 the gothic font, in the command execution example and in the Java source, indicates the specified values and generated values that are used in this example. Substitute and read according to the environment you want to build.
Also, 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. For developing the Web Service and Web Service client in different environments, substitute and read the current directory path suitable to the respective environments.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.