最近,《互联网分布式系统与服务计算》这门课要交实践作业,把自己做的过程记录下来。
题目要求:学习服务组合开源软件ActiveBPEL。1)用wsdl定义“气象预报”的web服务描述,根据地域、时间输入,提交对应的气象状况(含温度、风力等)。2)定义“快餐”web服务描述,根据用户提供的地点、时间、什么气温下吃冷餐的偏好,向送餐人员提供建议。3)连接上述两个服务,形成的组合服务要根据用户偏好和具体输入,提供相应快餐。
一、学习ActiveBPEL(商业版为ActiveVOS)
ActiveBPEL分为BPEL Engine和BPEL Designer,用Designer进行流程设计,产生bpel文件,部署到Engine上运行。Engine以webapp形式存在,所以需要servlet容器(Tomcat)运行引擎。
用Eclipse创建服务,用Axis发布成web service,生成wsdl。用designer编排流程,将process部署到engine,以代码或soap方式来运行流程。
二、Eclipse bpel designer
由于ActiveVOS的lisence过期,选择Eclipse中的bpel插件bpel designer。安装方法:Help-》Software Updates -> Find and Install->New Remote site,输入URL: http://download.eclipse.org/technology/bpel/update-site/。
出现的问题:
"Cannot complete the install because one or more required items could not be found.
Software being installed: BPEL Visual Designer 0.4.0 (org.eclipse.bpel.feature.feature.group 0.4.0)
Missing requirement: BPEL Visual Designer 0.4.0 (org.eclipse.bpel.feature.feature.group 0.4.0) requires 'javax.wsdl [1.4.0,1.5.0)' but it could not be found"
解决方法:
下载http://download.eclipse.org/tools/orbit/downloads/drops/R20090529135407/bundles/javax.wsdl_1.4.0.v200806030407.jar
http://download.eclipse.org/tools/orbit/downloads/drops/R20090529135407/bundles/javax.wsdl_1.5.1.v200806030408.jar
将文件复制到 eclipse/pugins/ 文件夹下。保证1.4和1.5版本都存在。