uCosminexus Application Server, Web Service Development Guide
This section describes an example of developing a Web Service starting from WSDL.
The following table lists the configuration of the Web Service to be developed:
Table 35-1 Web Service configuration (Starting from WSDL)
| No. | Item | Value | |
|---|---|---|---|
| 1 | Name of the J2EE Sever to be deployed | jaxwsserver | |
| 2 | The host name and the port number of the Web Server | webhost:8085 | |
| 3 | URL of the Naming Server | corbaname::testserver:900 | |
| 4 | Context route | wsrm | |
| 5 | Style | document/literal/wrapped | |
| 6 | Namespace URI | http://example.com/sample | |
| 7 | Port type | No. | 1 |
| 8 | Local name | TestJaxWs | |
| 9 | Operation | No. | 1 |
| 10 | Local name | jaxWsTest1 | |
| 11 | Service | No. | 1 |
| 12 | Local name | TestJaxWsService | |
| 13 | Port | No. | 1 |
| 14 | Local name | testJaxWs | |
| 15 | WSDL file name | input.wsdl | |
The following table lists the configuration of the current directory used in the Web Service development:
Table 35-2 Configuration of the current directory (Starting from WSDL)
| Directory | Explanation | |||
|---|---|---|---|---|
| c:\temp\jaxws\works\wsrm | This is the current directory. | |||
| server\ | This is used in the Web Service development. | |||
| META-INF\ | Corresponds to the META-INF directory of the EAR files. | |||
| application.xml | Created in 35.3.7 Creating an application.xml file. | |||
| src\ | Stores the source files (*.java) of the Web Service. Used in 35.3.3 Creating SEI and 35.3.5 Compiling Web Services Implementation Class. | |||
| WEB-INF\ | Corresponds to the WEB-INF directory of the WAR files. | |||
| web.xml | Created in 35.3.6 Creating web.xml. | |||
| classes\ | Stores the compiled class files (*.class). | |||
| wsdl\ | Stores the created wsdl. | |||
| temporary\ | Stores the temporary files when creating a WSDL based on the WSDL that is coded and converted by using Java. The creation of this directory is optional. | |||
| src\ | ||||
| classes\ | ||||
| wsrm.ear | Created in 35.3.8 Creating EAR files. | |||
| wsrm.war | ||||
| client\ | This is used in the Web Service client development. | |||
| src\ | Stores the source files (*.java) of the Web Service client. Used in 35.5.1 Generating a service class and 35.5.2 Creating Implementation Class for the Web Services client. | |||
| classes\ | Stores the compiled class files (*.class). Used in 35.5.4 Compiling Implementation Class for the Web Services client. | |||
| usrconf.cfg | Created in 35.6.1 Creating an option definition file for Java applications. | |||
| usrconf.properties | Created in 35.6.2 Creating a user property file for Java applications. | |||
Change the current directory path according to the development environment.
Note that the description below uses the directory and file names mentioned in the above table. The values in bold used in the command execution examples or Java source in this document are the values that are specified or generated in the examples used within this document. Use appropriate values according to the environment you build.
Furthermore, in the development example described in this chapter, the Web Service and the Web Service client are developed in the same environment; however, they can be developed in different environments as well. To develop the Web Service and the Web Service client in separate environments, you must change the current directory path according to the respective environment.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.