Modelling Web Service Composition Using Reo Coordination Language
基于Mobile Agent和Web Service的移动数据同步模型

关键词 移动数据库 ;同步 ; 移动 Agn  ̄ e t 迁移 ; b We 服务
中图分 类 号 T 3 11 P 1 .3
M o ie D a a a e S n hr ni a i n M o e b l t b s y c O z tO d l Ba e n M o ie Ag nta d W e r i e sdo b l e n b Se v c
K y W o d mo i aa ae y c r nzto e rs bl d tb s ,s n h o iain,mo i e t e bl Ag n ,mir t n,W e evc e ga i o b s rie
Cl s mb  ̄ TP 】 . 3 a s Nu e 3 1 1
的 移 动 数 据 同步 模 型
汪 雄杰 熊前 兴
武汉 406) 3 0 3 ( 武汉理工大学计算机科学与技术学院
摘
要
数据 同步技术是移动数据库的关键技术之一 , 是移动系统进入应用阶段必须解决 的难题 。文章分析移动数 也
据库 的结构和特点 , 针对性地提出了一个基于移动 Agn 和 We et b服务 的同步模型 。模 型针对实 际运 行环境克服 了通信 网 络质量差和数据库选取受限制的不利 因素 。利用移动 A et g n 技术解决 了移动数据 库同步过程 中的网络不稳定难题 。通过
Ab ta t Daas n h o iaini h r ca p r fmo i aa a etc n lg s rc t y c rnz t st ecu il a t bl d tb s eh oo y,a di i as rb e m u t es le o o e n loap o lm s ov d ts b
webservice contentis is not allowed in prolog

webservice contentis is not allowed inprolog近些年来,随着互联网技术的不断发展,Web服务已成为许多企业最为关注的技术之一。
然而,当在使用Web服务过程中出现“Webservice contentis is not allowed in prolog”错误时,许多人可能会感到困惑和不知所措。
在此篇文章中,我将阐述如何解决此类问题。
1.了解问题原因首先,我们需要了解这个错误是什么意思。
当我们的Web服务返回XML响应时,这个错误表示一个或多个不正确的字符被插入到XML文档的开头,导致XML文档无法解析。
这些不正确的字符可能是空格、回车或其他不可见的字符。
因此,我们需要找到并删除这些字符才能解决问题。
2.检查XML响应内容接下来,我们需要检查我们的XML响应内容。
我们可以使用我们的Web浏览器来查看我们的响应内容,以确定XML文档的开头是否包含任何不正确的字符。
如果我们发现任何不正确的字符,我们应该尝试将它们删除,然后再次测试我们的Web服务来查看我们是否已解决问题。
如果我们仍然遇到同样的错误,则需要继续按照下面的步骤进行操作。
3.查看Web服务配置文件我们需要检查我们的Web服务配置文件。
在此文件中,我们可以查看有关我们的Web服务如何处理XML响应的信息。
我们应该验证我们的Web服务配置是否正确,并且我们是否正确地编写了我们的XML响应。
如果我们发现任何错误,我们应该进行更改,并重新启动我们的Web服务。
4.检查XML文档版本我们还可以检查XML文档版本。
当我们的XML文档使用较早版本的XML格式时,我们可能会遇到此类错误。
在这种情况下,我们需要使用较新的XML格式版本,以保证XML文档可以正常解析。
5.使用XML解析器解析响应最后,我们可以使用XML解析器解析我们的响应。
如果我们仍然无法解决这个问题,我们可以尝试使用可用的XML解析器,比如DOM或SAX解析器。
四种方式调用webservice

四种客户端调用WEBSERVICE 王凡Woshiwangfan@Wf141732@2009-08-22目录1.文档概述 (2)1.1.相关文档 (2)2.SERVER端 (3)2.1.代码 (3)2.2.SERVER端生成Wsdl (4)2.3.服务端安全性设置 (6)3.VB调用 (13)3.1.准备 (13)调用 (16)4.1.实现过程 (16)5.Axis2调用 (17)5.1.Axis2的安装 (17)5.2.Axis2调用过程 (17)6.Weblogic调用 (21)6.1.Weblogic (21)7.已解决及未解决的问题 ........................................................... 错误!未定义书签。
7.1.未解决的问题.................................................................... 错误!未定义书签。
7.2.已解决的问题.................................................................... 错误!未定义书签。
1.文档概述1.1.相关文档《Web Services开发教程.doc》2.SERVER端这个主要是用weblogic的workshop开发,用weblogic开发webservice具体可见沈辉的《Web Services开发教程.doc》,这里主要是讲客户端调用,所以服务端只作罗列。
2.1.代码在weblogic中构建webservice可以见《Web Services开发教程.doc》,用于本次测试的Server代码如下:Model:package .tsingtao.logistics.model;import java.io.Serializable;public class test implements Serializable {private static final long serialVersionUID = 1L;private String NAME;private int AGE;public void setNAME(String name){NAME=name;}public void setAGE(int age){AGE=age;}public String getNAME(){return NAME;}public int getAGE(){return AGE;}}Service代码如下:public .tsingtao.logistics.model.test[] hello(String NAME,int AGE) {.tsingtao.logistics.model.test[] t=new.tsingtao.logistics.model.test[10];for(int i=0;i<10;i++){t[i] = new .tsingtao.logistics.model.test();t[i].setNAME(NAME+i);t[i].setAGE(AGE+i);}return t;}2.2.SERVER端生成Wsdl在Server端生成的wsd如下:<?xml version='1.0' encoding='UTF-8'?><s0:definitions name="testServiceDefinitions"targetNamespace="http://cn/com/tsingtao/logistics/service" xmlns=""xmlns:s0="/wsdl/"xmlns:s1="http://cn/com/tsingtao/logistics/service"xmlns:s2="/wsdl/soap/"><s0:types><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"targetNamespace="java:.tsingtao.logistics.model"xmlns:s0="/wsdl/"xmlns:s1="http://cn/com/tsingtao/logistics/service"xmlns:s2="/wsdl/soap/"xmlns:xs="/2001/XMLSchema"><xs:complexType name="test"><xs:sequence><xs:element minOccurs="1" name="AGE" nillable="false" type="xs:int"/><xs:element minOccurs="1" name="NAME" nillable="true" type="xs:string"/></xs:sequence></xs:complexType><xs:complexType name="ArrayOftest_literal"><xs:sequence><xs:element maxOccurs="unbounded" minOccurs="0" name="test"nillable="true" type="java:test" xmlns:java="java:.tsingtao.logistics.model"/></xs:sequence></xs:complexType><xs:element name="ArrayOftest_literal" type="java:ArrayOftest_literal"xmlns:java="java:.tsingtao.logistics.model"/></xs:schema><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://cn/com/tsingtao/logistics/service"xmlns:s0="/wsdl/"xmlns:s1="http://cn/com/tsingtao/logistics/service"xmlns:s2="/wsdl/soap/"xmlns:xs="/2001/XMLSchema"><xs:import namespace="java:.tsingtao.logistics.model"/><xs:element name="hello"><xs:complexType><xs:sequence><xs:element name="NAME" type="xs:string"/><xs:element name="AGE" type="xs:int"/></xs:sequence></xs:complexType></xs:element><xs:element name="helloResponse"><xs:complexType><xs:sequence><xs:element name="return" type="java:ArrayOftest_literal"xmlns:java="java:.tsingtao.logistics.model"/></xs:sequence></xs:complexType></xs:element></xs:schema></s0:types><s0:message name="hello"><s0:part element="s1:hello" name="parameters"/></s0:message><s0:message name="helloResponse"><s0:part element="s1:helloResponse" name="parameters"/></s0:message><s0:portType name="test"><s0:operation name="hello" parameterOrder="parameters"><s0:input message="s1:hello"/><s0:output message="s1:helloResponse"/></s0:operation></s0:portType><s0:binding name="testServiceSoapBinding" type="s1:test"><s2:binding style="document"transport="/soap/http"/><s0:operation name="hello"><s2:operation style="document"/><s0:input><s2:body parts="parameters" use="literal"/></s0:input><s0:output><s2:body parts="parameters" use="literal"/></s0:output></s0:operation></s0:binding><s0:service name="testService"><s0:port binding="s1:testServiceSoapBinding" name="testSoapPort"><s2:address location="http://localhost:7001/BSM/test"/></s0:port></s0:service></s0:definitions>2.3.服务端安全性设置这个是根据沈辉的《Web Services开发教程.doc》设置的,不作详细说明,只作罗列2.3.1.在weblogic中新建用户和用户组2.3.2.在webapp中配置安全性在web-info\web.xml中添加红色部分<?xml version="1.0" encoding="UTF-8"?><web-app id="WebApp_ID" version="2.4"xmlns="/xml/ns/j2ee"xmlns:xsi="/2001/XMLSchema-instance"xsi:schemaLocation="/xml/ns/j2ee /xml/ns/j2ee/web-app_2_4.xsd"><display-name>BSM</display-name><welcome-file-list><welcome-file>index.html</welcome-file><welcome-file>index.htm</welcome-file><welcome-file>index.jsp</welcome-file><welcome-file>default.html</welcome-file><welcome-file>default.htm</welcome-file><welcome-file>default.jsp</welcome-file></welcome-file-list><security-role><role-name>wsuser</role-name></security-role><security-constraint><web-resource-collection><web-resource-name>Secure Area</web-resource-name><url-pattern>/*</url-pattern><http-method>GET</http-method><http-method>POST</http-method></web-resource-collection><auth-constraint><role-name>wsuser</role-name></auth-constraint></security-constraint><login-config><auth-method>BASIC</auth-method><realm-name>myrealm</realm-name></login-config></web-app>在web-info\weblogic.xml中添加红色部分<?xml version="1.0" encoding="UTF-8"?><wls:weblogic-web-appxmlns:wls="/ns/weblogic/weblogic-web-app"xmlns:xsi="/2001/XMLSchema-instance"xsi:schemaLocation="/xml/ns/javaee/xml/ns/javaee/web-app_2_5.xsd/ns/weblogic/weblogic-web-app/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"><wls:weblogic-version>10.3</wls:weblogic-version><wls:context-root>BSM</wls:context-root><security-role-assignment><role-name>wsuser</role-name><principal-name>wsgroup</principal-name></security-role-assignment></wls:weblogic-web-app>重新发布后在浏览器中就可以看到了3.VB调用3.1.准备使用vb6.0调用webservice需要用到SOAP Toolkit,我们选用的是SOAP Toolkit3.0版本。
swift介绍

一致性哈希算法
Replica 如果集群中的数据在本地节点上只有一份,一旦发生故障就可能会造成数据 的永久性丢失。因此,需要有冗余的副本来保证数据安全。Swift中引入了 Replica的概念,其默认值为3,理论依据主要来源于NWR策略(也叫Quorum协议)。 NWR是一种在分布式存储系统中用于控制一致性级别的策略。在Amazon的 Dynamo云存储系统中,使用了NWR来控制一致性。其中,N代表同一份数据的 Replica的份数,W是更新一个数据对象时需要确保成功更新的份数;R代表读取一 个数据需要读取的Replica的份数。 公式W+R>N,保证某个数据不被两个不同的 事务同时读和写;公式W>N/2保证两个事务不能并发写某一个数据。 在分布式系 统中,数据的单点是不允许存在的。即线上正常存在的Replica数量为1的情况是 非常危险的,因为一旦这个Replica再次出错,就可能发生数据的永久性错误。 假如我们把N设臵成为2,那么只要有一个存储节点发生损坏,就会有单点的存 在,所以N必须大于2。N越高,系统的维护成本和整体成本就越高。工业界通常 把N设臵为3。例如,对于MySQL主从结构,其NWR数值分别是N= 2, W = 1, R = 1, 没有满足NWR策略。而Swift的N=3, W=2, R=2,完全符合NWR策略,因此Swift系 统是可靠的,没有单点故障。
Keystone认 证
根据之前 配臵文件, 他工作在 5000端口 下
返回 响应 结果
验证用户 是否合法 允许操作
根据配臵文件,他 工作在8080端口下
API使用描述
1)获取token
可以利用curl模拟http消息, 来验证一下swift API的用法, 首先是通过租户名,用户名, 密码获取token,tenant_id,
modelservice 部署流程

