Step 1: Create a Web Service Project

In this step you will create the application that you will be working with throughout this tutorial. In WebLogic Workshop, an application contains one or more projects. For this application you will create a web service project to hold the web service you are going to build.

The tasks in this step are:


To Start WebLogic Workshop

If you have an instance of WebLogic Workshop already running, you can skip this step.

... on Microsoft Windows

If you are using a Windows operating system, follow these instructions.

  • From the Start menu, choose Programs-->WebLogic Platform 8.1-->WebLogic Workshop 8.1.

...on Linux

If you are using a Linux operating system, follow these instructions.

  • Open a file system browser or shell.
  • Locate the Workshop.sh file at the following address:
    $HOME/bea/weblogic81/workshop/Workshop.sh
  • In the command line, type the following command:
    sh Workshop.sh

To Create a New Application and Select a WebLogic Server Domain

To create the web service project, you must first create the application to which it will belong:

  1. From the File menu, select New-->Application. The New Application dialog appears.
  2. In the New Application dialog, in the upper left-hand pane, select All.
    In the upper right-hand pane, select Empty Application.
    In the Directory field, use the Browse button to select a location to save your source files. A suggested location is BEA_HOME\user_projects\applications\GettingStarted_WebServices.
    In the Name field, enter GettingStarted_WebServices.
    In the Server field, from the drop-down list, select BEA_HOME\weblogic81\samples\domains\workshop.

  3. Click Create.

To Create a New Web Service Project

  1. In the Application tab, right-click the GettingStarted_webServices folder and select New-->Project.
  2. In the New Project dialog, in the upper left-hand pane, confirm that Web Services is selected.
    In the upper right-hand pane, select Web Service Project.
    In the Project Name field, enter MyJWSProject.

  3. Click Create.

The Application Tab should now look like the picture shown to the right.

The top-level folder GettingStarted_WebServices is the containing folder for the entire application. All of the source files for your application exist in this folder.

The folder MyJWSProject is a project folder. An application can contain any number of project folders and there are many different kinds of project folders, including Web projects, Web Services projects, Schema projects, and so forth. MyJWSProject is a web services project. A web service project always contains the WEB-INF folder. This folder stores JSP tag libraries, configuration files, compiled class files, and other runtime resources.

The Modules folder is for the storage of stand-alone applications (packaged as WAR and JAR files) that can deployed parallel with your web service, if you wish.

The Libraries folder is for the storage of resources that are to be used across multiple projects, provided the resources are packaged as JAR files. For example, if you had a control or an EJB that you wanted to re-use across all your projects, you would store it in the Libraries folder.

The Security Roles folder lets you define security roles and test users for your web application. You can test the security design of your web application by logging in as a test user.

To Start WebLogic Server

Since you will be deploying and running your Java control on WebLogic Server, it is helpful to have WebLogic Server running during the development process.

You can confirm whether WebLogic Server is running by looking at the status bar at the bottom of WebLogic Workshop. If WebLogic Server is running, a green ball is displayed as pictured below.

If WebLogic Server is not running, a red ball is displayed, as pictured below.

If you see the red ball in the status bar, then follow these instructions to start WebLogic Server:

  • From the Tools menu, choose WebLogic Server-->Start WebLogic Server.
  • On the WebLogic Server Progress dialog, you may click Hide and continue to the next task.

Related Topics

Getting Started with Web Services

How Do I...? Web Service Topics

The WebLogic Workshop Development Environment

Click one of the following arrows to navigate through the tutorial: