
Chapter 8 Working with Web Services
Generating the corresponding EJB Web service for Sybase WorkSpace
The Web service generation allows you to create the following files:
- A svc_ejb file that defines the EJB Web service
- .java files for the EJB bean class, home and remote interfaces
- The EJB deployment descriptor
- A .project file for creating a Java project if it does not exist
- A .classpath file for defining Java libraries in a Java project
- A build.xml Ant script file used to compile, package and deploy the EJB
When you generate in PowerDesigner You use the Generate Java Code command.
When you generate using the PowerDesigner Eclipse plugin You also use the Generate Java Code command:
- If the project does not exist it will be automatically added in Eclipse
- If the project already exists, it will be refreshed to show the new files
To generate an EJB Web service in PowerDesigner:
- Select Language→Generate Java code.
The Generation dialog box is displayed.
- Click the Options tab and modify the localhost by your server name for both options EAServer host name and JNDI provider URL.
- Type a destination directory in the Directory box or use the Select a path button.
- Make sure the Sybase WorkSpace IDE is selected in the Targets tab.
- Click OK.
If you want to generate the project in a folder that is not a sub-folder of the Eclipse WorkSpace folder, you need to define the ECLIPSE_HOME variable prior to code generation.
To define the J2EE_HOME variable:
- Select Tools→General Options.
- Click the Variables category and enter the new variable J2EE_HOME. The path of the variable is the J2EE directory (make sure you do not add a \ at the end of the path).
Copyright (C) 2007. Sybase Inc. All rights reserved.
|
|