modelservice 部署流程
部署ModelService(模型服务)的一般流程如下:
1. 模型准备:首先训练并导出AI模型,将其转换为可在服务中加载的格式,如TensorFlow SavedModel、ONNX等。
2. 环境配置:根据ModelService的运行要求配置服务器环境,包括安装必要的运行库、框架及ModelService软件包。
3. 配置文件编写:编写服务配置文件,包括模型路径、服务端口、并发处理数等参数。
4. 服务部署:将模型文件部署到服务器,并启动ModelService,加载模型并监听指定端口,准备对外提供预测服务。
5. 接口测试:通过HTTP请求或其他客户端工具,对部署的服务进行接口调用测试,确保模型服务能正确返回预测结果。
6. 监控与维护:部署后需持续监控服务状态,对可能出现的性能瓶颈、错误情况进行及时处理,并定期更新模型版本以优化服务效果。
Human-Computer Collaborative Service Composition for Service-Oriented Manufacturing Integrated

Advanced Materials Research Vols. 139-141
1447
by introducing semantic knowledge, and then collaborates closely with the user on the composition. As a matter of fact, many professional disciplines and different teams are involved in the product development process, and it is impossible to transform all of their professional experience and knowledge into formal description that computer can understand, so it is impractical to expect to create a powerful collaborative design process without human intቤተ መጻሕፍቲ ባይዱlligence.
Fig. 1
Three-layer mapping model
Fig. 2 The process frame of collaborative composition
The resources structure of this framework can be logically divided into three layers, shown in Fig. 1. The top layer is about the abstract process logic layer, which constructs the macro structure of service composition by high level modeling tool of COSIM [4] and describes the timing and control relationship between nodes in the workflow. This layer is only concerned with how to make full use of service resources and reorganize business processes regardless of whether different departments get involved in the process. The service register center at the second layer provides a platform for service registration and discovery. All the services registered by different departments are described semantically with OWL-S (OWL-based Web Service Ontology) [5]. The unified semantic description shields the differences of service implementation between different departments or different platforms, and reduces coupling degree between abstract business processes and specific web services. It will provide powerfully support for automatic service discovery and composition. The specific services at the bottom layer are the final executors in the business process model, and they are bound statically with OWL-S service descriptions. Based on the three-layer services mapping model above, Fig .2 shows the process frame of human-computer collaborative service composition. That is, composition engine at runtime matches the process templates with the composition program user makes, and then matches the abstract business process description semantically with semantic web services in the service register center. Meanwhile, the user may cooperate with computer in making dynamic matches for certain nodes, so that it is more accurate and easier to find the basic services with complementary functions and matched interfaces. The user can also manually construct abstract business processes templates according to composition requirements. The composition engine automatically generates all necessary nodes of the process to satisfy customers or part of the process. On this basis, the user may repeat adjustments according to his or her preferences until each node in the workflow finds the right service. The program automatically binds the specific semantic service to each node in the abstract business process finally. This mechanism can promote the transformation from manual service composition to semi-automatic service composition and improve the success rate and efficiency. Next, we will analyze some key technologies in the framework.
ServiceCenter 6.2 Web Client CTI 教程说明书
ServiceCenter® 6.2 Web Client Computer Telephony Integration (CTI)Using Telephony on the ServiceCenter 6.2 Web Tier ClientHP® OpenView® IT Service ManagementIntroduction (2)Web browser requirements for CTI (2)Preparing a Web client for CTI (2)Installing a compatible JRE® (2)Installing the CTI applet (2)Using the telephony Web client (3)Configuring the CTI application (3)Accessing CTI from the Web client (3)Taking a call with the telephony Web client (4)For more information (5)IntroductionAs of ServiceCenter 6.2 the Web client can support connections from Computer Telephony Integration (CTI) applications. The Web client CTI implementation uses the ServiceCenter Event Services application to open or update records.Web browser requirements for CTIIn order to use CTI with the Web client, the following settings and options must be enabled:• Enable cookies• Enable Java®• Enable JavaScript®•Enable pop-ups. You can add the ServiceCenter server URL to the pop-up exception list.Preparing a Web client for CTITo run CTI on a Web client you must complete the following steps:1. Install a compatible Java Runtime Environment (JRE®). See the HP OpenView ServiceCenter Installation Guide for version 6.2, in the section “Installing a compatible JDK®.” Or refer to the ServiceCenter 6.2 online help.2. Install the CTI applet. See the HP OpenView ServiceCenter Installation Guide for version 6.2, in the section “Installing the CIT applet. Or refer to the ServiceCenter 6.2 online help.Installing a compatible JRE®You must install a Java Runtime Environment (JRE) on each Web client system to run the CTI applet. See you Web browser documentation to determine a compatible version of the JRE.Operating system Java component to installWindows XP One of the following:•Microsoft® Java Virtual Machine (JVM) plugin•Sun Microsystems Java Runtime Environment (JRE)version 1.4.2 or greaterOther operating systems •Sun Microsystems Java Runtime Environment (JRE)version 1.4.2 or greaterThe following instructions are for installing the Sun Microosystems J2SE 1.4.2 JRE, which you can use with Internet Explorer or Mozilla:® Java Web site at /j2se/1.4.2/download.html.1. Go to the Sun Microsystems2. Click Download J2SE JRE.3. Accept the license agreement.4. Navigate to the correct link for your operating system (such as Windows®) and download the most recent JRE.Installing the CTI appletYou must perform a one-time installation of the CTI applet on each Web client system so that the Web client can accept ServiceCenter system events from a CTI application. To install a CTI applet, follow these steps:1. Log on to the Web client system with a local administrator account.Important: The applet installation requires a local administrator account.2. Close all other ServiceCenter clients and Web browser windows.3. Open a Web browser and navigate to the telephony Web Tier URL:http://<server >:<port >/sc/index.do?telephonyuser=1ier, and <port > is theommunications port number used to connect to the Web Tier.4. m has a properly installed JRE, then the Web browser prompts the user to stall the CTI applet:Where <server > is the name of the Web server running the Web T cIf the Web client syste inrowser to accept the applet (for example, Run or OK ). 6. Close and restart the Web browser.ent requires a CTI application and configuring the Event Services application events, an administrator must configure the CTI application rvice portions of ServiceCenter.• he address for the standard telephony Web client is:ttp://<server >:<port >/sc/index.do?telephonyuser=1 5. Click the appropriate action on your b Using the telephony Web clientThe telephony Web cli within ServiceCenter.Configuring the CTI applicationIn order for the Web client to accept CTI to submit proper ServiceCenter events.Accessing CTI from the Web clientYou can use the following URLs to access the telephony portions of the Web client.Note : The telephony applet does not apply to the self-se T h• he address for the accessible telephony Web client is:ttp://<server >:<port >/sc/accessible.do?telephonyuser=1T hier, and <port > is theommunications port number used to connect to the Web Tier.d list mode and the classic menu, which do not conform toaccessibility requirements.fault 0). See your Web server documentation for instructions on setting theWhere <server > is the name of the Web server running the Web T cThis address turns off recor Tip : You do not need to specify the communications port in the Web Tier URL if you use the de Web server port (port 8communications port.Web clientlephony Web client prompts the user to save Taking a call with the telephony When an event comes from a CTI application, the te their current work:he user should save their current work and then click Yes to receive the incoming call (or other vent)T eFor more informationPlease visit the HP OpenView support web site at:/managementsoftware/supportThis web site provides contact information and details about the products, services, and supportthat HP OpenView offers.HP OpenView online software support provides customer self-solve capabilities. It provides a fastand efficient way to access interactive technical support tools needed to manage your business. Asa valuable support customer, you can benefit by being able to:•Search for knowledge documents of interest•Submit and track progress on support cases•Submit enhancement requests online•Download software patches•Manage a support contract•Look up HP support contacts•Review information about available services•Enter discussions with other software customers•Research and register for software trainingNote: Most of the support areas require that you register as an HP Passport user and sign in. Manyalso require an active support contract.To find more information about support access levels, go to the following URL:/managementsoftware/access_levelTo register for an HP Passport ID, go to the following URL:/passport-registration.html© 2006 Hewlett-Packard Development Company, L.P. The information contained herein issubject to change without notice. The only warranties for HP products and services are setforth in the express warranty statements accompanying such products and services. Nothingherein should be construed as constituting an additional warranty. HP shall not be liable fortechnical or editorial errors or omissions contained herein.HP, OpenView, and ServiceCenter are registered trademarks of Hewlett-PackardDevelopment Company, L.P. Sun, Java, JDK, JRE, and JavaScript are registeredtrademarks of Sun Microsystems, Inc. Microsoft and Windows are registered trademarks ofMicrosoft Corporation in the United States, other countries, or both.12/2006。
基于SAP NETWEAVER创建并调用WEB SERVICE
基于SAP NETWEAVER创建并调用WEB SERVICE1创建一个WEB SERVICE本文档中的操作过程是在XI上完成的。
用一个可远程调用的Function Module创建WEB SERVICE有两种办法:1.1方法一1.进入Object Navigator(事务码SE80),选择任意一个包,在包名上点击右键,选择弹出菜单中的Create->Enterprise Service/Web Service->Web Service。
启动服务定义向导对话框。
2.点击Continue进入下一步。
3.在Service Definition中填入Web Service的名称,Short Text中填入简要说明,Endpoint Type中可以选择BAPI、Function Group、Function Module和Message Interface四种类型,本例中是以Function Module为例来创建Web Service的,所以Endpoint Type中选择Function Module。
完成后点击Continue继续。
程调用的Function Module是不能创建成Web Service的。
完成后点击Continue继续。
5.选择Web Service的安全设置,有两种设置可供选择:Basic Auth SOAP Profile:基于SOAP 1.1的无状态HTTP信息和简单验证。
Secure SOAP Profile:基于SOAP 1.1的无状态HTTP信息,强验证和传输保护。
本例中选择第一种方式。
将Release Services for Runtime勾上可以在创建Web Service的同时将其发布至SOAP Runtime。
如果现在不发布也可以在创建好Web Service并保存以后在事务WSCONFIG中发布。
6.点击Complete完成向导。
7.填入一个包名,创建好的Web Service将存放于此包下,点击按钮保存。
MyEclipse 开发Web Service步骤
MyEclipse 开发Web Service步骤一、创建web service服务:1.新建一个web项目.2.在项目中增加Web Services capabilities.所有的操作都按默认即可(前两个步骤也可以通过直接选择新建web service项目,其他选项同上,如下图)LoginService接口:代码如下:LoginService.javapackage service;/*** 登录验证服务的接口* @author Administrator**/public interface LoginService {/*** 登录验证的方法* @param name* @param pass* @return*/public boolean checkLogin (String name, String pass); }LoginServiceImpl接口实现类:LoginServiceImpl.javapackage service.impl;import service.LoginService;public class LoginServiceImpl implements LoginService {/* (non-Javadoc)* @see service.LoginService#checkLogin(ng.String, ng.String) */public boolean checkLogin(String name, String pass) {if(name.equals("accp") && pass.equals("accp")){return true;}else{return false;}}}4.新建一个web Service填写一个Web Service name 并选择先前创建的接口&实现类,单击finish完成。
postgresql的webservice服务的基本要求
postgresql的webservice服务的基本要求下载温馨提示:该文档是我店铺精心编制而成,希望大家下载以后,能够帮助大家解决实际的问题。
文档下载后可定制随意修改,请根据实际需要进行相应的调整和使用,谢谢!并且,本店铺为大家提供各种各样类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,如想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by the editor. I hope that after you download them, they can help you solve practical problems. The document can be customized and modified after downloading, please adjust and use it according to actual needs, thank you!In addition, our shop provides you with various types of practical materials, such as educational essays, diary appreciation, sentence excerpts, ancient poems, classic articles, topic composition, work summary, word parsing, copy excerpts, other materials and so on, want to know different data formats and writing methods, please pay attention!PostgreSQL 是一个功能强大的开源关系型数据库管理系统,它具有广泛的应用领域,从企业级应用到个人项目都有广泛的应用。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Modelling Web Service Composition Using Reo Coordination LanguageSohail SaifipoorMember of Young Researchers Club,Department of Computer Engineering, Islamic Azad University, Najafabad branch, Isfahan, Iran saifipoor@iaun.ac.irBehrouz Tork Ladani, Naser NematbakhshDepartment of Computer Engineering, University of Isfahan, Isfahan, Iran{ladani ,nemat}@eng.ui.ac.irAbstract Web services are emerging technology for distributed computing and E-business interactions. A Web service represents a unit of business logic that an organization exposes on the World Wide Web. The next idea in Web service technology is the composition of Web services into complex ones and it has received much interest to support business-to-business applications. The current Web service composition approaches have been introduced by business process modelling communities and often lack a theoretical and formal basis. This fundamental drawback sometimes results in difficulties in long running real world Web service composition. In this paper we are going to propose two models for Web service composition based on Reo coordination language. Reo is a channel-based exogenous coordination language which has a formal basis and supports loose coupling, distribution, dynamic reconfiguration and mobility. We first introduce Reo and then propose two models based on Reo. The first model focuses on Web service orchestration and the second model introduces a novel service oriented Reo middleware. We also discuss pros and cons of the proposed models.Keywords Reo coordination language, Web service composition, formal methods1 INTRODUCTIONWeb services are defined as self-contained, modular units of application logic which provide business functionality to other application via Internet connection [15]. They enable dynamic connection and automation of business process for enterprise application integration and B2B integration. This reflects the need for explicit modelling of long-running interaction and complex dependencies among different Web services to fulfil the business requirements. The Web service composition serves this need and fulfils the complexity of business processes execution. Several organizations and business process modelling communities have proposed different Web service composition models and specifications. The absence of formal semantic in these models is the source of major problems. Some well-know problems related to Web service composition are how to verify the correctness and how to express the composition in a formal and expressive specification [16]. Recently several formal models have emerged which help designers to verify the correctness of Web services and their compositions [17, 12, 13, 19].In this paper we are going to use Reo coordination language [2] to compose Web services. Reo is a formal channel-based coordination language and presents composition of software components based on notation of channels. Reo enables designers to build complex coordinators, called connectors(circuits) out of simpler ones. The simplest connectors in Reo are a set of channels with well defined behaviors. Each channel has its own precise specification and behaviour. Reo specification can be implemented and executed in a Reo middleware. There are a number of middlewares for executing Reo circuits such as ReoLite [9] and Mocha [4]. Due to its formal basis and visual expressiveness, Reo can be used to define the coordination of Web services.In this paper we are going to introduce two models for composing Web services using Reo coordination language. The first model is based on a predefined Reo circuit. The coordination patterns are presented by Reo circuit and executed in a central Reo middleware. In this model, referred as Central Orchestration model, we present a central Reo coordination middleware for managing and modelling Web service composition. The proposed structure which is derived from [5] consists of a central Reo middleware and a number of adapters. The central Reo middleware executes a Reo circuit which represents a coordination pattern. We also introduce two types of adapters which handle datatransfers between Web services. We use BPEL4WS coordination patterns to define Reo circuits. We can consider this model as a Web service orchestration framework.In the second model, referred as Distributed Service Oriented Reo Middleware,we present a novel Reo service oriented middleware. In this middleware, special Web services manage Reo channels and expose valid operations to external users (Web services). In contrast with the first model, Web services are aware of Reo channels and their operations.The structure of the paper is organized as follows. Section 2 describes the impact of formal methods on Web service composition. Section 3 outlines Reo coordination language and its properties. Section 4 makes a discussion on using Reo for Web service composition and compares Reo with other formal and informal specification techniques. In section 5 we propose two models for Web service composition based on Reo and in section 6 we discuss and compare the proposed models and finally we present conclusion in section 7.2 WEB SERVICE COMPOSITION AND FORMAL METHODSWeb services are computational entities that are autonomous and heterogeneous (e.g. running on different platforms or owned by different organizations). Web services are described using appropriate Web service description languages, published and discovered according to predefined protocols [16]. A Web service has a specific task to perform and may depend on the other Web services, hence being composite.The composition of two or more Web services generates a new Web service which provides a collaborative behaviour for carrying out a new task. Web service composition can be static or dynamic. In static composition, Web services interact with each other on a pre-defined manner but in dynamic composition Web services discover each other, interact and negotiate on the fly [16]. There are two approaches in static composition. In the first approach, referred as orchestration, Web services collaboration is coordinated by a coordinator which is a Web service. In the second approach, referred as choreography, there is no central coordinator but rather tasks are defined by specifying the interaction that should be undertaken by each participant Web service [14]. There are several orchestration languages such as BPEL4WS, BPML and some for choreography like WSCDL. These languages are usually defined and standardized by business process modelling communities and lack a theoretical basis. This raises a number of challenges such as the need for guaranteeing the correct interaction of independent Web services. Consistency, completeness and deadlock free status are other issues which must be taken into consideration when a real world long-running Web service interaction is used. There are some cases in current standard Web service composition specification languages like BPEL4WS which address the ambiguity, inconsistency and incompleteness [18].It is for the above reasons that formal methods should be used. Recently a variety of concrete proposals have emerged to formally describe, compose and verify Web services. The majority of these are based on state-action models (e.g. labelled transition systems, timed automata, and Petri nets) or process models (e.g. π-calculus and other calculi) [16]. The formal methods can help to verify whether a Web service matches its requirements and works correctly or not. They also help to find whether two Web services are equal or not [14].Most of the proposed techniques are used to verify the other informal specifications like BPEL4WS specifications and are not used directly in specification process. On the other hand, there is no Web service composition specification language with a strong formal basis and expressive visual notation to help designers in definition and verification process. The mentioned drawbacks in current Web service composition specification led us to introduce a number of models for Web service composition using Reo coordination language.3 REO COORDINATION LANGUAGEReo is a channel-based coordination language which has a strong formal basis and promotes loose coupling, distribution, mobility, exogenous coordination and dynamic reconfiguration of coordination pattern [5]. Reo enforces a model that defines how designers can build complex coordinators, called connectors out of simpler ones [2]. The simplest connectors in Reo are a set of channels with well defined behaviors supplied by the users. A channel has precisely two channel ends. There are two types of channel ends: sink and source. A sink channel end dispenses data out of its channel and a source channel end accepts data into its channel [2].The semantic of a Reo connector is defined by the composition of the semantics of its channels and nodes. Users define the semantics of channels and Reo defines the semantics of nodes. Arbab has defined a set of complete channel types in [2], namely Sync, Filter, SyncDrain, LossySync, and FIFO-1. Reo provides a comprehensive visual notation for its channels. Figure 1 shows the visual notation for some primitive Reo channels.Reo also has a formal semantic, based on coinductive calculus of flow [8] [1] and on constraint automata [3]. It also has a formal operational semantic that defines the rule for computing connectors in a distributed computing environment [6].Figure 1. Reo primitive channelsReo provides two types of operations: topological – ones that allow manipulation of connector topology and IO – ones that allow input/output of data. Reo enables components to connect and perform I/O on the connector, namely read, take and write [2]. Topological operations are join and split; because of space limitation we do not explain them here.Each connector in Reo imposes a special coordination pattern on the entities (e.g., components) that perform I/O operations through that connector without the knowledge of those entities [2]. Some of Reo connectors represent coordination patterns that are usually used in Web service composition specifications, for example Reo Barrier Synchronizer connector which is presented in [2], can define a parallel pattern, and Sequencer connector [2] can be used to model a sequence in a process flow. Figure 2 shows three Reo connectors. These connectors can be trivially extended to handle any number of pairs. As Reo is based on channels, users can define their own connectors out of simple channels to handle any coordination pattern.Figure 2.Reo Connectors (a) Barrier Synchronizer (b) Sequencer (c) ReplicatorIn Figure 2.a we have illustrated a barrier synchronization connector. Here, the SyncDrain channel ef ensures that a data item passes from ab to cd only simultaneously with the passing of a data item from gh to ij (and vice versa). If the four channels ab, cd, gh, and ij are all of type Sync, our connector directly synchronizes write/take pairs on the pairs of channels a and d, and g and j [2]. In [2] Arbab has presented several connectors with full description of their mechanisms.4 WHY WEB SERVICE COMPOSITION USING REO?As we mentioned in Section 2, some formal methods have been introduced for verification of Web service composition. In contrast with these formal techniques which are used in verifying the composition correctness, Reo satisfies specification and simulation needs besides the verification. In [7] Arbab et al. introduced the specification, simulation and verification of Reo connectors’ behaviour. Also recent work on comparing Reo and Petri nets shows that one can relatively easy transform existing Petri net to Reo circuits, while the opposite proves to be difficult [20]. Petri net and other related models can be viewed as specialized channel-based models that incorporate certain specific primitive coordination constructs [20]. These properties of Reo shows its verification and specification ability in defining the coordination of Web services.In comparison with current Web service composition languages like BPEL4WS and WSCDL, Reo provides dynamic reconfiguration of the coordination pattern at runtime and a comprehensive visual notation. Dynamic reconfiguration of coordination pattern helps designers to fulfil non-functional requirements at runtime. Furthermore visual notation makes the coordination pattern more understandable. Also Reo channel-based structure enables designers to define their own channels and coordination patterns out of simple channels according to their requirements. This property results in extensibility and scalability of the coordination specification. This property is not supported in current composition languages and they are usually restricted to a subset of process flows and coordination patterns and designing new and complex coordination patterns in these languages is a challenging task.In this way, the inherently dynamic topology of connectors and Reo formal background and very liberal notation of channels make Reo more general and hence more powerful in definition and verification of coordination specification.5 MODELLING WEB SERVICE COMOSITION USING REOIn this section we are going to introduce two models for composing Web services using Reo coordination language. The base idea in the first model, which is called Central Orchestration model, is derived from [5]. We have extended the idea and expressed Web service composition processes by Reo circuits. The second model introduces a new service oriented Reo middleware which can be used to compose Web services. In the following subsections we introduce and discuss the models.5.1 Central Orchestration ModelThe Central Orchestration model introduces an orchestration structure for composing Web services using Reo coordination middleware. In this model Reo circuits are used to define a coordination pattern and these circuits are managed by a Reo coordination middleware. Figure 3 shows the structure of the Central Orchestration model.Figure 3.Central Orchestration ModelThis model consists of a central Reo coordination middleware (not distributed) and two types of adapters. The Reo middleware is a structure with circuits and Web service proxy components and is responsible for managing the circuits’ process. Web service proxy components manage the channel end operations and communicate with adapters to send and receive requests through channels. The adapters are responsible for managing external requests and transferring Web service proxy component requests to external Web services. We have used two types of adapters, Provider Adapter and Requester Adapter. Requester Adapter is a Web service which provides operations for external Web services. The operation calls on Requester Adapter are mapped to Web service proxy components and consequently they do write or take operations on their channel ends. Provider Adapter sends the Web service proxy components responses to external Web services.The main advantage of this model is that, Web services are not aware of the Reo circuits and Web services can be coordinated by a predefined circuit. Due to Reo channel-based structure, the circuits can be extended to manage more complex coordination patterns. Example1) Simple Sync Channel: Figure 4 shows a simple sync channel in this model. As illustrated in Figure 4, the Requester Adapter is a Web service which has a “Save(x)” operation and external users (or Web services) can call it. This call is transferred to Web service proxy component Comp1. Comp1 makes a write operation call on the source end of the channel and as Comp2 is suspended, any write operation by Comp1, lets the data be passed through the channel. At this time Comp2, calls an operation on Provider Adapter and the adapter calls the related operation such as “SaveData(z)” on the external Web service.Figure 4.A sync channel in Central Orchestration modelNow we try to define the composition process by Reo circuits and map operation calls and their parameters to channels. The steps in this model are as the followings: (1) Defining the coordination process by Reo circuits (2) Defining the interactions between Web service proxy components and Web services.Because of simplicity, we have chosen BPEL4WS coordination patterns to construct Reo circuits. The basic idea behind this process is to use the concept of each BPEL4WS pattern and define its corresponding Reo connector. Then subsequent receives and invokes in BPEL4WS process are mapped to a simple sync channel or a syncdrain channel. This approach is a modular one in which we can construct a complex coordination pattern out of simpler ones. Figure 5 shows a number of patterns in BPEL4WS and their corresponding Reo circuits. The selected BPEL4WS process patterns are sequence, parallel and invoke-receive flow. The patterns are mapped to Reo circuits and will be used by Reo coordination middleware to orchestrate Web services. Reo is a coordination model and has very little to say about the computational entities and the data in coordination process. Due to this property of Reo, there is no data in circuits of Figure 5. We propose a data passing mechanism based on channels and map the operations and their parameters to channel end operations. By considering the orchestration process as a sequence of operations, we can define a sequencer circuit to handle the process flow. Mapping operations and their messages is illustrated through the following example.Figure 5.BPEL4WS flow patterns and their corresponding Reo circuitsExample2) BPEL4WS Sequencer Circuit: Assume a composition process in which a request should be sent to two Web services and the data should be saved in those services sequentially. Figure 6 shows the process in BPLE4WS and its corresponding Reo circuit. In this figure, the sequential operation calls are mapped to a Reo sequencer circuit and the parameters are passed through a separate replicator connector. Using a separate channel for transferring parameters is feasible but when multiple parameters with different formats are used, we need to define a comprehensive protocol for transferring parameters on channels.Figure 6.A simple sequence flow in BPEL4WS and its corresponding Reo circuitAfter defining the circuit, now we are going to connect the channel ends to components and make connections between Web service proxy components and Web services. We use the proposed middleware structure to complete this phase. As illustrated in Figure 7, the Requester Adapter is a Web service which provides operations for external Web services and maps requests to components. Components are responsible for managing channel ends and communicating with adapters. They also do channel end operations for receiving and sending data through channels.This model is scalable enough to handle more Web services and we can extend the circuits to manage more Web services. Besides these advantages, defining components responsibility to manage parameters and operation calls needs a flexible approach which must be taken into consideration.Figure 7.Sequence circuit and Web service proxy components in Central Orchestration model5.2 Distributed Service Oriented Reo MiddlewareIn previous model, the Reo coordination middleware was considered to be central and responsible for managing the Reo circuits. In this section we introduce another model for composing Web services by Reo which is based on a service oriented distributed Reo middleware. Reo middlewares such as ReoLite [9] are based on local components and channels. On the other hand, Mocha [4] as a distributed Reo middleware does not support service oriented structure. A service oriented model helps to coordinate any software components and can be used to compose Web services too.In this model, channels ends and their operations are managed by Web services and channels are not centralized in a local site. This structure can use the potentials of all available distributed sites’ resources and hence manages the composition efficiently. In this model Web services provide channels and related operations on channel ends and communicate directly through channels to manage the coordination process.We have two different Web services in this model: (1) Web services which contain single channel ends (Channel End Web service) (2) Web services which contain Reo Mixed nodes (Mixed Node Web service). Figure 8 shows the proposed Web services. The Channel End Web service in Figure 8 provides a simple Reo sync channel and the Mixed Node Web service provides a Reo replicator connector. Each Channel End Web service provides Reo channel operations and exposes a WSDL interface for operations on its channel ends, so the external components can call them and request for operations on channel ends. A Mixed node Web service manages a Reo mixed node. Reo mixed nodes consist of different channel ends. A Mixed Node Web service plays two roles: handling external Web service requests on channel ends and communicating with Web services which hold the other end of channels.In this middleware, Web services expose their operations through WSDL interfaces and they need to be aware of Reo channel operations. In Figure 9 a Channel End Web service and its WSDL interface is shown.Figure 8.Two types of Web services in service oriented Reo middleware (a) Channel End Web service (b) Mixed Node Web serviceFigure 9.Channel End Web services in distributed service oriented Reo middleware modelThis model needs a structure for channel ends and a protocol for Web services to manage the channel ends operations. The main advantage of this model is its independence from requesting components and its ability for supporting reconfiguration at runtime but designing more complicated connectors in this model raises a number of challenges like any distributed model. In this model by providing reconfiguration operations for Reo middleware Web services, the model can be extended to support topological reconfiguration. By dynamic reconfiguration we can change the coordination pattern to fulfil non-functional requirements such as cost and performance at runtime.6 DISCUSSION AND COMPARISONIn this section we discuss and compare the properties of the proposed models according to some generally accepted Web service composition requirements:1.Non-functional properties: In the proposed models dynamic reconfigurationcan be considered as a mechanism to fulfill non-functional requirements.Changing the topology of connectors at runtime in distributed service oriented Reo middleware, helps designers to serve non-functional Quality of Services (QoS) properties, such as performance and cost, but in the first model, due to its central circuit structures, this functionality does not provide remarkable benefits.position correctness: In the first model, as Reo circuits are located in acentral middleware and defined prior to execution, verifying its correctness is possible. In contrast with the first model, the distributed service oriented Reo middleware model consists of a set of channels which are all distributed among Web services, hence checking the correctness of the circuit is a challenging task and requires more consideration.posite scalability: This composition requirement is supported in Reo by itschannel-based structure. In the first model as the Reo circuits are central; they can be extended to handle more services. For example a simple Barrier Synchronizer connector in Reo which represents the parallel coordination pattern can be extended to handle any number of pairs.4.Tool support for execution and verification: Any composition approach mustbe supported by software tools. These software tools usually provide implementation, verification and execution. For the first model, ReoLite [9] can be used as a central middleware to run Reo circuits but there is not any implemented middleware available for the distributed service oriented Reo middleware model. We also can verify the Reo circuits in the first model by proposed tools in [10] and [11] which are based on constraint automata.5.Process modeling construct support: Reo channels provide a comprehensivemechanism to design any coordination pattern out of simpler ones. In the first model as the Reo circuits are central, designing any coordination pattern is possible but in the distributed service oriented Reo middleware model, because of its distributed structure, providing complex patterns is a challenging task.6.Graphical notation: Composition languages are expected to have a visualnotation for expressing the coordination process. The visual notation should be independent from software components and the type of data which is used in the coordination process. It also must be expressive enough to be mapped to anexecutable code. Reo visual notation serves these requirements and provides an understandable notation which can be mapped to an executable code.In Table 1, we have compared the proposed models with respect to the above requirements.Table paring Web service composition requirementsCentral OrchestrationModelService OrientedDistributed Reo Middleware ModelNon-functional Properties √Dynamic Reconfiguration √Composition Correctness √Composition Scalability √Tool Support (Verification) √Tool Support (Execution) √Formal Semantic & Expressiveness √√Process modeling construct support √√Graphical Notation √√7 CONCLUSIONIn this paper we proposed two models for composing Web services based on Reo coordination language. Reo as a channel-based coordination language not only provides a formal specification but also has a visual notation and implementation. The formal basis of Reo, guarantees the possibility of checking and verifying the coordination process and its channel-based structure lets designers to define complex coordination patterns. In the first model, referred as Central Orchestration model, we defined Web service composition processes by Reo circuits. The second model was a distributed service oriented Reo middleware which could be used to compose Web services. The main properties of the first model are scalability and its central circuits which represent an orchestration framework; on the other hand, the second model is a service oriented Reo middleware which can fulfill non-functional requirements through reconfiguration operations. In future work, we are going to define more process patterns by Reo circuits, especially complex ones and those which can not be modeled by available coordination specifications.REFERENCES1.Arbab F. (2003),’Abstract Behavior Types: A foundation model for components and their composition’.In Proceedings of the First International Symposium on Formal Models for Components and Objects (FMCO 2002), LNCS 2852, 2003, pp.33-70.2.Arbab F. (2004), ’Reo: A channel-based coordination model for component composition’. MathematicalStructures in Computer Science, 14(3), 2004, pp.1–38.3.Arbab F., Baier C., Rutten J.J.M.M. and Sirjani M. (2004), ‘Modeling component connectors in Reo byconstraint automata’. Electronic note in Theoretical Computer Science, vol.97, No.22, July, 2004.pp. 25-46.4.Arbab F., deBoer F.S., Bonsangue M.M. and Guillen-Scholten J.V. (2002), ‘MoCha: a middleware basedon mobile channels’. In Proceedings of 26th International Computer Software and Application Conference (COMPSAC02) IEEE Computer Society Press, 2002.5.Arbab F. and Diakov N. (2004), ‘Compositional construction of Web services using Reo’.InProceedings International Workshop on Web Services: Modeling, Architecture and Infrastructure (ICEIS 2004), Porto, Portugal, April 13-14, 2004.6.Arbab F., Everaars C.T.H., De Oliveira Costa D.F., Diakov N.K. (2006),’A distributed computationalmodel for Reo’. Technical Report, REPORT SEN-E0601, CWI, the Netherlands, February 2006.7.Arbab F., Mousavi M. R. and Sirjani M. (2004),’Specification and verification of componentconnectors’. Technical Report CSR-04-15, Eindhoven University of Technology, 2004.8.Arbab F. and Rutten J.J.M.M. (2003), ‘A coinductive calculus of component connectors’. In Processingof 16th International Workshop on Algebraic Development Techniques (WADT 2002), Lecture Notes in Computer Science 2755, Springer, 2003, pp.35-56.9.Clarke D., ReoLite: Reo coordination engine, CWI, the Netherlands; available at:http://homepages.cwi.nl/~dave/reolite/(Jan 2006).10.Ghadiri A. (2004),’A Tool for Constraint Automata Join’. BS project, Technical report, ECE DepartmentUniversity of Tehran, Iran, 2004.11.Ghassemi F. and Tasharofi S. (2005), ‘A Tool for Converting Reo Circuit to Constraint Automaton’. BSproject, Technical report, ECE Department University of Tehran, Iran, 2005.12.Hamadi R. and Benatallah B. (2003), ‘A Petri net-based model for web service composition’. InProceedings of the 14th Australasian Database Conference, volume 17 of CRPITS, pages 191-200.13.Hinz S., Schmidt K., and Stahl C. (2005), ‘Transforming BPEL to Petri nets’. In Proceedings of the 3rdInternational Conference on Business Process Management, volume 2649 of Lecture Notes in Computer Science, pages 220-235, Nancy, France, September 2005.14.Koehler J., Tirenni G. and Kumaran S. (2002), ‘From business process model to consistentimplementation: a case study for formal verification methods. In Proceedings of the 6th International Enterprise Distributed Object Computing Conference, Lausanne, Switzerland, September 2002. IEEE.pp.96-106.15.Srivastava B. and Koehler J. (2003), ‘Web service composition - current solutions and open problems’, InProceedings of ICAPS'03 Workshop on Planning for Web Services, Trento, Italy, June, 2003.16.Ter Beek M.H., Bucchiarone A. and Gnesi S. (2006), ‘A Survey on Service Composition Approaches:From Industrial Standards to Formal Methods’. Technical Report 2006-TR-15, ISTI, Consiglio Nazionale delle Ricerche, 2006.17.Van der Aalst W.M.P.(2003),‘Challenges in business process management: Verification of businessprocesses using Petri nets’, Bulletin of the EATCS, 80:174-199, June 2003.18.Web Services Business Process Execution Language Technical Committee. WS BPEL issues list, (2006);available at: /external/WS_BPEL_issues_list.html (Jan 2006).19.Yang Y., Tan Q., and Xiao Y. (2005), ’verifying web services composition’. In Proceedings of the ER2005 Workshops, volume 3770 of Lecture Notes in Computer Science, pages 354-363, Klagenfurt, Austria, October 2005.20.Zlatev Z., Diakov N. and Pokraev S. (2004), ‘Construction of negotiation protocols for e-commerceapplications’, ACM, SIGecom Exchanges, 5(2), pp.12-22.。