The following figure shows the flow of the development starting from SEI:
Figure 2-3 Development of Web Services starting from SEI
Although the JAX-WS engine automatically generates WSDLs, you can also generate WSDLs by executing the commands according to step 4. If you are not generating a WSDL with the commands, step 4 will not be required.
- Creating a Web Service Implementation Class
There are cases when a Web Service Implementation Class is created as POJO or created based on EJB. In both the cases, create a Web Service Implementation Class according to the JAX-WS 2.2 specifications and JAXB 2.2 specifications. For receiving messages of the SOAP 1.2 specifications, specify http://www.w3.org/2003/05/soap/bindings/HTTP/ in the javax.xml.ws.BindingType annotation.
For the support range of the JAX-WS 2.2 specifications, see 19.1 Support range of the JAX-WS 2.2 specifications. For the support range of the JAXB 2.2 specifications, see Appendix B Support Range of the JAXB Specifications in the uCosminexus Application Server XML Processor User Guide.
- Compiling Web Services Implementation Classes
Execute the javac command to compile the created Web Services Implementation Classes. For details on the javac command, see the JDK documentation.
- Creating a DD
Create web.xml and application.xml. Code the Web Service-specific information in web.xml. For creating web.xml, see 3.4 Creating web.xml.
- Executing the WSDL generation functionality of the cjwsgen command (optional)
Specify the -wsdl option to execute the cjwsgen command, generate a WSDL from Web Services Implementation Class, and check errors such as the annotation errors. To ensure that no errors occur when dynamically generating the JavaBeans class (stub) mentioned in step 6, execute the cjwsgen command for the compiled Web Services Implementation Classes. This step is optional. Do not change the WSDL that is generated in this step.
To deploy the WSDL generated with the WSDL generation functionality of the cjwsgen command, you can develop any method other than the meta data issuing functionality, such as sending through mail.
For the cjwsgen command, see 14.3 cjwsgen command.
- Creating an EAR file
Create an EAR file containing the created file. For creating EAR files, see 3.5.3 Creating EAR files.
- Deploying and starting the EAR file
Deploy the created EAR file and start the file as a J2EE application (Web Service). For details on the import and start commands of J2EE applications, see cjimportapp (Importing J2EE applications) and cjstartapp (Starting J2EE applications) in the uCosminexus Application Server Command Reference Guide.
For the method to deploy (import) J2EE applications by using the management portal, see 12.3.3 Importing J2EE applications in the uCosminexus Application Server Management Portal User Guide.
For the method to start J2EE applications by using the management portal, see 12.3.1 Starting J2EE applications in the uCosminexus Application Server Management Portal User Guide.
The JAX-WS engine dynamically generates the JavaBeans class (stub) when you start a J2EE application (Web Services). Also, to ensure that no error occurs when dynamically generating the JavaBeans class (stub), if you execute commands for the compiled Web Services Implementation Classes as mentioned in step 4 of this section, you can check any errors such as annotation errors in advance. See 10.23(1) Using the cjwsgen command to check errors.
For examples of the development of Web Services starting from SEI, see the following sections:
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.