Exercise 1.1: Set up the workspace and create the required projects

Enabling Web service capabilities

To enable the capabilities required for Web services development:

  1. On the Welcome page, check to see if Web services are enabled by looking for the Web services icon in the lower right-hand corner: web services capabilities icon. If the Welcome page has been closed, you can reopen it from the Help menu.
  2. If Web services are not enabled, select the icon in the lower right corner that looks like a person. This will generate a list of capabilities that you can select from.
  3. Select the Web services icon in the top left corner:
    Screen capture of the icons used to select capabilities
You have now enabled the tools used in Web services development.

Setting the WS-I compliance level

WS-I refers to Web service interoperability; this includes interoperability across platforms, operating systems, and programming languages. The WS-I organization sets out standards collected in documents called Profiles that define the requirements needed to make a Web service interoperable. The Rational Developer products validate Web services against the WS-I Simple SOAP Binding Profile 1.0 (WS-I SSBP) and the WS-I Attachments Profile 1.0 (WS-I AP). For more information on WS-I, refer to their Web site: http://www.ws-i.org/

By default, the WS-I SSBP compliance level is set to Suggest. With this setting, a warning dialog box will appear if any non-compliant choices are made, but you will still be able to continue. This compliance level is used by the Web service wizards and the WSDL validation tool. This sample generates a WS-I compliant Web service, therefore you should set the WS-I compliance level to Require.

To change the WS-I compliance level:

  1. On the main menu bar, click Window > Preferences. The Preferences dialog box opens.
  2. Expand the Web Services branch and select WS-I Compliance.
  3. Select the Require option from the drop-down list beside WS-I SSBP.
  4. Click OK.

Creating the Web project

The remaining steps in this tutorial will be done in the J2EE perspective. If you are asked if you want to change to another perspective after performing a task, select No.

In WebSphere Studio, Web services must be contained in a Web project or an EJB project. For this particular tutorial, a Web project is used since the EJB skeleton deploys a Web service in the Web container. All resources required by the Web service, including your WSDL document, EJB and Web settings, are kept in this project.

To create a Web project:

  1. On the main menu bar, click File > New > Project... > Web > Dynamic Web Project. Click Next.
  2. Type WebProject in the Name text field. Click Advanced, and note that the target server is WebSphere Application Server v6. In the EAR project field, enter TempEJBEAR as the EAR name. This will ensure that the EJB that you will crate later and your router project are both referenced in the same EAR. Click Finish.
  3. You have now created your Web project.
    Screen capture of Project Navigator

Adding the project to the server

You need to associate the project with the server that your Web service will run on. To do this:

  1. Right-click the server in the Servers view and select Add and Remove projects. If the Servers view is not open in your workspace, open it from the Window menu by selecting Show View > Servers.
  2. In the window that opens, select your dynamic Web project and its associated EAR file, and click Add.
  3. Click Finish.

 

Now you are ready to begin Exercise 1.2: Import and validate the WSDL file.

Feedback
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.