本教程将说明如何为 Siebel 业务服务创建 Web 服务。Siebel 将许多内部功能公开为 Web 服务(又称为应用服务接口或 ASI),工作流也可以公开为 Web 服务。您使用的工具可在 Siebel 瘦客户端中找到,无需 Siebel Tools(或胖客户端)。在本例中,您将利用 Siebel 帐户业务服务并使用 Siebel 瘦客户端的 WS-Admin 功能,将其公开为入站 Web 服务,生成 WSDL 文件,并将该文件保存到本地文件系统中。
为 Siebel 帐户 Web 服务生成的 WSDL 文件可由许多融合中间件组件使用,例如 Oracle SOA 套件(包括 BPEL 流程管理器和企业服务总线)、Oracle Web 服务管理器、Oracle WebCenter 等。
利用现有的 Siebel 帐户业务服务并使用 Siebel 瘦客户端的 WS-Admin 功能,将其公开为入站 Web 服务。随后,为入站 Web 服务添加操作,然后再生成 WSDL 文件。
| 1. |
在 Oracle Siebel 登录屏幕上,输入您的用户名和口令。向您的 Siebel 管理员询问用户名和口令。

单击右箭头 登录。
|
| 2. |
在 Siebel Home 页面中,单击 Site Map 图标。

|
| 3. |
在 Home Screens 页面中,单击 Administration - Web Services 超链接。

|
| 4. |
在 Administration - Web Services 屏幕中,单击 Inbound Web Services 链接。
|
| 5. |
在这里,您将找到已公开的现成 Web 服务。现在,开始将 Siebel 帐户公开为 Web 服务。在 Inbound Web Services 页面中,单击 Menu 选项,并从下拉列表中选择 New Record。

|
| 6. |
输入下列值:
| Namespace |
http://siebel.com.fmw |
| Name |
Siebel Customer Account |
| Status |
Active |

在 Comment 域中输入 For Fusion Middleware。

|
| 7. |
向下滚动到 Service Ports 窗格,并从 Menu 下拉列表中选择 New Record。

|
| 8. |
在 Name 域中输入 CustAccount,然后单击 Type 域中的按钮。

|
| 9. |
在 Inbound Web Service Port Type Pick Applet 中,单击 New 选项卡。

|
| 10. |
在对话框中,为 Implementation Type 选择 Business Service,并在 Service Name 中输入“s”。从列表中选择 Siebel Account。

|
| 11. |
在 Inbound Web Service Port Type Pick Applet 中,单击 OK 创建入站 Web 服务。

|
| 12. |
在 Service Ports 对话框中,从 Transport 下拉列表中选择 HTTP。

|
| 13. |
在 Address 域中,将 URL 设置为您的 Siebel 实例。例如,我们使用了以下语法: http://testsebl.us.oracle.com/eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&UserName=SADMIN&Password=SADMIN

|
| 14. |
从 Menu 下拉列表中,选择 Save Record 选项。

|
| 1. |
向下滚动至 Operations 部分。

从 Menu 中选择 New。
在 Operation Name 域中键入 AccountInsert。注意,这可能在下一步中被改写(Siebel UI 的操作方式就是如此,因此您只得再输入一次。)
|
| 2. |
单击 Method Display Name 域中的按钮打开 Business Service Method 对话框。
|
| 3. |
选择 Insert 作为方法。
单击 OK。
|
| 4. |
在 Authentication Type 域中,从下拉列表中选择 None。

|
| 5. |
单击 New 按钮创建一个新操作。

在 Operation Name 域中,输入 AccountQueryByExample。
|
| 6. |
对于新的 AccountQueryByExample 操作,单击 Method Display Name 域中的按钮。

|
| 7. |
在 Business Service Method 对话框中,选择 Query By Example 方法。

单击 OK。
|
| 8. |
在 Operations 窗格的 Authentication Type 域中,从下拉列表中选择 None。

|
| 9. |
单击 New 按钮。

|
| 10. |
在 Operations 对话框中,单击 New。

在 Operation Name 域中,输入 AccountQueryByID。
|
| 11. |
对于新的 AccountQueryByID 操作,单击 Method Display Name 域中的按钮。

|
| 12. |
在 Business Service Method 对话框中,选择 Query By ID 方法。

单击 OK。
|
| 13. |
在 Operations 窗格的 Authentication Type 域中,从下拉列表中选择 None。

|
| 14. |
在 Service Ports 窗格中,从 Menu 下拉列表中选择 Save Record 选项。

|
| 15. |
在 Inbound Web Services 窗格中,从 Menu 下拉列表中选择 Save Record 选项。

|
| 16. |
单击 Clear Cache 菜单选项。

|
| 17. |
单击 Generate WSDL 按钮。

|
| 18. |
在 File Download 对话框中,单击 Open。

|
| 19. |
Web 服务 XML 代码将显示在浏览器中。

|
| 20. |
选择 File --> Save As...

|
| 21. |
定位到您要保存 WSDL 文件的目录,然后将文件命名为 SiebelAccountInsertWS_80.wsdl。

单击 Save。
|