Agent-Based Web Services for E-Business Dr. Larry Kerschberg Co-Director, E-Center for E-Business George Mason University, USA Tutorial Notes: WISE 2001, Kyoto, Japan 2001 © Larry Kerschberg.
Tutorial Outline • Agents and Agent-based Systems • E-Business Concepts • Web Services and Protocols • Semantic Web Services • Conclusions 2001 © Larry Kerschberg.
From Internet to X-Net 2001 © Larry Kerschberg.
Agents • Concepts of agents, facilitators, brokers, and integrators are familiar to us, • They provide a metaphor for human agents, • They are software programs that have specific goals and possess knowledge associated with their tasks, • They can interact with their environment and with other agents, • They can be mobile and communicate with other agents by sending messages in an Agent Communication Language. 2001 © Larry Kerschberg.
Agent Characteristics • Cooperation and negotiation. • Cooperate with both human agents and software agents. • Negotiate for goods, services and resources. • Mobility. • Agents may travel from site to site in a heterogeneous network! • Intelligence. • Agents may exhibit intelligence: reasoning about goals and intentions, use of domain knowledge, natural language processing, etc. 2001 © Larry Kerschberg.
Agent Characteristics • Agents should be endowed with: • Autonomy to make decisions based on their goals, beliefs and internal states, • Reactivity so that they may respond to events and actions, • Pro-activeness to take initiatives based on their goals and tasks, • Social ability to allow communication, negotiation and cooperation via some agent communication language. 2001 © Larry Kerschberg.
Agent Architectures • Mediated architectures • Brokers, mediators, wrappers, publish-subscribe mechanism for data push and pull. • Agents serve as active middleware in a client-server environment. • Multi-agent systems. • Intelligent agents with advanced capabilities such as team formation, agent-to-agent communication, joint beliefs, goals and plans. • Market-driven ensembles and swarms. • Market-view - parallel autonomous actions of rational individual agents will emerge into the collective behavior. • Swarm-view - agents adapt via evolutionary processes using AI techniques such as genetic programming and natural selection. 2001 © Larry Kerschberg.
Agent-based Mediated Negotiation 2001 © Larry Kerschberg.
Agents for Virtual Private Network Provisioning • Users wish to set up a VPN, • There are several Service Providers • There are several Network Providers 2001 © Larry Kerschberg.
Example: Virtual Private Network Provisioning 2001 © Larry Kerschberg.
Knowledge Rover Architecture • GMU DARPA Advanced Logistics Program. • Family of software agents with unique roles: • Line Agents • Coordinator Agent • User Agents • Facilitation Agents • Mediation Agents • Real-time Agents • Field Agents • Staff Agents • Knowledge Rovers • Active-View Agents • Information Curators 2001 © Larry Kerschberg.
Knowledge Rover Family • Coordinator Agent — coordinates the activities of a group of agents. It is informed of significant events. A significant event can lead to the activation of new agents. • User Agents — acts on behalf of a user, and is responsible for assisting users: • 1) in browsing catalogs and information holdings, • 2) in the intelligent formulation of queries, and • 3) in the planning of tasks within a mission-specific scenario such as provisioning logistic support for a disaster relief effort. • Facilitation Agents — provide intelligent dictionary and object location services. For example a facilitation agent might accept a request from the Coordinator Agent to find all external providers of ‘antibiotics,’ and it might respond with the pharmaceutical producers and suppliers for the region in question. • Real-time Agents — are mission-specific, defined and configured to process incoming data, and update the appropriate database or notify the appropriate users. Real-time agents are responsible for monitoring the external environment, interacting with other systems, or acting on inputs from users. 2001 © Larry Kerschberg.
Knowledge Rover Family (continued) • Mediation Agents — are configured to assist in the integration of information from multiple data and information sources, having diverse data formats, different meanings, differing time units, and providing differing levels of information quality. Mediators are configured to accept queries from the Coordinator Agent, translate the queries into the query language of the appropriate database system, accept the retrieved result, integrate it with results from other sources, and return the information to the Coordinator Agent for presentation to the User Agent. • Field Agents — are specialized rovers that have expertise in a certain domain, for example, pharmaceuticals, and knowledge about domain-specific information holdings at one or more sites. For example, a field agent could be tasked to monitor all aspects of a single item, say an ‘antibiotic’ produced by several manufactures and distributed by several vendors. They negotiate with the local systems, retrieve appropriate data, and forward it to the appropriate requesting agent. 2001 © Larry Kerschberg.
Knowledge Rover Family (continued) • Knowledge Rovers — are instructed to carry out specific tasks on behalf of the Coordinator Agent, such as to identify which vendors have a specific item on hand. This would involve obtaining information from several vendors. The knowledge rover dispatches field agents to specific sites to get the relevant information. If the knowledge rover gets similar information from more than one source, it may ask a mediator resolve the inconsistency. • Active View Agents — are created to monitor real-time events from the environment or from databases, and to use these events to initiate actions that will result in the update and synchronization of objects in the Knowledge Repository and also in local views maintained at user workstations. • Information Curators — are responsible for the quality of information the Knowledge Repository. They assist in evolving the data and knowledge bases associated with enterprise information resources. They work with knowledge rovers to incorporate newly discovered resources into the information repositories. 2001 © Larry Kerschberg.
Mediated Agency Architecture 2001 © Larry Kerschberg.
E-Business Concepts 2001 © Larry Kerschberg.
The E-Enterprise Framework 2001 © Larry Kerschberg.
Enterprise Knowledge Creation and Distribution • Acquire data and information from multiple, possibly heterogeneous sources, • Integration of information, tagging of information with semantic tags, • Create intellectual property (IP) with valued-added processing, • Protect IP products, processes and resources, • Share knowledge with partners, • Distribute IP products to customers and partners. 2001 © Larry Kerschberg.
XML • eXtensible Markup Language • Provides standard format for tagging semi-structured information. • Meta-language for representing other languages. • Vocabularies for documents • XML Document Type Definitions (DTDs) • XML Schema is proposed as successors to DTDs. • Provides richer grammar for the structure of elements, • Provides data typing, • Provides inclusion and derivation definitions, so that data elements can be reused. • Resource Description Format (RDF) is a model to describe meta-data, data about data. 2001 © Larry Kerschberg.
E-Business Knowledge Creation KM XML 0101010101 0101010101 Generate Information Information Integration Indexing (XML Meta Tags) Process & Manage Information • Capture Information: • Federated Databases • Web Searching • Intelligent Agents • Knowledge Rovers • XML Messages • Email Messages Knowledge Management KM Convert To Knowledge Materialize • Extract New • Information: • Data Mining • Decision Support • AI • Data Warehousing Risk Management XML Public Domain & WWW Publish & Share Knowledge Base Push Publishing? XML Customers Security Concerns? RosettaNet SOAP WIDL ebXML XML Web Services XML Role Knowledge Management Role XML Suppliers & Business Partners KM E-Business Data Acquisition and Knowledge Creation with XML as the Enabler Courtesy of Mr. Gus Jabbour
Web Services 2001 © Larry Kerschberg.
Outline • Web Services Definition • Web Services versus Web Sites • Web Services Protocols and Standards • Conclusions 2001 © Larry Kerschberg.
Web Services • Web services are Internet-based applications that fulfill a specific task or set of tasks, which can be combined with other Web services to maintain workflow or perform business transactions. • Airline, hotel and rental car reservation process, • Loan approval process • Users access Web services online & offline via PCs, cell phones, Personal Digital Assistants. • Programs can also access Web services directly. 2001 © Larry Kerschberg.
Web Services (continued) • Web services communicate with each other: • Share information about their functions & roles in an application’s workflow, • Publish the inputs they require & outputs they generate, • The result is just-in-time integration of business applications. • Each self-contained business service becomes an application that will easily integrate with other services (from the same or different companies) to create a complete business process. 2001 © Larry Kerschberg.
Business Logic Business Logic Database Database Web Service Web Sites and Web Services Web Site HTTP Web Access User Interface Internet HTTP Computer Program SOAP Internet SOAP HTTP: Hypertext Transfer Protocol SOAP: Simple Object Access Protocol 2001 © Larry Kerschberg.
Business Logic Business Logic Business Logic Database Database Database Hotel Service Car Rental Service Airline Service Travel Web Service Portal Travel Portal Web Site HTTP Web Access User Interface Internet HTTP SOAP SOAP SOAP SOAP 2001 © Larry Kerschberg.
Web Services, XML and Metadata GetaLoan.com Internet Loan Insurance Company Delivery of Service = Approval Or Denial Delivery of Service = Credit Verification Online Loan Applicant Credit Reporting Service XML Server XML Server Delivery of Service = Loan approval & procurement Meta Data Universal Business Registry Delivery of Service = Loan insurance approval XML Documents XML Server XML Server Web Services Meta Repository (WSMR) Financial Institutions 2001 © Larry Kerschberg.
Web Service Standards • Simple Object Access Protocol (SOAP) • http://www.w3.org/TR/SOAP/ • Web Services Description Language (WSDL) • http://msdn.microsoft.com/xml/general/wsdl.asp • Universal Description, Discovery and Integration (UDDI) • http://www.uddi.org 2001 © Larry Kerschberg.
Simple Object Access Protocol (SOAP) • SOAP is an XML-based messaging framework • Designed to exchange data over the Internet • Can send request, reply messages or entire documents. • Neutral with respect to Operating System. • SOAP and XML provide a means for two or more portals, marketplaces or trading partners to agree on common data exchange services for “exposing” services to the Web for creating distributed the “virtual enterprise.” 2001 © Larry Kerschberg.
Discovering SOAP Services • Enterprise A uses URL provided by Enterprise B to get list of published services. • Enterprise A downloads the XML schemas (using WSDL) describing services message formats. • Enterprise A formats and sends XML message via SOAP to Enterprise B • Enterprise B responds via SOAP, which A interprets using XML Schema. 2001 © Larry Kerschberg.
SOAP Message Format • SOAP supports two basic XML message formats • Self-describing EAI (Enterprise Application Integration) and EDI (Electronic Data Interchange). • Remote procedure call (RPC) style interactions that model object method invocation and parameter passing. 2001 © Larry Kerschberg.
Envelope Marks the start and end of a SOAP message. Header (optional) Used to include RPC style interaction. Can contain no header or several headers. Body Contains the actual message or document being sent. SOAP message elements are defined using schemas and qualified using namespaces. Envelope Header Body SOAP Message Format 2001 © Larry Kerschberg.
SOAP Envelope • SOAP Envelope defines a framework for describing message contents and how to process it. • Rules for encoding the data transfer • Agree by downloading the same XML schema. • http://schemas.xmlsoap.org/soap/envelope/ • http://schemas.xmlsoap.org/soap/encoding/ 2001 © Larry Kerschberg.
SOAP Header • Each header must be defined within an associated XML schema, • Allow features such as security, transactions, and quality of service attributes to be specified. • Must be understood by both parties, • Allows consumers and publishers to negotiate agreement on support of a given header or a set of headers. 2001 © Larry Kerschberg.
SOAP Body • Contains application-defined XML data being exchanged in message. • Either a single, self-describing structure, or • Remote Procedure Call (RPC) interface with method name and typed parameters. • Next slide shows an example of a stock quote request and response. 2001 © Larry Kerschberg.
Request: <SOAP-ENV: Envelope> … <SOAP-ENV: Body> <m:GetLastTradePrice xmlns:m-”Some-URI”> <symbol>MSFT</symbol> </m: GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV: Envelope> Response: <SOAP-ENV: Envelope> … <SOAP-ENV: Body> <m:GetLastTradePriceResponse xmlns:m-”Some-URI”> <Price>63.00</Price> </m: GetLastTradePriceResponse> </SOAP-ENV:Body> </SOAP-ENV: Envelope> SOAP Example 2001 © Larry Kerschberg.
Web Services Description Language (WSDL) • WSDL is a form of XML Schema to define the XML message, operation and protocol mapping of a web service accessed using SOAP or another XML protocol. • WSDL defines Web services as “end points” that operate on XML messages. • Both the messages and the operations on the messages are defined abstractly and then mapped to multiple physical implementations. • Current mappings include SOAP 1.1, HTTP GET/POST and MIME. 2001 © Larry Kerschberg.
WSDL Specification Definition List • Proxy Code • A definition of message types and operations in the abstract, • Binding Information • A definition that maps the abstract definitions onto concrete transports and network end points. • Service Definition • A definition that maps bindings to ports and includes extensibility, e.g., attributes or properties for quality of service agreements. • Proxy code: • Message type • Abstract interface (port type) • Binding information: • Transport • Port • Service definition: • Binding/port • Extensibility 2001 © Larry Kerschberg.
IONA’s XML Bus Web Services • Dynamic WSDL Test Facility (several web services) • http://www.xmlbus.com:9010/WSDLClient/WSDLDynamicTestClient.html • WSDL Service Description • http://www.xmlbus.com:9010/xmlbus/container/Converter/ConverterService/ConverterPort 2001 © Larry Kerschberg.
Convert Inches to Millimeters • XML Query <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <m1:inchToMM xmlns:m1="urn:target-converter-service"> <param0 xsi:type="xsd:float">1.0</param0> </m1:inchToMM> </SOAP-ENV:Body> </SOAP-ENV:Envelope> • XML Response <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <m1:inchToMMResponse xmlns:m1="urn:target-converter-service"> <return xsi:type="xsd:float">25.4</return> </m1:inchToMMResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 2001 © Larry Kerschberg.
UDDI and the Protocol Stack 2001 © Larry Kerschberg.
UDDI - Universal Description, Discovery and Integration • Goal is to enable the interoperability of web services • Standards-based specifications for service description and discovery • Shared operation of a business registry on the web • Partnership among industry and business leaders 2001 © Larry Kerschberg.
4. Marketplaces, search engines, and business apps query the registry to discover services at other companies 2. 5. BusinessRegistrations Businesses populate the registry with descriptions of the services they support Business uses this data to facilitate easier integration with each other over the Web 3. UBR assigns a programmatically unique identifier to each service and business registration How UDDI v1 Works 1. SW companies, standards bodies, and programmers populate the registry with descriptions of different types of services UDDI BusinessRegistry Segrvice Type Reistrations 2001 © Larry Kerschberg.
Business Name Text Description list of multi-language text strings Contact info names, phone numbers, fax numbers, web sites… Known Identifiers list of identifiers that a business may be known by - DUNS, Thomas, other Business categories Three standard taxonomies in V1 Industry: NAICS (Industry codes - US Govt.) Product/Services: UN/SPSC (ECMA) Location: Geographical taxonomy White Pages Yellow Pages 2001 © Larry Kerschberg.
Green Pages • Businesses describe how other businesses will “do e-commerce”: • Nested model • Business processes • Service descriptions • Binding information • Programming/platform/implementation agnostic • Services can also be categorized 2001 © Larry Kerschberg.
Service Type Registration • Pointer to the namespace where service type is described • What programmers use to understand how to use the service • Identifier for who published the service • Identifier for the service type registration • called a tModelKey • Used as a signature by web sites that implement those services 2001 © Larry Kerschberg.
XML document Created by end-user company Can have multiple service listings Can have multiple taxonomy listings Contact Contact Phone Address Email Phone Address Email keyedReference keyedReference keyedReference keyedReference tModelKey keyName keyValue tModelKey keyName keyValue tModelKey keyName keyValue tModelKey keyName keyValue Business Registration businessEntity businessKey name URL description contacts businessServices identifierBag categoryBag businessService businessService serviceKey tModelKey Name Description BindingTemplates Key Name Description BindingTemplates From www.uddi.org 2001 © Larry Kerschberg.
Peter Smythe businessEntity 872-6891 4281 King’s Blvd, Sydney, NSW Peter@harbourmetals.co.au TB993… Harbour Metals www.harbourmetals.co.au “Serving Inner Sydney Harbour for … contacts businessServices identifierBag categoryBag businessService businessService 23T701e54683nf… Online catalog “Website where you can … BindingTemplates Key Name Description BindingTemplates BindingTemplate keyedReference keyedReference 5E2D412E5-44EE-… http://www.sydneynet/harbour… tModelInstanceDetails DFE-2B… DUNS 45231 EE123… NAICS 02417 tModelInstanceInfo 4453D6FC-223C-3ED0… http://www.rosetta.net/catalogPIP tModelKeys Example of a Registration From www.uddi.org 2001 © Larry Kerschberg.
UDDI and SOAP UDDI RegistryNode User UDDISOAP Request HTTPServer SOAPProcessor UDDISOAP Response UDDIRegistry Service B2B Directory Create, View, Update, and Deleteregistrations Implementation-neutral From www.uddi.org 2001 © Larry Kerschberg.
Inquiry API Find things find_business find_service find_binding find_tModel Get Details about things get_businessDetail get_serviceDetail get_bindingDetail get_tModelDetail Publishers API Save things save_business save_service save_binding save_tModel Delete things delete_business delete_service delete_binding delete_tModel security… get_authToken discard_authToken Registry APIs (SOAP Messages) From www.uddi.org 2001 © Larry Kerschberg.