没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
Creating a complete Web service
Presented by developerWorks, your source for great tutorials
ibm.com/developerWorks
Table of Contents
If you're viewing this document online, you can click any of the topics below to link directly to that section.
1. Introduction 2
2. Installing the Web Services Tools 3
3. The sample Web-based application 6
4. Creating the Web service 10
5. Testing the Web service 14
6. Integrating into the Aggregation demo 17
7. Resources and Feedback 20
Creating a complete Web service Page 1
Section 1. Introduction
Tutorial Purpose
The IBM Web services Toolkit IBM Web Services Toolkit (WSTK) on alphaWorks provides a
practical introduction to hosting Web services. It also includes a companion, the Aggregation
demo, that consists of a number of Web services, their associated visual components, and a
simple portal in which to run them.
Be forewarned, that due to the alpha stage of the tools, integration is not complete. This
means you may have to get your hands dirty at times with manual intervention that will not be
required in real products.
Prerequisites
You should have an understanding of the technologies underlying Web services and
e-business in general, including XML, Java, Web Services Description Language (WSDL),
Simple Object Access Protocol (SOAP), and Universal Description Discovery and Integration
(UDDI).
The tutorial leverages two technologies available on IBM's alphaWorks: the Web Services
Toolkit (WSTK) and the Aggregation demo to set up a local environment for hosting Web
services; and the XML and Web Services Development Environment (WSDE), to turn the
existing Web-based application into a Web service based application (a Web service and its
associated visual component). WSDE also deploys and publishes the Web service.
In order to make use of the tutorial, you'll need:
* Windows NT 4.0 (with Service Pack 6a) or Windows 2000 (with Service Pack 1)
* JDK 1.2.2 or JDK 1.3
* Internet Explorer 5.0 (or higher) or Netscape Communicator 4.5 (or higher)
* the WSTK and the Aggregation demo, downloaded and installed
* a local version of a UDDI-compliant Web services registry (one is available in the
WSTK)
* the personal version of IBM's DB2 database
* the WSDE
* and finally, a Web-based application that you'd like to integrate into the Aggregation
demo and turn into a Web service based application. You can use an existing
application, create something from scratch, or simply use the example presented in the
tutorial.
About the author
Greg Flurry is a member of the Software Group Emerging Technologies Area. He and other
members of the area are working to improve the applicability of Web services and related
technologies in e-business environments. You can reach Greg at flurry@us.ibm.com .
Presented by developerWorks, your source for great tutorials
ibm.com/developerWorks
Creating a complete Web service Page 2
Section 2. Installing the Web Services Tools
WSDE
You can download WSDE from IBM alphaWorks at
www.alphaworks.ibm.com/tech/wsde . Be sure you get the version that was updated on
12/20/2000. If you have trouble with this, the WSDE and installation are discussed in
the Web services tutorial titled Web services: The Web's next revolution by Doug
Tidwell. (Note that at this time, WSDE works only on a Windows operating system.)
You can download the WSDE zip file (xml-wsDE.zip, which is almost 90 MB, so be
patient), or you can download the file or get it in pieces (xml-wsDE.zip.1-9) and
follow the instructions on the site for reassembly. When you unzip the file, it creates an
itp directory relative to the base directory you unzip to -- in the tutorial this is referred
to as WSTK_HOME. Check your installation by "exploring" to the itp folder and
double-clicking on ide.exe. If you wish, follow the instructions in Doug's tutorial to
actually use the WSDE. You will need to shut down the WSDE to install some plugins
after installing the WSTK.
Web services: The Web's next revolution
WSTK - base
You can download the WSTK and associated components at
www.alphaworks.ibm.com/tech/Webservicestoolkit . You must use WSTK version 2.2.1,
updated 03/21/2001, for this tutorial. You cannot successfully complete the tutorial with an
older version of the WSTK.
You will need to download only the following zip files:
* wstk221.zip - supplies the base WSTK; you must install (unzip) this file. Once installed,
you can browse the WSTK's installation guide and background material for additional
information.
* wstkuddi221.zip - supplies some of the support necessary to implement a local UDDI
registry; you will also need an installation of the IBM DB2 database. I'll discuss this at
greater length below.
* browser-plugin221.zip - supplies a plug-in Web Services Browser for the WSDE.
This must be extracted in the itp directory where the WSDE was installed.
* AggregationDemo22.zip - (not a typo, it really is AggregationDemo22.zip) supplies the
Aggregation demo; I'll discuss this in greater detail below.
You must install the WSTK on the same machine as the WSDE. This is necessary only for
the current alpha version of the WSDE. The rest of the tutorial will assume that both WSDE
and WSTK are installed on a single machine.
I recommend installing wstk221.zip in the root directory; we'll refer to the path up through
the wstk-2.2 directory that gets created as WSTK_HOME. Once you have installed
wstk221.zip, the WSTK runs with three different application servers:
* IBM WebSphere Application Server, Version 3.5.2
* Embedded WebSphere, Version 3.5
Presented by developerWorks, your source for great tutorials
ibm.com/developerWorks
Creating a complete Web service Page 3
* Apache Tomcat 3.2.1
If you are already using WebSphere 3.5.2 or Tomcat 3.2.1, I suggest you complete the
installation and configuration by following the appropriate instructions for your current
application server. If you currently run neither of these application servers, I suggest you use
Embedded WebSphere. It is included in the wstk221.zip file and minimizes additional
configuration. I used that server while creating this tutorial.
WSTK - local UDDI
The WSTK requires a UDDI-compliant Web services registry. The WSTK offers a choice;
you can use the IBM UDDI Test registry or you can set up a local UDDI registry on your
machine. The tutorial assumes you have set up a local UDDI registry.
Follow the WSTK installation and configuration instructions related to the local UDDI. You
must download wstkuddi221.zip and unzip the file into the same directory you unzipped
wstk221.zip. Running a local UDDI requires you to install a DB2 database; IBM makes a
personal version of DB2 available to you for free, but you do have to download, install and
configure it. See the WSTK installation instructions for the local UDDI for details.
WSTK - testing
I recommend that, in order to check your installation, you run some of the Web services
demos provided with the base WSTK after installing the local UDDI. Follow the
instructions to deploy, publish, run, unpublish, and undeploy the stock quote service or
the test Web service, or both. If these demos don't work, you need to check your
configuration.
One item that may cause problems is the database access. If this happens, make sure
that the user wstkAdmin with the password wstkAdmin has access to the
WSTKDATA database. You can do this by installing DB2 as the user wstkAdmin. If
you have installed DB2 as another user, use follow these steps to give wstkAdmin
access:
1. Open the DB2 Control Center.
2. Expand the tree on the left until you see the database WSTKDATA.
3. Right click on database WSTKDATA and select Connect.
4. In the Connect dialog box, enter "wstkAdmin" in the User ID and the Password
fields; click the OK button.
WSTK - Aggregation demo
Once you've successfully run the stock quote web service demo, install the Aggregation
demo. Unzip AggregationDemo22.zip into the same directory where you unzipped
wstk221.zip. Then follow the instructions for configuring the WSTK environment for the
Aggregation demo.
Presented by developerWorks, your source for great tutorials
ibm.com/developerWorks
Creating a complete Web service Page 4
剩余19页未读,继续阅读
xiloujianke
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1