Agents and Web Services ------SENG609.22 Tutorial 1 Dong Liu Abstract: The basics of web services are reviewed in this tutorial. Agents are compared to web services in many aspects, and the impacts of web services on agent technologies are discussed. The further development of agents integrated with web services is presented. 1. Introduction Web services is a technology and a phenomenon that has appeared and been getting more and more prosper. When you google web services, the first item appearing is from W3C (http://www.w3.org/2002/ws/). I would like to quote the first lines on that page The World Wide Web is more and more used for application to application communication. The programmatic interfaces made available are referred to as Web services. As a technology it is a set of protocols developed by W3C and a set of applications implemented by various venders such as Microsoft, IBM and etc. It is, as a phenomenon, an industry-wide realization that web services is an evolution trend for their products. The industry needs a flexible and efficient business collaboration environment to perform application to application communication. This tutorial will focus on the technological aspects of web services and what web services will bring related with agent-based systems and technologies. XML, UDDI, WSDL and SOAP as the basic technologies of web services are briefly discussed in second part of this tutorial. The third part is about the comparison of agents and web services, the relationship between them and their integration. Final is a conclusion. 2. Basics of Web Service 2.1 XML Now nearly all the persons working in IT have realized how great impacts XML has brought. The basis of basics of web services is XML, extensible Markup Language, a subset of Standard Generalized Markup Language (SGML). XML is not just markup, but more beyond that. XML is a very good practice of the software philosophy Separation of Concerns, because it makes the content and the presentation of information separate. It brings a revolution for the whole software world. We can see the impacts in three aspects: data, software architecture and software development shown as Figure 1. The technologies about XML can be classified into four groups: structure, presentation, manipulation and other.
XML structure: There are 2 popular technologies about XML structure: the first one is DTD (Document Type Definition), and the second is XSD (XML Schema definition language). Both of them are specified languages, but XSD use the same syntax as XML, which make it more powerful than DTD. To enforce the structure and element of an XML document, either a DTD file or an XML schema in XSD may be used. DTD comes from SGML. XSD is a W3C standard. We can expect that in the near future XML schema will become the dominate technology for XML structure, although DTD appeared earlier that it. XML presentation: The robustness of XML presentation is a key point of XML technology. CSS (Cascading Style Sheets) is designed for controlling the display properties of HTML or XML in Web browsers; XSL Figure 1. Revolution brought by XML [1] (extensible Stylesheet Language family), including XSLT (XSL Transform), XPath (XML Path Language) and XSL-FO (XSL Formatting Objects), is designed for presentation and transform of XML, XForms, a single device-independent XML form definition, can work with a variety of standard or proprietary user interfaces such as HTML, WML, etc; SVG (Scalable Vector Graphics) a language for describing twodimensional graphics and graphical applications in XML. There are other specifications and applications that related to XML presentation. XML manipulation: To transform or process XML, manipulation technologies are needed. XSLT is widely used to transform XML to other format; XPath defines a formal language to navigate and search the XML tree; XLink (XML Linking Language) is a technology for creating and describing links between resources and for enabling links that go beyond the simple unidirectional links of the current Web; XPointer (XML Pointer Language) is used as a fragment identifier for any URI-reference that locates a resource - 2 -
of Internet media type text/xml or application/xml; and XQuery (XML Query language) is a technology to extract data from real and virtual documents on the Web, therefore finally providing the needed interaction between the web world and the database world. Other technologies: XML Signature, XML Encryption, XML Security and so on are the technologies related to other concerns of XML. 2.2 UDDI The universal description, discovery, and integration (UDDI) registry is developed to supply a way to find and use the web services. It is established by an industry consortium to create and to implement a directory of Web services. UDDI began as collaboration among Microsoft, IBM, and Ariba to promote the adoption and use of Web services standards. Later some other companies joined into the group. A web service can be searched on all the UDDI registry nodes whenever it is registered on one company s registry node. UDDI information is often described as being divided into three main categories of business information: White Pages: Business name and address, contact information, Web site name, and Data Universal Numbering System (DUNS) or other identifying number. Yellow Pages: Type of business, location, and products, including various categorization taxonomies for geo-graphical location, industry type, business ID, and so on. Green Pages: Technical information about business services, such as how to interact with them, business process definitions, and so on. A pointer to the business's WSDL file, if any, would be placed here. Information in this category describes a service's features/functionality, including a unique ID for the service. This category is quite new and specific to the Internet. UDDI has two main use cases: registration and discovery. Businesses and individuals interact with UDDI using SOAP APIs to submit and retrieve information. UDDI registration information is comprised of the following five data structure types: businessentity, the top-level structure, describing the business or other entity for which information is being registered. The other structures are related via references from this structure. businessservice, the name and description of the service being published. bindingtemplate, information about the service, including an entry-point address for accessing the service. tmodel, a fingerprint, or collection of information uniquely identifying the service specification. This data structure also supports top-level searches. publisherassertion, a relationship structure putting into association two or more businessentity structures according to a specific type of relationship, such as subsidiary or department of. 2.3 WSDL The Web Services Definition Language provides a complex, full-function mechanism for defining interfaces to Web services. Interfaces can be defined as a collection of Web - 3 -
service operations supported at a given end point. WSDL, a specific type of XML schema, defines a language for expressing Web services interfaces in a way that commonly available XML software can understand and use. Designed for use with SOAP as the messaging transport, WSDL includes an attribute to specify whether a given interface supports the document-oriented or the RPC-oriented interaction style. WSDL is difficult to read and to understand, but Web service toolkits typically generate and consume WSDL files automatically. Interfaces from established distributed computing technologies, such as Java classes, JavaBeans, CORBA objects, Visual Basic classes, and C# classes, translate easily into WSDL, although they might not be defined at the level of granularity appropriate for Web services. WSDL contains a description of the data types and structures used in Web services messages, as well as information required for mapping the Web service definition onto an underlying execution environment. The three main parts of WSDL message types, operations, and bindings can be defined in separate documents and combined at execution time. By default, message types use XML schemas for data typing and structuring. Operations typically map to method or program names implementing the Web service. Bindings describe the protocols and transports used to send the data to the operation. 2.4 SOAP The Simple Object Access Protocol (SOAP) makes it possible for Web services to exchange data, no matter where they are located in the networked environment. SOAP is mapped to HTTP by default and inherits some qualities of service from its binding to the HTTP request/response protocol. SOAP is designed to be mapped to other underlying transport protocols, from which it might inherit other qualities of service. SOAP is an evolving specification, with ongoing activity at W3C's XML Protocols Working Group focused on producing a recommended version of the Figure 2. Overview of Web Services [1] specification. The designers of SOAP intended it to provide a simple, extensible mechanism for mapping to multiple types of messaging interactions and underlying software systems. SOAP is defined using XML Infoset, schemas, and namespaces, which identify and scope the elements for its major parts: envelope, header, and body. - 4 -
To summarize this part, let s see the overview of web services as Figure 2. 3. Agents vs. Web Service Since there are few references available about agents and web services, the points in this part are my personal opinions. In first section of this part, I compare the similar and different technical aspects of agents and web services. Then the impacts of web services on agents are discussed, and the third section is about integration of agents and web services. 3.1 Common and different aspects If we consider the web service providers and web service consumers as agents, web services just behaves as what we called multi-agent system. There are so many common aspects between agents and web services. I summarize the aspects related with implementation and architecture as follows. Directory Service. Agents need a directory facilitator to find the services of other agent. UDDI registry service helps the business or individual consumer to find the services. Communication Language. In agent-based system, the communication language needs to be defined to support the messaging between agents. XML and SOAP are used to access the services supplied by web service suppliers. Message transportation. Agents need to apply some protocols to communicate with each other. SOAP is specified as the protocol to interact with the web service providers. Ontology. In agent-based system, ontology is needed for knowledge sharing. WSDL is developed for web services to define the interface to web services. The message structure and elements are defined in XML schema in WSDL. Although there are so many common points, there are still differences between them. Equities of the elements. In agent-based system, most agents are at the same level of the system. However, in the scenario of web services, the relationship between service suppliers and consumers has a strong flavour of server-client that inherits from the web. Autonomous. Web services is far from the characteristics of autonomy. Mobil. Web services will never be mobile, while some agents are born-to-be mobile. Adaptive. Web services is not supposed to be adaptive. 3.2 Impacts on agent technologies As far as communication concerned, web services can finish all the tasks that agents are supposed to carry out. I am not sure if the developers have used the agent s ideas and technologies as reference when they develop the web service technologies. However, web services will never replace agents because of their difference. The impacts of web services on agents that I can consider now are as follows. Web services is a good model as reference to develop agent communication framework. - 5 -
In some cases of agent-based system development, web services can be used to implement some features of the system. Agent-based technologies will focus more on the features that agents should have, e.g. autonomy and intelligence. Then agents can act as a good extension of web services, which I will discuss more in detail in the next section. Agents will be powerful to help the legacy systems get or supply services, and integrate the pear-to-pear applications. 3.3 Agents integrated with web services Messaging is a key feature of both agents and web services, and it will be convenient to integrate agents and web services using messaging. The integration of agents and web services has two modes. One mode is that the agents act as a part of web services, and in this case the agents behavior is introduced into to web service domain. The other mode is that agents make use of the web services, and bring the information into agent domain. The advantages of integration are: Agents can supply services to now only other agents but also the web service consumers, either business or individual. Agents can get information from the large repository on the web in form of web services. The details about the messaging system are discussed in another tutorial. 4. Conclusion In this tutorial, the basics of web services are reviewed. The common and different aspects of agents and web services are discussed. Although they have many commons, they cannot replace each other because their characteristics. Agents can be integrated with web services to introduce more advantages to software. References [1] Frank P. Coyle, XML, Web Services, and the Data Revolution. Addison Wesley, 2002. [2] Gregor Hohpe, Bobby Woolf, Enterprise Integration Patterns : Designing, Building, and Deploying Messaging Solutions. Pearson Education; 2003. [3] Eric Newcomer, Understanding Web Services: XML, WSDL, SOAP, and UDDI. Addison-Wesley, (2002) [4] World Wide Web Consortium (W3C). http://www.w3.org/ - 6 -