uCosminexus Application Server, Web Service Development Guide

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

35.3.3 Creating SEI

Execute the cjwsimport command to generate additional Java sources such as SEI required to develop the Web Services. For the cjwsimport command, see 14.1 cjwsimport command.

The following is an example for executing the cjwsimport command:

> cd c:\temp\jaxws\works\wsrm\server\
> mkdir src\
> mkdir WEB-INF\classes\
> "%COSMINEXUS_HOME%\jaxws\bin\cjwsimport.bat" -generateService -s src -d WEB-INF\classes WEB-INF\wsdl\input.wsdl

On successful termination of the cjwsimport command, the Java sources are generated in the c:\temp\jaxws\works\wsrm\server\src\com\example\sample\ directory. Note that the directory path com\example\sample\ (the directory path corresponding to the package) changes according to the Namespace Uri coding. For the mapping between Namespace URI and package, see 15.1.1 Mapping a name space to a package name.

The following table lists the generated products:

Table 35-3 Java sources generated when SEI is created (Starting from WSDL)

File name Explanation
JaxWsTest1.java This is a JavaBean class corresponding to the 'type referenced by the wrapper element of the request message' in the WSDL definition.
JaxWsTest1Response.java This is a JavaBean class corresponding to the 'type referenced by the wrapper element of the response message' in the WSDL definition.
ObjectFactory.java This is an ObjectFactory class of the JAXB 2.2 specifications.
package-info.java This is a package-info.java file.
TestJaxWs.java This is the SEI corresponding to the TestJaxWsPort type.
TestJaxWsImpl.java This is a skeleton class corresponding to the TestJaxWsPort type.
UserDefinedFault.java This is a JavaBean class (fault bean) corresponding to the 'type referenced by the wrapper element of the fault message' in the WSDL definition.
UserDefinedException.java This is the wrapper exception class of the fault bean.

The file names JaxWsTest1, TestJaxWs, and TestJaxWsImpl change according to the coding of the local name for the operation, the local name for the port type, and the local name for the services. For the mapping between the local name for the operation, local name for the port type, and local name for the services and Java sources, see 15. Mapping WSDL to Java.