这一系列文章展示了 WebSphere Studio V5.1.1 中的 Java Server Faces Technology Preview 的特征,本文是其中的第 5 部分。
返回到选择 StockFacade 的 JSF Web Service Proxy 向导,单击 getCompanyInfo (图 21)。
图 21. Web 服务信息列表

再一次为 Web Services Warning 选择 Yes to All 。完成时,这将创建 Web 服务代理,并将其添加为页面数据(图 22)。单击 OK。
图 22. 创建的 Web 服务代理 bean

该页面数据现在有可用于页面的 Web 服务。The page data now has the Web service available to the page.
图 23. 带有可用的 Web 服务的页面数据

现在,我们可以在页面中添加 Web 服务控件:
在 Application Developer 中,将 getCompanyInfo 方法拖到 JSP 页面,如图 24 所示。
图 24. 在 JSP 页面中添加 Web 服务控件

这一操作将会创建一个输入表单。如图 25 中突出显示的标签所示。
图 25. 更改输入表单中的标题

在 Attributes 视图中选择 Heading 3 选项。
图 26. 字段属性

将文本更改为 Get Company Information。接下来选中输入控件旁边的标签(图 27)。
图 27. 更改输入表单的字段标签

转到 Attributes 视图,将该字段选择为 Header 字段(图 28)。
图 28. 字段属性

将文本更改为 Enter Symbol,然后选择 Invoke 按钮。
图 29. 更改按钮标签

转到 Attributes 视图,并在 Label 字段中键入 Get Company Information 。
图 30. 字段属性
查看本文来源