uCosminexus Application Server, Web Service Development Guide
The development examples of this chapter describe how to develop Web Services starting from SEI.
The following table describes the configuration for Web Services to be developed:
Table 5-1 Web Service configuration (Starting from SEI)
| 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 | URL of the naming server | corbaname::testserver:900 | |
| 4 | Context root | fromjava_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 | 1 |
| 10 | Local name | add | |
| 11 | Service | Number | 1 |
| 12 | Local name | AddNumbersImplService | |
| 13 | Port | Number | 1 |
| 14 | Local name | AddNumbersImplPort | |
| 15 | Web Service Implementation Class | com.sample.AddNumbersImpl | |
| 16 | Method published in the Web Service Implementation Class | Number | 1 |
| 17 | Local name | add | |
| 18 | Exception thrown with the methods of the Web Service implementation | Number | 1 |
| 19 | Local name | com.sample.AddNumbersFault | |
The following table describes the configuration of the current directory when developing Web Services:
Table 5-2 Configuration of the current directory (Starting from SEI)
| Directory | Description | |||
|---|---|---|---|---|
| c:\temp\jaxws\works\fromjava | 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 5.3.4 Creating application.xml. | |||
| src\ | Stores the source file (*.java) for the Web Service. Used in 5.3.1 Creating Web Services Implementation Class and 5.3.2 Compiling Web Services Implementation Class. | |||
| WEB-INF\ | Corresponds to the WEB-INF directory of the WAR file. | |||
| web.xml | Created in 5.3.3 Creating web.xml. | |||
| classes\ | Stores the compiled class file (*.class). Created in 5.3.2 Compiling Web Services Implementation Class. | |||
| wsdl\ | Created in the section 5.3.5 Creating a WSDL file (Optional). | |||
| fromjava_dynamic_generate.ear | Created in 5.3.6 Creating EAR files. | |||
| fromjava_dynamic_generate.war | ||||
| client\ | Used for the development of the Web Service client. | |||
| src\ | Stores the source file (*.java) of the Web Service client. Used in 5.5.1 Generating a service class and 5.5.2 Creating an implementation class for the Web Service client. | |||
| classes\ | Stores the compiled class file (*.class). Used in 5.5.3 Compiling the implementation class for the Web Service client. | |||
| usrconf.cfg | Created in 5.6.1 Creating an option definition file for Java applications. | |||
| usrconf.properties | Created in 5.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 parts in Bold in the command execution examples and in the Java source indicate the specified values and the generated values that are used in this example. Read according to the environment that 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 Web Services and Web Service clients in different environments, read the current directory path suitable to the respective environments.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.