uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

6.5.1 Creating service classes

If you execute the cjwsimport command, the Java source, such as service class, required for Web Service client development, will be created. For the cjwsimport command, see 14.1 cjwsimport command.

The following is an example of the execution of the cjwsimport command:

> cd c:\temp\jaxws\works\wsgen\client\
> mkdir src\
> mkdir classes\
> "%COSMINEXUS_HOME%\jaxws\bin\cjwsimport.bat" -s src -d classes http://webhost:8085/wsgen/AddNumbersImplService?wsdl

If the cjwsimport command is terminated successfully, the Java source is created in the c:\temp\jaxws\works\wsgen\client\src\com\example\sample\directory. Note that com\example\sample\(directory-path-corresponding-to-the-package) changes as per the coding of the namespace URI. For the mapping between namespace URIs and packages, see 15.1.1 Mapping a namespace to a package name.

The following table lists the products:

Table 6-4 Products during service class generation (Starting from SEI and the cjwsgen command)

File name Description
JaxWsTest1.java This is a JavaBean class corresponding to type referenced by the wrapper element of the request message for 'Operation' in the WSDL definition.
JaxWsTest1Response.java This is a JavaBean class corresponding to type referenced by the wrapper element of the response message for 'Operation' in the WSDL definition.
ObjectFactory.java This is the ObjectFactory class of the JAXB 2.2 specifications.
package-info.java This is the package-info.java file.
TestJaxWs.java This is SEI corresponding to 'Service' in the WSDL definition.
TestJaxWsService.java This is the service class.
AddNumbersFault.java This is the JavaBean class corresponding to AddNumbersFault.
AddNumbersFault_Exception.java This is the wrapper exception class of the fault bean.

The file names JaxWsTest1, TestJaxWs and TestJaxWsService change according to the coding of the local name for operation, local name for port type, and local name for services. For the mapping of a local name for operation, local name for port type, and local name for services see the following sections: