Discovering E-Services Using UDDI in SELF-SERV Quan Z. Sheng, Boualem Benatallah, Rayan Stephan,...
-
Upload
ginger-adams -
Category
Documents
-
view
213 -
download
1
Transcript of Discovering E-Services Using UDDI in SELF-SERV Quan Z. Sheng, Boualem Benatallah, Rayan Stephan,...
Discovering E-Services Using Discovering E-Services Using UDDI in SELF-SERVUDDI in SELF-SERV
Quan Z. Sheng, Boualem Benatallah, Rayan Stephan, Quan Z. Sheng, Boualem Benatallah, Rayan Stephan,
Eileen Oi-Yan Mak, Yan Q. ZhuEileen Oi-Yan Mak, Yan Q. Zhu
School of Computer Science and Engineering
The University of New South Wales
Sydney, Australia
Beijing, 2002
Outline
• SELF-SERV overview
• Simple Object Access Protocol (SOAP)
• Web Service Description Language (WSDL)
• Universal Description, Discovery and Integration (UDDI)
• Service Discovery Engine in SELF-SERV
• Conclusion
Beijing, 2002
SELF-SERV overview
• SELF-SERV (compoSing wEb accessibLe inFormation & buSiness sERVices) is a framework for dynamic and peer-to-peer provisioning of Web services.
• SELF-SERV distinguishes three types of services: elementary services, composite services, and service communities.
• Composite service aggregates multiple Web service, based on statecharts.
• Service community is a powerful concepts for composing potential large number of dynamic services.
Beijing, 2002
SELF-SERV overview Architecture
Communication Bus
User Interface
Elementary Service Composite Service Service Community
UDDI Registry Service Manager
Beijing, 2002
SELF-SERV overview Architecture (cont.)
Service Manager
is registered with
service descriptions
Pool of Services Elementary
services
Communities
UDDIRegistry
Composite services
is composed of
Service Editor
Service Deployer
Communication Bus
Coordinator.1 Coordinator.2 Coordinator.n
Wrapper
Legend
SELF-SERV
SELF-SERV Interface
requests/results
workflow database applications web-accessible programs
Service Discovery Engine
C1 C2 C3
CS1 CS2
ES1 ES2 ES3 ES4
Beijing, 2002
SOAP: Simple Object Access Protocol
• An XML-based mechanism for exchanging structured data between network applications
• composes 3 parts
– envelope defines a framework for describing what is in a message and how to process it
– encoding rules express instances of application-defined data types
– a convention represents remote procedure calls and responses.
• 2 types of messages, Request/Response
Beijing, 2002
SOAP: an example of a request
POST /carRenting HTTP/1.1Host: www.axac.comContent-Type: text/xml; charset=“utf-8”Content-Length: 127SOAPAction: “http://www.anywhere.com/rentCar”<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope” SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding”> <SOAP-ENV:body> <m:rentCar xmlns:m=“http://www.anywhere.com/rentCar”> <customer>Boualem Benatallah</customer> <rentalDate>18/05/2002</rentalDate> <returnDate>20/05/2002</returnDate> </m:rentCar> </SOAP-ENV:Body></SOAP-ENV:Envelope>
Beijing, 2002
SOAP: an example of a reply
HTTP/1.1 200 OKContent-Type: text/xml; charset=“utf-8”Content-Length: 234<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope” SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding”> <SOAP-ENV:Body> <m:RentcarResponse xmlns:m=“http://www.anywhere.com/rentCar”> <rentalFees>234.00</rentalFees> </m:RentcarResponse> </SOAP-ENV:Body></SOAP-ENV:Envelope>
Beijing, 2002
WSDL: Web Service Description Language
• A general purpose XML language for describing interface, protocol bindings and the deployment details of Web services
• a WSDL document describes how to invoke a service by providing information on
– the data being exchanged
– the sequence of messages for an operation
– the location of the service and
– the description of bindings (e.g., SOAP/HTTP)
Beijing, 2002
WSDL: service description structure
ServiceImplementation
Definition
ServiceImplementation
Definition
ServiceService
PortPort
ServiceInterfaceDefinition
ServiceInterfaceDefinition
BindingBinding
Port TypePort Type
MessageMessage
TypeType
Beijing, 2002
WSDL: elements
• Types: contains the complex data types used in message
• Messages: defines the input/output parameters of an operation.
• Port type: defines the operations of a Web service
<definitions name="carRenting" ....> <types> <schema targetNamespace="http://example.com/carRenting.xsd" xmlns="http://www.w3.org/2000/10/XMLSchema"> <element name="Customer"> <complexType> <all><element name="Name" type="string"/> <element name="CreditCardNo" type="string"/> </all> </complexType> </element> </schema> </types> Beijing, 2002
….<message name="carRentingInput"> <part name="customer" element="tns:Customer"/> <part name="rentalDate" type="xsd:date"/> <part name="returnDate" type="xsd:date"/> </message> <message name="carRentingOutput"> <part name="rentalFee" type="xsd:float"/></message> <portType name="carRentingPortType"> <operation name="RentCar"> <input message="tns:carRentingInput"/> <output message="tns:carRentingOutput"/> </operation></portType>
WSDL: elements (cont.)
Beijing, 2002
WSDL: elements (cont.)
• Binding: describes the protocol, data format, security and other attributes for a particular service interface.
• Port: an address for a binding
• Service: a collection of WSDL port elements
<binding name="carRentingSoapBinding" type="tns:carRentingPortType"> <soap:binding style="document” transport="http://schemas.xmlsoap.org/soap/http"/> <operation name=”rentCar"> <soap:operation soapAction="http://www.anywhere.com/rentCar"/> <input><soap:body use="literal"/></input> <output><soap:body use="literal"/></output> </operation></binding>…<service name="CarRentingService"> <port name="carRentingPort" binding="tns:carRentingSoapBinding"> <soap:address location="http://example.com/carRenting"/> </port> ... </service>
Beijing, 2002
UDDI: Universal Description, Discovery and Integration
• UDDI is a specification that defines a service registry of available Web services
• Jointly proposed by Microsoft, Ariba and IBM
• SOAP can be used to query UDDI for services
• UDDI is defined through an XML schema, identifying 4 core types of information
• UDDI APIs specification: publishing/discovering (e.g., UDDI4J)
Beijing, 2002
UDDI: data structure
businessEntitybusinessEntity
businessServicebusinessService
bindingTemplatebindingTemplate
tModeltModel
Beijing, 2002
UDDI: an example of business registration
<businessList generic=“1.0” operator=“Microsoft operator” truncated=“false” xmlns=“urn:uddi-org:api”> <businessInfos> <businessInfo businessKey=“089B5-ER8-AC09-599CF7”> <name>Anywhere Ltd</name> <description xml:lang=“en”>all kinds of cars, trucks, motorbikes for renting</description> <serviceInfos> <serviceInfo businessKey=“ 089B5-ER8-AC09-599CF7” serviceKey=“12FF-2AF3-45FB-09AF7”> <name>carRental</name> </serviceInfo> …………. </serviceInfos> </businessInfo> </businessInfos></businessList>
Beijing, 2002
UDDI: an example of SOAP message acquiring information from the UDDI
Registry
<Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope”> <Body> <find_business xmlns=“urn:uddi-org:api” generic=“1.0”> <name>Anywhere Ltd</name> </find_business> </Body><Envelope>
For details http://www.uddi.org http://www-3.ibm.com/services/uddiFor details http://www.uddi.org http://www-3.ibm.com/services/uddi
Beijing, 2002
Integrating UDDI with WSDL and SOAP
SOAP RequestWSDL
SOAP Response
SOAP Request
Publish Invoke
Find
Service Provider
Service
Requestor
SOAP Response
SOAP Request
WSDL
SOAP Response
UDDIRegistry
Service registration and discoveryBeijing, 2002
Service Discovery Engine in SELF-SERV
• Service discovery engine facilitates service advertisements and discovery.
• UDDI, together with WSDL and SOAP are used to implement the discovery engine.
• IBM Web Service ToolKit (WSTK) 2.4 benefits a lot of the implementation.
Beijing, 2002
Service Discovery Engine in SELF-SERV (cont.)
• IBM WSTK is a showcase package for Web service related emerging technologies. It provides several tools.
– A lightweight application server called “embedded WebSphere”.
– A WSDL generation tool can encapsulate legacy code (e.g., Java classes, COM) as Web services.
– The UDDI4J (a Java API) enables operations to UDDI registry.
Beijing, 2002
Service Discovery Engine in SELF-SERV (cont.)
• Creating WSDL descriptions for Web services
– using IBM WSDL generation tool
• Deploying and publishing Web service
public class publishService{String serviceDefinitionWSDL=”http://www.cse.unsw.edu.au/SELFSERV/wsdl/carRental.wsdl”String serviceInterfaceWSDL=”http://www.cse.unsw.edu.au/SELF-SERV/wsdl/carRental-interface.wsdl”;String soapRouter=”http://www.cse.unsw.edu.au/soap/servlet/rpcrouter”;String serviceDeployment=”http://www.cse.unsw.ed.au/SELFSERV/wsdl/deploymentDescriptor.xml”;String inquiryURL=”http://www.cse.unsw.edu.au/services/uddi/inquiryapi”;String publishURL=”https://www.cse.unsw.edu.au/services/uddi/publishapi”;ServiceRegistryProxy srp = new ServiceRegistryProxyinquiryURL, publishURL, username, password);CategoryList spCatList = new CategoryList(); spCatList.addCategory(TModelKeyTable.UNSPSC, ”84121”, TModelKeyTable.UNSPSC_TMODEL_KEY);ServiceProvider sp=new ServiceProvider(“CarRental”, “SELF-SERV service provider example”, spCatList); sp=srp.publish(sp);ServiceInterface si=new ServiceInterface(serviceInterfaceWSDL); si=srp.publish(si);CategoryList sdCatList=new CategoryList();sdCatList.addCategory(TmodelKeyTable.UNSPSC, “84121”, TmodelKeyTable.UNSPSC_TMODEL_KEY);SOAPServiceDefinition sd=new SOAPServiceDefinition(serviceDefinitionWSDL, sdCatList, serviceDeployment, soapRouter);sd.createServiceManagerProxy().deployService(sd); srp.publish(sp, sd);}
A Java code fragment for publishing a Web serviceBeijing, 2002
Service Discovery Engine in SELF-SERV (cont.)
A screen snapshot for service registry. Beijing, 2002
Service Discovery Engine in SELF-SERV (cont.)
Locate a service
Execute the service
A screen snapshot for service discovery and invocation. Beijing, 2002
Conclusion
• Present the design and implementation of the Service Discovery Engine in SELF-SERV
• Show how UDDI, WSDL and SOAP complement each other in Web service advertisement and discovery
• This work is one part of a large research project SELF-SERV. Other works of SELF-SERV have also published in IEEE ICDE02, VLDB2002 etc.
Beijing, 2002