Chapter 7. Accessing Web Services 209
Figure 7-2 Development workstation
7.2 A simple Web Service project
The project will be created using the Dynamic Web Project wizard. In this
section, you create a Web project with the name
PrimesWebService. Yo u wil l
import a JavaBean that generates prime numbers into this project. The Web
project will also be published and executed in a WebSphere Test Environment.
1. If not already running, start the IBM WebSphere Studio Site Developer; click
Start -> Programs -> IBM WebSphere Studio -> Site Developer 5.1.1.
2. Select File -> New -> Other.
Figure 7-3 New project creation
WebSphere Studio Site
Developer V5.1.1
Portal toolkit V5.0.2.1
for WSAD or WSSD
Sample portlets
WebSphere Test Environment
IBM WebSphere Application
Server V5 via Portal V5
IBM WebSphere Portal V5
(installed via Portal toolkit)
Development Runtime
Run on Server
210 IBM WebSphere Everyplace Access V5, Volume II: Application Development
3. Select Web -> Dynamic Web Project and click Next.
Figure 7-4 Selection of Dynamic Web Project
4. Enter PrimesWebService for the Project name, select Configure advanced
options and click Next.
Chapter 7. Accessing Web Services 211
Figure 7-5 New Dynamic Web project wizard
5. Click New for the EAR project and enter PrimesWebServiceEAR (was
DefaultEAR) in the New project name field. Click Finish.
212 IBM WebSphere Everyplace Access V5, Volume II: Application Development
Figure 7-6 New Dynamic Web project wizard
6. A class file is provided for this sample scenario (Prime.java); follow these
steps to import the Java file:
a. Import the file by selecting File -> Import, select File system and click
Next.
Chapter 7. Accessing Web Services 213
Figure 7-7 Importing a file
b. In the Import File system window, enter the following information:
i. From Directory: browse to C:\LabFiles\WebServicesClient\Java
Source, then select Primes.java.
Note: You can also download the sample code available as additional
materials. See Appendix B, “Additional material” on page 443.
ii. Into folder: browse to the folder:
PrimesWebService/JavaSource/primes.
iii. Select Create selected folders only option.
iv. Click Finish.

Get IBM WebSphere Everyplace Access V5 Handbook for Developers and Administrators Volume II: Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.