此样本是最初为 WebSphere Studio Application Developer 开发的样本的重新设计版本的一部分,它突出体现了 IBM Software Development Platform 中的前沿 J2EE 技术和工具,包括 Web Service。
这些指示信息和样本都设计为在此 Software Development Platform 的 Windows 版本上运行。必须导入和配置此拍卖 Web 应用程序。
在导入样本后,必须将此样本关联到 WebSphere Application Server V6.0 来运行 Web Service。
要将此样本关联到该应用程序服务器,请遵循以下步骤:
- 在 J2EE 透视图中,单击服务器选项卡来打开“服务器”视图并显示可用的服务器。
- 检查“服务器”视图中的“状态”列来验证 WebSphere Application Server V6.0 已经启动。如果它没有在运行,则选择 WebSphere Application Server V6.0 并单击启动服务器按钮来启动此服务器。这可能要花一点时间。
- 右键单击“服务器”视图中的 WebSphere Application Server V6.0 并单击添加和除去项目。“添加和除去项目”窗口打开。
- 选择 AuctionV60WebServiceClientEAR 并单击添加将其添加到项目列表中。
- 单击完成。“添加和除去项目”窗口关闭。
在启动 Web Service 后,遵循下列步骤来测试它:
- 在“项目资源管理器”视图中,展开动态 Web 项目,然后右键单击 AuctionV60WebServiceClient/WebContent/sampleAuctionListings_PortTypeProxy/TestClient.jsp,并单击在服务器上运行在服务器上运行此 JSP。如果没有为 AuctionV60WebServiceClientEAR 指定服务器,则“选择服务器”窗口打开。
- 选择 WebSphere Application Server V6.0 并单击完成。
Web Service 打开,如以下屏幕捕捉所示:

要查看 Web Service 描述,请遵循以下步骤:
- 在 J2EE 透视图的“项目资源管理器”视图中,展开 Web Service,展开 Service,展开 AuctionListings,然后双击 WSDL: /AuctionV60WebService/WebContent/WEB-INF/wsdl/AuctionListings.wsdl 在 WSDL 编辑器中打开此 Web 服务描述语言(WSDL)文件。缺省情况下,此文件在“图”视图中打开。
- 单击源代码选项卡来查看实际的 WSDL XML 文档。
要查看此 JavaBean Web Service 实现,在 J2EE 透视图的“项目资源管理器”视图中,展开 Web Service,展开 Service,展开 AuctionListings,展开 Service 类,然后双击 ServiceImpl: org_tempuri_AuctionListingsSOAPImpl 在 Java 编辑器中打开此 Web Service 实现文件。
|