Download presentation
Presentation is loading. Please wait.
1
Representation and Management of Data on the Web
Web Services Representation and Management of Data on the Web
2
loosely coupled software components Internet standard technologies."
"Web services are loosely coupled software components delivered over Internet standard technologies."
3
Get Online Information
Example Scenario: Get Online Information Get Stock Price Return Stock Price Stock Broker Application Get Stock Price Return Stock Price Stock Exchange
4
Example Scenario – Online Trade
The Hobbit (5) Price: 20.95 Copies in Stock: 4 Price: 25.95 Copies in Stock: 1 Book Store The Hobbit (5) Price: 20.95 Copies in Stock: 5 Buy The Hobbit (5) How Much? Buy it Book Store The Hobbit (5) Price: 25.95 Copies in Stock: 0 Buy The Hobbit (5) 20.95 The Hobbit (5) Price: 25.95 Copies in Stock: 0 The Hobbit (5) Price: 25.95 Copies in Stock: 1
5
Example Scenario: Grid Computation
Using seamlessly the combined resources of many computers that are connected to the Internet
6
What is a Web Service? Self-contained, modular Web application that can be published, located and invoked across the Web A Web service can perform functions of varying complexities Once deployed, other applications (and other Web services) can discover and invoke the deployed service
7
Why is it Difficult to Use Ordinary Web Sites as Services?
Consider an application that should return the price of the book “The Hobbit” How can your application find suitable online stores? How can your application find the price of the book in a Web page? How can your application fill forms, if needed?
8
How can we find this URL? What is the price here?
9
Calling Remote Functions Could Help
It would help if we could call functions, such as: Amazon.getPrice(“The Hobbit") Amazon.buyBook(“The Hobbit", myId) getPrice(…) The Internet
10
Difficulties in Using Remote Functions
How can the calling application know in what language the functions are written? How can the application know what functions are available and what are their signatures? How can an application call a function that resides behind a firewall?
11
The Solution Use an agreed interface and a syntax that all applications are familiar with (e.g., XML) For example, SOAP Use HTTP to transfer data through port 80 Use a standard for publishing methods, their signatures and their usage For example, WSDL Use standard directory structures for publishing available services For example, UDDI
13
Web Services that are Already Available
Google search ( Weather reports Stock prices Currency exchanges Sending SMS messages, faxes Prices of books in Barnes and Nobles Dictionaries etc.
14
Implementing Web Services
Programmers are given tools that spare the need to directly write SOAP or WSDL documents In Java: JAX-RPC: part of SUN tools for publishing and deploying Web Services AXIS: Apache’s tool for handling Web services in Java
15
SOAP Simple Object-Access Protocol
16
What is SOAP? SOAP is a protocol for accessing Web Services
SOAP is XML based Thus, SOAP provides interoperability In SOAP, applications exchange information over HTTP Thus, SOAP is not restricted by firewalls SOAP allows to exchange structured and typed information on the Web XSchema types are used to add types to XML SOAP specification:
17
A request to http://services.xmethods.net:80/soap
POST /soap HTTP/1.0 SOAPAction: "" Content-Length: 520 <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv=" xmlns:xsd=" xmlns:xsi=" <soapenv:Body> <ns1:getRate soapenv:encodingStyle=" xmlns:ns1="urn:xmethods-CurrencyExchange"> <country1 xsi:type="xsd:string">Euro</country1> <country2 xsi:type="xsd:string">Israel</country2> </ns1:getRate> </soapenv:Body> </soapenv:Envelope> A request to
18
The Response HTTP/1.0 200 OK Date: Sat, 07 May 2005 23:26:21 GMT
Content-Length: 492 Content-Type: text/xml <?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:soap=' xmlns:xsi=' xmlns:xsd=' xmlns:soapenc=' soap:encodingStyle=' <soap:Body> <n:getRateResponse xmlns:n='urn:xmethods-CurrencyExchange'> <Result xsi:type='xsd:float'>5.5825</Result> </n:getRateResponse> </soap:Body> </soap:Envelope> The Response
19
A SOAP Message A SOAP message is an ordinary XML document containing the following elements: Envelope – identifies the XML document as a SOAP message: required Header – contains header information: optional Body – contains call or response information: required Fault – provides information about errors that occurred while processing the message: optional
20
SOAP Simplification (1)
Consider the Java interface: Suppose that a client wants to call the server's sayHelloTo method Could send an XML message: public interface Hello { public String sayHelloTo(String name); } <?xml version="1.0"?> <Hello> <sayHelloTo> <name>Lisa</name> </sayHelloTo> </Hello> Name of the Interface Name of the Method Name of the Parameter
21
SOAP Simplification (2)
The Server could respond with: <?xml version="1.0"?> <Hello> <sayHelloToResponse> <message>Hello Lisa, How are you?</message> </sayHelloToResponse> </Hello> Name of the Interface Returned Value Name of the Method + Response
22
SOAP Intuition
23
Skeleton SOAP Message A SOAP envelope must be
<?xml version="1.0"?> <soap:Envelope xmlns:soap=" soap:encodingStyle=" <soap:Header> </soap:Header> <soap:Body> <soap:Fault> </soap:Fault> </soap:Body> </soap:Envelope> A SOAP envelope must be Associated with this name space Envelope Header Body Fault
24
encodingStyle Attribute
“The SOAP encodingStyle attribute indicates the encoding rules used to serialize parts of a SOAP message” Needed when sending data structures This attribute may appear on any SOAP element, and it will apply to that element's content and all child elements A SOAP message has no default encoding Unencoded data may be used in SOAP messages The SOAP default XMLSchema for SOAP encoding and data types is: Other encoding rules may be used
25
Actual Soap Request Envelope <SOAP-ENV:Envelope
xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Header> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:sayHelloTo xmlns:ns1="Hello" SOAP-ENV:encodingStyle=" <name xsi:type="xsd:string">Lisa</name> </ns1:sayHelloTo> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Envelope
26
Actual Soap Request Name Spaces <SOAP-ENV:Envelope
xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Header> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:sayHelloTo xmlns:ns1="Hello" SOAP-ENV:encodingStyle=" <name xsi:type="xsd:string">Lisa</name> </ns1:sayHelloTo> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Name Spaces
27
Actual Soap Request Header Body <SOAP-ENV:Envelope
xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Header> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:sayHelloTo xmlns:ns1="Hello" SOAP-ENV:encodingStyle=" <name xsi:type="xsd:string">Lisa</name> </ns1:sayHelloTo> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Header Body
28
Actual Soap Request Interface Method Parameter <SOAP-ENV:Envelope
xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Header> </SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:sayHelloTo xmlns:ns1="Hello" SOAP-ENV:encodingStyle=" <name xsi:type="xsd:string">Lisa</name> </ns1:sayHelloTo> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Interface Method Parameter
29
Actual Soap Response Envelope <SOAP-ENV:Envelope
xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Body> <ns1:sayHelloToResponse xmlns:ns1="Hello" SOAP-ENV:encodingStyle=" <return xsi:type="xsd:string"> Hello Lisa, How are you doing? </return> </ns1:sayHelloToResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
30
Actual Soap Response Body <SOAP-ENV:Envelope
xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Body> <ns1:sayHelloToResponse xmlns:ns1="Hello" SOAP-ENV:encodingStyle=" <return xsi:type="xsd:string"> Hello Lisa, How are you doing? </return> </ns1:sayHelloToResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Body
31
Actual Soap Response Method Interface Returned Value
<SOAP-ENV:Envelope xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Body> <ns1:sayHelloToResponse xmlns:ns1="Hello" SOAP-ENV:encodingStyle=" <return xsi:type="xsd:string"> Hello Lisa, How are you doing? </return> </ns1:sayHelloToResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Method Interface Returned Value
32
SOAP Header Element The SOAP Header element is optional
It contains application specific information (like authentication, payment, etc) about the SOAP message If the Header element is present, it must be the first child element of the Envelope element Attributes that the namespace defines: Actor – used to address the Header element to a particular server (e.g., proxy) on the message path through the Internet mustUnderstand – used to indicate whether a header entry is mandatory or optional for the recipient to process encodingStyle – as explained before
33
SOAP Header Element Example:
<SOAP-ENV:Header> <t:Transaction xmlns:t="some-URI" SOAP-ENV:mustUnderstand="1">5 </t:Transaction> </SOAP-ENV:Header> 5 is the transaction ID of which this method is a part In the above example, the SOAP-envelope attribute mustUnderstand is set to 1, which means that the server must either understand and honor the transaction request or must fail to process the message
34
SOAP Response on Error There can be many errors in processing a SOAP request Error in Running Methods: For example, suppose that the "Hello Server" does not allow anyone to say hello on Tuesday Error in Processing SOAP Headers: For example, a problem running the method as part of a transaction
35
The Fault Element May Include the Following Sub-Elements
<faultcode> : A code for identifying the fault <faultstring> : A human readable explanation of the fault <faultactor> : Information about who caused the fault <detail> : Holds application-specific error information related to the Body element of the SOAP request
36
SOAP Fault Codes VersionMismatch: Found an invalid namespace for the SOAP Envelope element MustUnderstand: An immediate child element of the Header element, with the mustUnderstand attribute set to 1, was not understood Client: The message was incorrectly formed or contained incorrect information Server: There was a problem with the server so the message could not proceed
37
SOAP Error Response for Method Error
<SOAP-ENV:Envelope xmlns:SOAP-ENV=" <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>Server Error</faultstring> <detail> <e:myfaultdetails xmlns:e="Hello"> <message> Sorry, I cannot say hello on Tuesday. </message> <errorcode>1001</errorcode> </e:myfaultdetails> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
38
SOAP Error Response for Header Error
<SOAP-ENV:Envelope xmlns:SOAP-ENV=" <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:MustUnderstand</faultcode> <faultstring>SOAP Must Understand Error</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> No detail element may appear when there is an error in processing the Headers of a SOAP request
39
Sending a Request The SOAP request does not contain the address to which it should be sent Q: Where do we put the URL of the Web Service? A: It depends on the Protocol used to send the request (usually HTTP, but could also be another protocol, e.g., SMTP)
40
SOAP Request via HTTP POST HTTP/1.0 Content-Type: text/xml; charset=UTF-8 Content-Length: 587 SOAPAction: urn:helloApp <SOAP-ENV:Envelope … Note: There are 2 addresses (1) URL of a SOAP Server (2) URI of an application to run (this needn't correspond to an actual Internet address)
41
SOAPAction Header Used to indicate the intent of the SOAP HTTP request
The presence and content of the SOAPAction header field can be used by servers, such as firewalls, to appropriately filter SOAP request messages in HTTP The header-field value of an empty string ("") means that the intent of the SOAP message is provided by the URL of the HTTP Request
42
SOAP Response via HTTP HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8 Content-Length: 615 <SOAP-ENV:Envelope …
43
Example: Currency Rate
There are many available Web services that you can use See for a list Look, in particular, at those marked "RPC" (Remote Procedure Call) To get Currency exchange, for example, you can do "telnet wwwproxy.cs.huji.ac.il 8080" and then send the following request…
44
POST http://services.xmethods.net:80/soap HTTP/1.0
Content-Type: text/xml Content-Length: 485 SOAPAction: "" <SOAP-ENV:Envelope xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Body> <ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange" SOAP-ENV:encodingStyle=" <country1 xsi:type="xsd:string">United States</country1> <country2 xsi:type="xsd:string">Israel</country2> </ns1:getRate> </SOAP-ENV:Body></SOAP-ENV:Envelope>
45
And Here is the Response
HTTP/ OK Content-Type: text/xml <?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:soap=' xmlns:xsi=' xmlns:xsd=' xmlns:soapenc=' soap:encodingStyle=' <soap:Body><n:getRateResponse xmlns:n='urn:xmethods-CurrencyExchange'> <Result xsi:type='xsd:float'>4.521</Result> </n:getRateResponse> </soap:Body></soap:Envelope>
46
Example - Calling Google Spelling
<?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP ENV=“ xmlns:xsi=“ xmlns:xsd=“ <SOAP-ENV:Body> <ns1:doSpellingSuggestion xmlns:ns1=“urn:GoogleSearch” SOAP- ENV:encodingStyle=" <key xsi:type="xsd:string"> </key> <phrase xsi:type="xsd:string">britney speers</phrase> </ns1:doSpellingSuggestion> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
47
Example - Google Spelling Response
<?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Body> <ns1:doSpellingSuggestionResponse xmlns:ns1="urn:GoogleSearch“ SOAP-ENV:encodingStyle=" <return xsi:type="xsd:string">britney spears</return> </ns1:doSpellingSuggestionResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
48
An alternative to SOAP: XML-RPC
XML-RPC is similar to SOAP but simpler You just have to specify what is the method and what are the parameters See for further details
49
XML-RPC Request Example
POST /MyRPC HTTP/1.0 Host: Content-Type: text/xml Content-length: 181 <?xml version="1.0"?> <methodCall> <methodName>Hello.sayHelloTo</methodName> <params> <param> <value><string>Lisa</string></value> </param> </params> </methodCall>
50
XML-RPC Response Example
HTTP/ OK Connection: close Content-Length: 158 Content-Type: text/xml Date: Sun, 6 Jun :33:08 GMT <?xml version="1.0"?> <methodResponse> <params> <param> <value><string>Hello Lisa</string></value> </param> </params> </methodResponse>
51
Example 1: MD5 Transform
52
Example 2: Baghdad Weather
53
Example 2: Baghdad Weather
54
Example 3: World Cities
55
Example 3: World Cities
56
WSDL – Web Services Description Language
57
Describing a Web Service
Need a standard way to describe a Web Service: the methods available their parameters etc. WSDL is a standard for describing Web services using XML, i.e., it is a language for the green pages of UDDI WSDL specification can be found at
58
WSDL Can Describe What a Web service can do Where it resides
How to invoke it
59
<definitions name="CurrencyExchangeService"
<?xml version="1.0"?> <definitions name="CurrencyExchangeService" targetNamespace=" xmlns:tns=" xmlns:xsd=" xmlns:soap=" xmlns=" <message name="getRateRequest"> <part name="country1" type="xsd:string"/> <part name="country2" type="xsd:string"/> </message> <message name="getRateResponse"> <part name="Result" type="xsd:float"/> <portType name="CurrencyExchangePortType"> <operation name="getRate"> <input message="tns:getRateRequest" name="getRate"/> <output message="tns:getRateResponse" name="getRateResponse"/> </operation></portType>
60
<service name="CurrencyExchangeService">
<binding name="CurrencyExchangeBinding" type="tns:CurrencyExchangePortType"> <soap:binding style="rpc" transport=" <operation name="getRate"> <soap:operation soapAction=""/> <input name="getRate"> <soap:body use="encoded" namespace="urn:xmethods-CurrencyExchange" encodingStyle=" </input> <output name="getRateResponse"> </output> </operation> </binding> <service name="CurrencyExchangeService"> <documentation>Returns the exchange rate between the two currencies</documentation> <port name="CurrencyExchangePort" binding="tns:CurrencyExchangeBinding"> <soap:address location=" </port> </service> </definitions>
61
The Two Layers of WSDL The service definition layer describes abstract properties: data types message types operations services The binding layer describes concrete properties (using SOAP, HTTP, MIME): protocols data formats
62
More on the Binding Layer
WSDL defines services as collections of network endpoints or ports Endpoints are defined by binding a concrete network protocol and a concrete message format to abstract operations and messages In theory, WSDL can describe any endpoint regardless of the underlying network protocol or message format In practice, WSDL is used with SOAP/HTTP/MIME
63
The Elements of WSDL Documents
Types – containing XML Schema element and type definitions Message – an abstract typed definition of the data being communicated Operation – an abstract description of an action supported by the service Port Type – an abstract set of operations supported by one or more endpoints Binding – a concrete communication protocol and data format specification for a particular port type Port – a single endpoint defined as a combination of a binding and a network address Service – a collection of named ports, each associated with a binding and a network address
64
The Structure of a WSDL Document
<definition> <types> definition of types…. </types> <messages> definition of a message </message> <port type> definition of a port </port type> <binding> definition of a binding </binding> </definition> <definition> <types> <messages> <portType> <binding>
65
General and specific namespaces
Example <?xml version="1.0" encoding="UTF-8"?> <definitions name="HelloService" targetNamespace=" xmlns=" xmlns:soap=" xmlns:tns=" xmlns:xsd=" General and specific namespaces
66
Types The <types> element defines the data types that are used by the Web service For maximum interoperability, WSDL uses XML Schema syntax to define data types
67
Messages The <message> element defines the data elements of an operation Each message can consist of one or more parts These parts are analogous to the parameters of a function call in Java
68
String sayHello(String firstName)
Example <message name="SayHelloRequest"> <part name="firstName" type="xsd:string"/> </message> <message name="SayHelloResponse"> <part name="greeting" type="xsd:string"/> </message> String sayHello(String firstName)
69
Port Types The <portType> element is the most important WSDL element The <portType> element is similar to a class in Java It defines the Web service, the operations that can be performed, and the messages that are involved
70
Example <portType name="Hello_PortType"> <operation name="sayHello"> <input message="tns:SayHelloRequest"/> <output message="tns:SayHelloResponse"/> </operation> </portType> public interface HelloService { public String sayHello(String firstName); }
71
Operation Types We divide operations to four types:
One-way – the operation can receive a message but will not return a response (the operation includes only input) Request-response – the operation can receive a request and will return a response (the operation includes input and output) Solicit-response – the operation can send a request and will wait for a response (the operation includes output and input) Notification – the operation can send a message but will not wait for a response (the operation includes only output)
72
Binding Using SOAP The SOAP <binding> element defines the details of the message format and protocol for each port The transport attribute defines the SOAP protocol to use (e.g., HTTP, FTP, SMTP) The style attribute of the binding can be either RPC (Remote Procedure Call) or document (document is the default)
73
RPC vs. Document RPC style indicates that the messages contain parameters and return values Document style indicates that the messages contain document(s) Differently from document style: In RPC, we need to clearly separate the arguments from each other In RPC, the order of parameters is important
74
The SOAP Binding in WSDL
Selects document or rpc style Selects HTTP/SMTP/… protocol Selects encoding (typically, the SOAP encoding) Places messages parts in header or body parts of the envelope
75
<binding name="Hello_Binding" type="tns:Hello_PortType">
<soap:binding style="rpc“ transport=" <operation name="sayHello"> <soap:operation soapAction="sayHello"/> <input> <soap:body encodingStyle=" namespace="urn:examples:helloservice" use="encoded"/> </input> <output> <soap:body encodingStyle=" namespace="urn:examples:helloservice" use="encoded"/> </output> </operation> </binding>
76
A Service Description in WSDL (defining an endpoint)
<service name="Hello_Service"> <documentation>WSDL File for HelloService</documentation> <port binding="tns:Hello_Binding" name="Hello_Port"> <soap:address location=" </port> </service> </definitions> The location attribute associates the binding with a URL
77
Recall Currency Exchange Example
POST HTTP/1.0 Content-Type: text/xml Content-Length: 485 SOAPAction: "" <SOAP-ENV:Envelope xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <SOAP-ENV:Body> <ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange" SOAP-ENV:encodingStyle=" <country1 xsi:type="xsd:string">United States</country1> <country2 xsi:type="xsd:string">Israel</country2> </ns1:getRate></SOAP-ENV:Body></SOAP-ENV:Envelope> Recall Currency Exchange Example
78
CurrencyExchange's WSDL
Next is the WSDL for this service Note that it has to describe: URL URI Method Name Method Namespace Parameter Names Parameter Types Encoding of Parameters
79
<?xml version="1.0"?> <definitions name="CurrencyExchangeService" targetNamespace=" xmlns:tns=" xmlns:xsd=" xmlns:soap=" xmlns=" <message name="getRateRequest"> <part name="country1" type="xsd:string"/> <part name="country2" type="xsd:string"/> </message> <message name="getRateResponse"> <part name="Result" type="xsd:float"/>
80
<portType name="CurrencyExchangePortType">
<operation name="getRate"> <input message="tns:getRateRequest" /> <output message="tns:getRateResponse" /> </operation> </portType> <binding name="CurrencyExchangeBinding" type="tns:CurrencyExchangePortType"> <soap:binding style="rpc" transport=" <soap:operation soapAction=""/> <input > <soap:body use="encoded" namespace="urn:xmethods-CurrencyExchange" encodingStyle=" </input>
81
<output > <soap:body use="encoded" namespace="urn:xmethods-CurrencyExchange" encodingStyle=" </output> </operation> </binding> <service name="CurrencyExchangeService"> <documentation>Returns the exchange rate </documentation> <port name="CurrencyExchangePort" binding="tns:CurrencyExchangeBinding"> <soap:address location=" </port> </service></definitions>
82
UDDI – Universal Description, Discovery and Integration
83
A Telephone Book How can you find a Web service?
How can you register your Web service so that others will find it? UDDI is a standard for publishing and finding Web services Think of UDDI as a telephone book
84
Business Registrations
How Does UDDI Work? Software companies, standards bodies and programmers populate the registry with descriptions of different service specifications Marketplaces, search engines and business apps query the registry to discover services at other companies UDDI Business Registry Businesses use this data to facilitate easier integration with each other over the Web Business Registrations Service Type Registrations Businesses populate the registry with descriptions of the services they support UDDI assigns a universally unique identifier (UUID) to each registry record
85
"Types" of Pages White Pages: Yellow Pages: Green Pages:
Basic contact information, business name, address, etc. Allow others to find you based on your identification Yellow Pages: Describe Web services by category Allow others to find you by category (e.g., car sales) Green Pages: Technical information about supported methods of Web services
86
UDDI Data Model businessEntity keyedReference tModel businessService
businessKey BA744ED C64 name XMethods description Web services resource site contacts Lisa Simpson businessServices identifierBag categoryBag businessEntity tModelKey 8609C8 … D01823 keyName D-U-N-S keyValue keyedReference serviceKey D59211 … 229C64 name XMethods Delayed Stock Quotes description 20-minute delayed stock quotes bindingTemplates categoryBag businessService tModelKey 8609C8 … D01823 Name dnb-com:D-U-N-S Description Dun&Bradstreet D-U-N-S Number overviewDoc UDDI_Taxonomy_tModels.htm#D-U-N-S categoryBag tModel bindingTemplate bindingKey D594A … 229C64 description SOAP binding for delayed stock quotes service accessPoint tModelInstanceDetails tModelKey 0E727D … 229C64 Name Xmethods Simple Stock Quote description Simple stock quote interface overviewDoc xmethods.net/SimpleStockQuote.wsdl categoryBag tModel
87
UDDI Structure businessEntity - The top-level XML element (includes support for "yellow pages" taxonomies) businessService - contains descriptive business service information about a group of related technical services, including the group name a brief description technical service-description information service properties service leasing details category information
88
UDDI Structure bindingTemplate - contains data relevant for applications that need to invoke or bind to a specific Web Service tModel - Descriptions of specifications (protocols, formats, etc.) for Web services or taxonomies its role is to represent the technical specification of the Web service, making it easier for Web-service consumers to find Web services that are compatible with a particular technical specification
89
Key Entities Description
businessEntity Information about the entity who offers a service Bindings contain references to tModels. These references declare the interface specifications for a service. 0..n businessService Descriptive information about a particular family of technical offerings 0..n bindingTemplate Technical information about a service entry point tModel Description of specifications for services 0..n
90
Key Entities Example businessEntity publisherAssertion businessService
Name: Acme Corp Desc: Purveyors of Fine Products URL: Contact: Joseph Cohen publisherAssertion From Key: Acme Corp. To Key: Nadir Corp. businessService Name: getPrice Desc: Accepts ACME product ID as a string. Returns product price as a double. bindingTemplate Access Point: Desc: SOAP endpoint for the getPrice service. tModel Name: getPrice Desc: WSDL for the getPrice service Overview Doc: category wsdlSpec identifier E1-AA-09-F3
91
Categorizing Entities
businessEntity Name: Acme Corp Desc: Purveyors of Fine Products URL: Contact: Joseph Cohen category Retail publisherAssertion From Key: Acme Corp. To Key: Nadir Corp. identifier DUNS: businessService Name: getPrice Desc: Accepts ACME product ID as a string. Returns product price as a double. category Pricing bindingTemplate Access Point: Desc: SOAP endpoint for the getPrice service. category V 1.1 tModel Name: getPrice Desc: WSDL for the getPrice service Overview Doc: category wsdlSpec identifier E1-AA-09-F3
92
UDDI Business Registry (UBR), Public Cloud
Nodes contain all UDDI information Nodes are synchronized, so they retain the same data You can query any node You can add UDDI information to a node, and it will be replicated to all others
93
Registry Nodes Operation
IBM Microsoft HP other queries UDDI Cloud Service client Registry Node Peer-operator nodes A business can register with any node Registrations replicated on a daily basis Operates like DNS: logically centralized, physically distributed
94
Interacting with the UDDI
UDDI is itself a Web service!!! Interaction is via SOAP messages The JAXR package defines a standard way to interact with registries (can work with other types of registries too, e.g., ebXML) Two types of interaction: Inquiry: Does not need authentification Publish: Needs authentification Here is a Web interface for a UBR node
95
JAXR Java API used to access registries that conform to standards, such as UDDI Part of Java WSDP Taken from
96
UDDI API Inquiry API Publishing API find_business find_service
find_binding find_tmodel save_business save_service save_binding save_tmodel get_businessDetail get_serviceDetail get_bindingDetail get_tmodelDetail delete_business delete_service delete_binding delete_tmodel get_authtoken discard_authtoken
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.