数据源已经建好。
![](../imgfiles/2005.11.23.11.18.35.7.10.jpg)
6.测试
打开测试视图
![](../imgfiles/2005.11.23.11.18.45.7.11.jpg)
输入两个参数,就getExcel的两个参数,第一个参数是文件名,第二个参数是sheet名,
输入:x1: c:\BEA\weblogic81\samples\liquiddata\EvalGuide\excel\test.xls
x2:Customers (要区分大小)
执行测试,
![](../imgfiles/2005.11.23.11.18.53.7.12.jpg)
测试成功。
7.编译发布数据源。
然后编译整个应用程序,发布Data Service
发布成功可以在ldconsole里查看:
![](../imgfiles/2005.11.23.11.19.1.7.13.jpg)
在BMP中测试Data Service
Data Service发布后,就可以在其它java程序中直接使用了。其步骤如下:
4.1添加DataService控件
![](../imgfiles/2005.11.23.11.19.8.7.14.jpg)
4.2 创建方法
![](../imgfiles/2005.11.23.11.19.15.7.15.jpg)
4.3 控件生成
![](../imgfiles/2005.11.23.11.19.22.7.16.jpg)
Data Service控件生成后就可以类似使用其它控件一样方便的使用了。
4.4 使用BMP测试
BMP流程如下:
![](../imgfiles/2005.11.23.11.19.29.7.17.jpg)
部署应用程序,开始测试:
![](../imgfiles/2005.11.23.11.19.36.7.18.jpg)
返回XML为:
Customer ID |
Customer name |
City |
Sales People ID |
2001.0 |
Hoffman |
London |
1001.0 |
2002.0 |
Alex |
Rome |
1003.0 |
2003.0 |
Liu |
San Jose |
1002.0 |
2004.0 |
Grass |
Berlin |
1002.0 |
2006.0 |
Clements |
London |
1001.0 |
2008.0 |
Cisneros |
San Jose |
1007.0 |
2007.0 |
Pereira |
Rome |
1004.0 |
14031.0 |
|
|
|
|
|
|
|
Amount of customer |
|
7.0 |
|
Minimum of rating |
|
1001.0 |
|
Maximum of rating |
|
1007.0 |
|
Average of rating |
|
1002.8571428571429 |
|
|
|
|
|
Customer ID
Customer name
City
Sales People ID
|
2001.0
Hoffman
London
1001.0
|
2002.0
Alex
Rome
1003.0
|
2003.0
Liu
San Jose
1002.0
|
2004.0
Grass
Berlin
1002.0
|
2006.0
Clements
London
1001.0
|
2008.0
Cisneros
San Jose
1007.0
|
2007.0
Pereira
Rome
1004.0
|
14031.0
|
|
Amount of customer
7.0
|
Minimum of rating
1001.0
|
Maximum of rating
1007.0
|
Average of rating
1002.8571428571429
|
|
【责编:admin】
--------------------next---------------------
阅读(304) | 评论(0) | 转发(0) |