uCosminexus Application Server, Application Development Guide

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

8.3.4 Generating a Java source/WSDL/XSD

Based on the created Web Service implementation class, generate the Java source (Java Bean (stub)), WSDL files, and XSD files required for developing and executing Web Services. You can generate the Java source, WSDL files, and XSD files from Eclipse. To generate Java source, WSDL files, and XSD files:

  1. In the Project Explorer view, select the project to be used for developing Web Services.
    Select a dynamic Web project for developing a POJO Web Service and an EJB project for developing an EJB Web service.
  2. From the Eclipse menu bar, choose File - New - Other.
    The New dialog box appears.

    [Figure]

  3. Choose Cosminexus Web Service - Web Service (Starting from Java), and then click the Next button.
    The Web Service (Starting from Java) page of the Web Service (Starting from Java) dialog box appears.

    [Figure]

  4. Specify the following items:
    Item name Specified value
    Project Select dynamic Web project name or the EJB project name of the workspace.
    Web service class Specify the Web Service implementation class.
    Java Source folder Specify the folder for generating the Java source.
    WSDL folder# Specify the folder for generating the WSDL file.

    #:
    By clicking the Browse button of WSDL folder, the Browse For Folder dialog box is displayed, and by selecting the virtual folder of My Computer in the Tree view, and entering the folder name in Folder, the WSDL folder can be selected.

    When the following settings are specified and the Web Service (Starting from Java) dialog box appears, the Java source folder column becomes blank and the subsequent operations can no longer be performed. Therefore, specify a folder other than the project root in Java source folder.
    • When the project root is set up in Source folders build path in the Source tab of the Java Build Path page of the Properties dialog box, for the project used to develop Web Services
     
    Also, if the values entered in Project and Java source folder are changed, the values of the following items return to their initial states:
    • If the values in Project are changed
      The values of Web service class, Java source folder, and WSDL folder return to the initial state.
    • If the values in Java source folder are changed
      The values of Web service class and WSDL folder return to the initial state.
     
    For more details on each item, also see 14.3 cjwsgen command in the manual uCosminexus Application Server Web Service Development Guide.
  5. Click the Finish button.
    A message, indicating that the processing is executed, appears and the Java source, WSDL files, and XSD files are generated.
    Note
    If the Web Service implementation class is modified and the Java source is regenerated using the Web Service (Starting from Java) dialog box due to the upgrade of the Web Service version, make sure that a file with the name same as of the output file does not exist in the folder specified in Java source folder.
    Consequently, when generating the WSDL file, confirm that a file with the name same as of the output file does not exist in the folder specified in WSDL folder.
    If a Java Bean (stub), WSDL, and XSD with the name same as of the output file exists, the Java Bean (stub), WSDL, and XSD is overwritten.