uCosminexus Application Server, Web Service Development Guide
In the development examples described in this chapter, a Web Service starting from SEI is developed using the cjwsgen command provided by Cosminexus. For the method to use the cjwsgen command, see 14.3 cjwsgen command.
The following table shows the configuration of the Web Service to be developed:
Table 6-1 Web Service configuration (Starting from SEI or the cjwsgen command)
| 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 | wsgen | |
| 5 | Style | document/literal/wrapped | |
| 6 | Namespace URI | http://example.org/sample | |
| 7 | Port type | Number | 1 |
| 8 | Local name | TestJaxWs | |
| 9 | Operation | Number | 1 |
| 10 | Local name | jaxWsTest1 | |
| 11 | Service | Number | 1 |
| 12 | Local name | TestJaxWsService | |
| 13 | Port | Number | 1 |
| 14 | Local name | testJaxWs | |
| 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 in the methods in Web Service implementation | Number | 1 |
| 19 | Local name | com.sample.AddNumbersFault | |
The following table shows the configuration of the current directory when developing Web Services.
Table 6-2 Configuration of the current directory (Starting from SEI or the cjwsgen command)
| Directory | Description | |||
|---|---|---|---|---|
| c:\temp\jaxws\works\annotations | 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 6.3.4 Creating application.xml. | |||
| src\ | Stores the source file (*.java) for the Web Service. Used in 7.3.1 Creating a Web Service Implementation Class and 7.3.2 Generating Java sources. |
|||
| WEB-INF\ | Corresponds to the WEB-INF directory of the WAR file. | |||
| web.xml | Created in 6.3.3 Creating web.xml. | |||
| classes\ | Stores the compiled class file (*.class). Used in 6.3.2 Generating Java sources. | |||
| wsdl\ | Created in 6.3.2 Generating Java sources. | |||
| wsgen.ear | Created in 6.3.5 Creating EAR files. | |||
| wsgen.war | ||||
| client\ | Used for the development of the Web Service client. | |||
| src\ | Stores the source file (*.java) of the Web Service client. Used in 6.5.1 Creating service classes and 6.5.2 Creating implementation classes for Web Service clients. | |||
| classes\ | Stores the compiled class file (*.class). Used in 6.5.3 Compiling implementation classes for Web Service clients. | |||
| usrconf.cfg | Created in 6.6.1 Creating option definition files for Java applications. | |||
| usrconf.properties | Created in 6.6.2 Creating user property files 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 examples. 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 will be developed in the same environment, but you can also develop them in different environments. For developing Web Services and Web Service clients in different environments, read the current directory path suitable to the respective environment.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.