This section describes how to:
Create a Web service from a WSDL file – this top-down approach (creating a Web service from the WSDL) allows you to create a Web service from an existing WSDL file.
Create a Web service from a Java file – this bottom-up approach (creating a Web service from a component) allows you to create a Web service from a Java file.
The Web service can be contained in various projects. See “Web service projects” for more information about projects.
Creating a Web service from a WSDL
From the Web Service container, select File | New | Other.
The New wizard displays. Select Sybase Web Services in the left pane, and Web Service in the right pane. Click Next. You can also create the Web service within a project by selecting Web Service Project. If you do not select a project at this time, you will be asked later to provide a project for the Web service.
The Create Web Service wizard displays. Follow the instructions to create a Web service from a WSDL file. Table 4-3 describes the wizard properties.
Complete the wizard instructions and click Finish to create the Web service. If you choose a Project for this Web service, you can view the project by selecting Window | Show View | Package Explorer. The Projects appear in the right pane. Expand the project and package to view the Web service. Along with a Web service, the wizard generates the other required files, including a .wsdd file.
You can right-click the .wsdd file and then select Deploy to deploy it as a Web service.
Creating a Web service from a Java file
From the Web Service container, select File | New | Other.
The New wizard displays. Select Sybase Web Services in the left pane, and Web Service in the right pane. Click Next. You can also create the Web service within a project by selecting Web Service Project. If you do not select a project at this time, you are asked later to provide a project for the Web service.
The Create Web Service wizard displays. Follow the instructions to create a Web service from a Java file. Table 4-3 describes the wizard properties.
Complete the wizard instructions and click Finish to create the Web service. If you choose a Project for this Web service, you can view the project by selecting Window | Show View | Package Explorer. The Projects appear in the right pane. Expand the project, and package to view the Web service. Along with a Web service, the wizard generates the other required files, including a .wsdd file.
You can right-click the .wsdd file and then select Deploy to deploy it as a Web service.
Window |
Property |
Description |
---|---|---|
Select the Web Service Project |
Project Type |
Select the project in which you will create a Web service. The project wizard displays only if you choose to create a Web service project. |
Create the Project |
Project Name |
Provide a name for your project. |
|
Project Contents |
Use the Browse button to select the project contents directory that contains your project, or click the check box to use the default directory, which is the project name located in the $Eclipse/workspace directory. |
Select Approach |
Create from WSDL or Create from Java File |
You can create the The Web service from an existing Java file or .wsdl file. Click the appropriate check box. |
If Creating From WSDL |
Locate From a Local File, URL, or UDDI |
Provide the location of the .wsdl file, by entering the file location, URL, or UDDI site. If the file is on the local file system use Browse to locate it. If you are locating the file from a UDDI site, follow the instructions for publishing to a UDDI site as described in Table 4-8. |
Package Name |
The name of the package in which the Web service is created. If you do not enter a package name, “default” is used. |
|
If Creating From Java File |
Create From Java File |
Enter the Java file being used to create the Web service. |
Options |
You can specify various preferences used for you Web service deployment. These options are described in Table 4-6. |
|
Method Selection |
Select the methods/operations to be exposed in the Web service’s WSDL file. |
|
Summary |
A summary of your entries. Verify they are accurate and click Finish, or Back to change your selections. |