Web Service Protocols —Web service specifications - PowerPoint PPT Presentation

Web service protocols web service specifications
1 / 96

  • Uploaded on
  • Presentation posted in: General

课程名:以服务为中心的软件开发设计与实现. Web Service Protocols —Web service specifications. Outline. Overview of Web Services XML and XML Schema The Communication Protocol (SOAP) Web Services Description (WSDL) Web Services Publication and Discovery (UDDI) Summary. Overview of Web Services. Web Services.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

Web Service Protocols —Web service specifications

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Web service protocols web service specifications


Web Service Protocols—Web service specifications



  • Overview of Web Services

  • XML and XML Schema

  • The Communication Protocol (SOAP)

  • Web Services Description (WSDL)

  • Web Services Publication and Discovery (UDDI)

  • Summary

Overview of web services

Overview of Web Services

Web services

Web Services

  • Web Services: Web services are a recent set of technology specifications that leverage existing proven open standards such as XML, URL, and HTTP to provide a new system-to-system communication standard.

  • Working Definition:Network-resident software Services accessible via standardized protocols

    • Simple Object Access Protocol (SOAP): very flexible remote procedure call

  • Lots of interest in trade press, academic community, standards bodies, . . .

  • Applications in e-commerce, telecom, science, GRID, government, education, . . .

Categories of web services

Categories of Web Services

  • Business-Oriented Web Services

    • ERP,CRM,

    • Application system integration

  • Consumer-Oriented Web Services

    • B2C website, across multi B2C systems

  • Device-Oriented Web Services

    • Support the services across different kinds of services. E.g weather report, email service

  • System-Oriented Web Services

    • Authentication

    • Monitoring

    • QoS

Soa model

SOA Model

  • As a distributed computing architecture, Web Services

    are the most important implementation for SOA.

  • SOA Model is Web Services Concept Architecture.

Concept in soa model

Concept in SOA Model

  • Role

    • Services Provider

    • Services Requestor

    • Services Registry

  • Operation

    • Publish

    • Find

    • Bind

  • Key Component

    • Services

    • Services Description

Core standards in soa model

Core Standards in SOA Model

  • Some Standards

    • Web Services Description Language (WSDL)

    • Universal Description, Discovery and Integration (UDDI)

    • Simple Object Access Protocol (SOAP)

    • Web Service Flow Language (BPEL)

    • ……

The level model of soa development

The Level Model of SOA Development

Services Consumer

Business Process

Integration Architecture

Qos Security Management



Services Provider

Existing Application Resources

The processes of web services

The Processes of Web Services

Simplify and/or automate web Services

  • Discovery

    • What properties should be described?

    • How to efficiently query against them?

  • Composition

    • Specifying goals of a composition

    • Specifying constraints on a composition

    • Building a composition

    • Analysis of compositions

  • Invocation

    • Keeping enactments separated

    • Providing transactional guarantees

  • Monitoring

    • How to track enactments

    • Recovering from failedenactments

Web services standard stack

Web Services Standard Stack

Web Services





Web Services








Web Services






Web Services


WSDM, WS-Manageability

SPML, WS-Provisioning

Publishing and





Services Description Layer: WSDL, WSCL, WSCI,WS-MetadataExchange, WS-Policy

XML messaging layer: SOAP , WS-Addressing, WS-Notification, WS-Eventing,

WS-Enumeration, WS-MessageDelivery, WS-Reliability,WS Reliable Messaging,

WS-Resources WS-Transfer

Transport layer: HTTP, SMTP, FTP, etc.

Web service core standards

Web Service Core Standards






IBM WebSphere

Microsoft .Net

Sun J2EE


XML Schema




Implementation Platforms

Web Service Standards

Xml and xml schema

XML and XML Schema

The structure of xml

The structure of XML

  • Tag: label for a section of data

  • Element and Subelement: section of data beginning with <tagname> and ending with matching </tagname>

    Elements must be properly nested

    • Proper nesting

      • <account> … <balance> …. </balance> </account>

    • Improper nesting

      • <account> … <balance> …. </account> </balance>

    • Formally: every start tag must have a unique matching end tag, that is in the context of the same parent element.

The structure of xml1

The structure of XML

  • Every document must have a single top-level element

    <bank> <customer>

    <name> Hayes </name>

    <street> Main </street>

    <city> Harrison </city>


    <account-number> A-102 </account-number>

    <branch-name>Perryridge </branch-name>

    <balance> 400 </balance>




    </customer>. .


Top level element

The structure of xml2

The structure of XML

  • Attribute

    • Elements can haveattributes

      <account acct-type = “checking” >

      <account-number> A-102 </account-number>

      <branch-name> Perryridge </branch-name>

      <balance> 400 </balance>


    • Attributes are specified by name=value pairs inside the starting tag of an element

    • An element may have several attributes, but each attribute name can only occur once

      • <account acct-type = “checking” monthly-fee=“5”>

The structure of xml3

The structure of XML

  • Differences between element and attribute

    <customer name=Hayes street=Main city=Harrison>


    <account-number> A-102 </account-number>

    <branch-name> Perryridge </branch-name>

    <balance> 400 </balance>





Attribute can only occur once

Attributes cannot be nested

Attributes have no order

The structure of xml4

The structure of XML

  • Well-Formed XML Documents

    • There is only one outermost element in the document (called the root element)

    • Each element contains an opening and a corresponding closing tag

    • Tags can not overlap, as in<author><name>LeeHong</author></name>

    • Attributes within an element have unique names

    • Element and tag names must be permissible

The structure of xml5

The structure of XML

  • The Tree Model of XML Documents

    • There is exactly one root

    • There are no cycles

    • Each node, other than the root, has exactly one parent

    • Each node has a label. Element or attribute

    • The order of elements is important

Xml example

XML Example

<?xml version="1.0" encoding="UTF-16"?>

<!DOCTYPE email SYSTEM "email.dtd">



<from name="Michael Maher” address="michaelmaher@cs.gu.edu.au"/>

<to name="Grigoris Antoniou“ address="grigoris@cs.unibremen.de"/>

<subject>Where is your draft?</subject>



Grigoris, where is the draft of the paper

you promised me last week?





  • XML data has to be exchanged between organizations

  • Same tag name may have different meanings in different organizations, causing confusion on exchanged documents

  • Specifying a unique string as an element name avoids confusion

  • Better solution: use unique-name:element-name

  • Avoid using long unique names all over document by using XML Namespaces



<Schema name="mySchema" xmlns="urn:schemas-microsoft-com:xml-data"xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:myNS=http://www.xml_step_by_step.edu\ns.xml


Three namespaces:

schema namespace

datatype namespace

myNS namespace

Sample code read xml

Sample Code—Read XML

import java.net.URL;

import org.dom4j.Document;

import org.dom4j.DocumentException;

import org.dom4j.io.SAXReader;

public class Foo {

public Document parse(URL url) throws DocumentException {

SAXReader reader = new SAXReader();

Document document = reader.read(url);

return document;



  • public void bar(Document document) throws DocumentException {

  • Element root = document.getRootElement();

  • // iterate through child elements of root

  • for ( Iteratori = root.elementIterator(); i.hasNext(); ) {

  • Element element = (Element) i.next();

  • // do something

  • }

  • // iterate through child elements with element name "foo"

  • for ( Iteratori = root.elementIterator( "foo" ); i.hasNext(); ) {

  • Element foo = (Element) i.next();

  • // do something

  • }

  • // iterate through attributes of root

  • for ( Iteratori = root.attributeIterator(); i.hasNext(); ) {

  • Attribute attribute = (Attribute) i.next();

  • // do something

  • }

  • }

Sample code write xml

Sample Code—Write XML

import org.dom4j.Document;

import org.dom4j.DocumentHelper;

import org.dom4j.Element;

public class Foo {

public void createDocument() {

Document document = DocumentHelper.createDocument();

Element root = document.addElement( "root" );

Element author1 = root.addElement( "author" )

.addAttribute( "name", "James" )

.addAttribute( "location", "UK" )

.addText( "James Strachan" );

Element author2 = root.addElement( "author" )

.addAttribute( "name", "Bob" )

.addAttribute( "location", "US" )

.addText( "Bob McWhirter" );

FileWriter out = new FileWriter( "foo.xml" );

document.write( out );



Xml schema

XML Schema

  • Database schemas constrain what information can be stored, and the data types of stored values

  • schemas are very important for XML data exchange

    • Otherwise, a site cannot automatically interpret data received from another site

  • Two mechanisms for specifying XML schema

    • Document Type Definition (DTD)

    • XML Schema

Like DDL for database?

Ddl example

DDL Example

/*Column Information For - psn.publisher*/

Field Type Collation Null Key Default Extra Privileges Comment

------ ---------------- --------------- ------ ------ ------- ------ ------------------------------- -------

id int(11) unsigned (NULL) NO PRI 0 select,insert,update,references

name varchar(255) utf8_general_ci NO select,insert,update,references

/*DDL Information For - psn.publisher*/

Table Create Table

--------- --------------------------------------------------------------------------------

publisher CREATE TABLE `publisher` (

`id` int(11) unsigned NOT NULL default '0',

`name` varchar(255) NOT NULL default '',


) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Publisher information from DBLP'

Xml schema1

XML Schema

  • XML Schema Supports

    • Typing of values

      • E.g. integer, string, etc

      • Also, constraints on min/max values

    • User defined types

    • Is itself specified in XML syntax, unlike DTDs

      • More standard representation, but verbose

    • Is integrated with namespaces (reuse and refine)

    • Many more features

      • List types, uniqueness and foreign key constraints, inheritance ..

Web service protocols web service specifications

<xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema>

<xsd:element name=“bank” type=“BankType”/>

<xsd:element name=“account”><xsd:complexType> <xsd:sequence> <xsd:element name=“account-number” type=“xsd:string”/> <xsd:element name=“branch-name” type=“xsd:string”/> <xsd:element name=“balance” type=“xsd:decimal”/> </xsd:squence></xsd:complexType>


….. definitions of customer and depositor ….

<xsd:complexType name=“BankType”><xsd:squence>

<xsd:element ref=“account” minOccurs=“0” maxOccurs=“unbounded”/>

<xsd:element ref=“customer” minOccurs=“0” maxOccurs=“unbounded”/>

<xsd:element ref=“depositor” minOccurs=“0” maxOccurs=“unbounded”/>




Xml schema2

XML Schema

  • Element Types

    <element name=". . ."/> with possible attributes:

    • ‘ type’ attribute

      define the element type of this element: type=". . ." (more on types later)

    • cardinality constraints:

      • minOccurs="x", where x may be any natural number (including zero)

      • maxOccurs="x", where x may be any natural number (including zero) or unbounded

Xml schema3

XML Schema

<element name="email"/>

<element name="head" minOccurs="1" maxOccurs="1"/>

<element name="to" minOccurs="1"/>

Xml schema4

XML Schema

  • Attribute Types

    <attribute name=". . ."/> with possible attributes

    • type=". . ."

    • use="x", corresponds to #OPTIONAL and #IMPLIED in DTDs

    • use="x" value=". . .", where x may bedefault or fixed

Xml schema5

XML Schema

<attribute name="id" type="ID" use="required"/>

<attribute name="speaks" type="LanguageType" use="default“ value="en"/>

Xml schema6

XML Schema

  • Data Types

    • Numerical data types, including integer, Short, Byte, Long, Float,Decimal

    • String data types, including string, ID, IDREF, CDATA, Language

    • Date and time data types

  • user-defined data types

    • simple data types and complex data types

Xml schema7

XML Schema

  • Complex data type and extension data type

    • defined from already existing data types by defining some attributes (if any) and using sequence, all and choice.

      <complexType name="lecturerType">


      <element name="firstname" type="string"

      minOccurs="0" maxOccurs="unbounded"/>

      <element name="lastname" type="string"/>


      <attribute name="title" type="string" use="optional"/>


Xml schema8

XML Schema

  • <element name=“lecture” type=“lectureType”>

    <lecture title=“associate professor”>




Xml schema9

XML Schema

Data Type Extension: existing data types can be extended by new elements or attributes

<complexType name="extendedLecturerType">

<extension base="lecturerType">


<element name="email" type="string"

minOccurs="0" maxOccurs="1"/>


<attribute name="rank" type="string" use="required"/>



Xml schema10

XML Schema

  • Restriction data type and simple data type

    be defined by restricting existing data types

    <complexType name="restrictedLecturerType">

    <restriction base="lecturerType">


    <element name="firstname" type="string"

    minOccurs="1" maxOccurs="2"/>


    <attribute name="title" type="string" use="required"/>



Xml schema11

XML schema

  • Simple data types can also be defined by restricting existing data types.

    <simpleType name="dayOfMonth">

    <restriction base="integer">

    <minInclusive value="1"/>

    <maxInclusive value="31"/>



The communication protocol soap

The Communication Protocol(SOAP)

Why s imple o bject a ccess p rotocol

Why Simple Object Access Protocol

  • SOAP is an XML messaging protocol that is independent of any specific transport protocol.

  • Light weight replacement for complicated distributed object technology

  • Originally for BizTalk (Microsoft/UserLand/DevelopMentor)

  • Now a W3C standard

  • Based on XML

Soap message structure

Envelope contains



Header is optional

Out-of-band information such as…

Authentication information

Message routes


Transaction flow

Body contains XML body of RPC call

SOAP Envelope

SOAP Header

Header Block

. . .

Header Block


Body Block

. . .

Body Block

SOAP Message Structure

Soap example

SOAP Example

Soap example1

SOAP Example

Web services description language wsdl

Web Services Description Language(WSDL)

Web services description language wsdl1

Web Services Description Language (WSDL)

  • WSDL is an XML-based interface definition language that separates function from implementation, and enables design by contract as recommended by SOA.

  • WSDL defines

    • What does Services do –interface

    • Access specification –how

    • Location of the Services –where

Wsdl specification

WSDL Specification












Ingredients of wsdl

Ingredients of WSDL



Port Type


How to invoke

Input & Output

Formats & Protocols




How to encode






Main structure of wsdl

Main Structure of WSDL

<definitions namespace = “http://… ”>

<types> XML schema types </type>

<message> definition of a message </message>

<portType> a set of operations </portType>

<binding> communication protocols </binding>

<Services> a list of binding and ports </Services>




  • <types> define data types used in defining messages

  • XML Schema, DTD, and etc.

  • XML Schema must be supported by any vendor of WSDL conformant products


<schema targetNamespace=“http://example.com/stockquote.xsd”xmlns=“http://www.w3.org/2000/10/XMLSchema”>

<element name=“TradePriceRequest”>



<element name=“tickerSymbol” type=“string“

minOccur = “1” maxOccur=“10”/>

<element name = “payment”>



<element name = “account” type=“string” />

<element name = “creditcard” type=“string” />









Wsdl messages

WSDL Messages

  • A <message> element defines the data elements of an operation

  • Each message can be the input or output of an operation, and may consist of one or more parts

  • A part resembles a parameter of a function

<message name=“GetLastTradePriceInput”>

<part name=“body” element="TradePriceRequest"/>


<message name=“GetLastTradePriceOutput”>

<part name=“body” element=“TradePrice” />


Wsdl port types

WSDL PortTypes

  • The <portType> element is the most important WSDL element: it defines

    • a web Service

    • the operations that can be performed, and

    • the messages that are involved

  • The <port> defines the connection point to a web Services, an instance of <portType>

    • It can be compared to a function library (or a module, or a class) in a traditional programming language

    • Each operation can be compared to a function in a traditional programming language

Web service protocols web service specifications

<portType name=“StockQuotePortType”>

<operation name=“GetLastTradePrice”>

<input message=“tns:GetLastTradePriceInput” />

<output message=“tns:GetLastTradePriceOutput” />



Operation types

Operation Types

  • The request-response type is the most common operation type, but WSDL defines four types:

    • One-way: The operation can receive a message but will not return a response

    • Request-response: The operation can receive a request and will return a response

    • Solicit-response: The operation can send a request and will wait for a response

    • Notification: The operation can send a message but will not wait for a response

  • WSDL 1.2 adds: request – multiple response

Operation types1

Operation Types


  • <message name="newTermValues"><part name="term" type="xs:string"/><part name="value" type="xs:string"/></message>

  • <portType name="glossaryTerms"><operation name="setTerm"><input name="newTerm" message="newTermValues"/></operation></portType >


    <message name="getTermRequest"><part name="term" type="xs:string"/>


    <message name="getTermResponse"><part name="value" type="xs:string"/>


    <portType name="glossaryTerms"><operation name="getTerm"><input message="getTermRequest"/><output message="getTermResponse"/></operation>




  • Binding defines how message are transmitted, and the location of the Services

  • <binding> element has two attributes:

    • type: the port type

    • name: name of the binding

  • <soap:binding> has two attributes:

    • style: either “document” or “rpc”

    • transport: protocol to use, e.g., “http”

Binding 2 alternatives to soap over http

Binding (2) – Alternatives to SOAP over http

  • XML documents over HTTP

    • Less need to do this with commonplace SOAP toolkits

    • But these are still web services


    • Simpler than SOAP and longer history

    • Limitations on objects that can be exposed

    • With current SOAP toolkit support, little reason to use



<binding name="StockQuoteSoapBinding“type="tns:StockQuotePortType">

<soap:binding style=“document”

transport=“http://schemas.xmlsoap.org/soap/http” />

<operation name="GetLastTradePrice">

<soap:operationsoapAction=“http://example.com/GetLastTradePrice” />


<soap:body use=“literal” />



<soap:body use=“literal” />






<Services name=“StockQuoteServices”>


My first Services</documentation>

<port name=“StockQuotePort”binding=“tns:StockQuoteBinding”>

<soap:addresslocation=“http://example.com/stockquote” />



Summary of wsdl

Summary of WSDL

  • Types

  • Message

  • Operation

  • PortType

  • Binding

  • Port

  • Service

Web services publication and discovery

Web Services Publication and Discovery

Why do we need a web services registry

Why Do We Need a Web Services Registry

  • Web services are valuable because of standardized payloads and transport definitions

    • The value is creating a web service that is used by many clients

  • Can’t happen unless the services are advertised to multiple consumers

Web service protocols web service specifications


  • UDDI servers act as a directory of available services and service providers. SOAP can be used to query UDDI to find the locations of WSDL definitions of services, or the search can be performed through a user interface at design or development time.

  • Data structure specification describes what kind of data is stored in UDDI.

  • The programmer’s API specification contains how a UDDI registry can be accessed.

  • The replication specification contains descriptions of how registries replicate information among themselves.

Web service protocols web service specifications


  • Three basic functions

    • publish:how to register a web service

    • Search: how to find a specific web service

    • binding: How to connect to a web service

Core uddi entities

Core UDDI Entities



Interface tModel



Interface tModel







  • As a distributed computing architecture,Web Services are the most important implementation for SOA;

  • Web Services: Flexible machine-machine interaction;

  • XML is a powerful language to describe data. It’s construct rules is defined by XML Schema.

  • SOAP is a light weight replacement for complicated distributed object technology which we use to wrap Web Services message;

  • The function and interface of Web Services is open by WSDL and the interaction between Web Services is presented by BPEL;

  • Universal Description, Discovery, and Integration (UDDI) is a technical specification for describing, discovering, and integrating web Services.


A list of web service specifications. http://en.wikipedia.org/wiki/List_of_Web_service_specifications.

SOA & Webservices.http://www-900.ibm.com/developerWorks/cn/


WebServices. http://www.w3.org/2002/ws/

UeliWahli ,Thomas Kjaer…“WebSphere Version 6Web Services HandbookDevelopment&Deployment”,http://www.redbooks.ibm.com


Stan Kleijnen,SrikanthRaju.An Open Web Services Archiecture.NewYork:

ACM Press,2003


XML Schema. http://www.w3.org/TR/xmlschema11-1/

WSDL. http://www.w3.org/TR/wsdl

Tony Andrews, Francisco Curbera. Business Process Execution Language for Web Services Version 1.1.http://download.boulder.ibm.com/


The Stencil Group.” The Evolution of UDDI ,UDDI.org White Paper”





HP: http://keg.cs.tsinghua.edu.cn/persons/tj/

Arnet: http://jietang.arnetminer.org/



Uddi entities

UDDI Entities

  • businessEntity – provider of service

  • businessService – collection of related services

  • bindingTemplate- information necessary to use

  • tModel - “reusable concept” such as

    • Interface

    • Protocol used by web services

    • Category

  • publisherAssertion- relationship that business entity has with another businessEntity

  • Subscription – request to be informed of particular changes

Businessentity structure

businessEntity Structure

Businessentity identifying elements

businessEntity Identifying Elements

  • Uniquely identified by businessKey attribute

  • discoveryURLs

    • <discoveryURL useType=”businessEntity”>http://www.example.com?businessKey=uddi:example.com:registry:sales:53</discoveryURL>

      • Returns XML document of type businessEntity

    • <discoveryURL useType=”homepage”>    http://www.acmewidgets.com</discoveryURL>

  • name

    • Multiple names to do languages or abbreviations

    • <businessEntity . . . >

    •   ........

    •   <name xml:lang="ja">日本生花店</name>

    •   <name xml:lang="ja">ニッポンセイカテン</name>

    •   <name xml:lang="en">NIPPON FLOWERS </name>

    •   <name xml:lang="en">NF</name>

    •   .....

    • </businessEntity>

  • description

    • Multiple descriptions potentially in multiple languages with xml:lang

Businessentity contacts

businessEntity contacts


Businessentity identifiers and categories

businessEntity Identifiers and Categories

  • Optional IdentifierBag

    • <identifierBag>    <keyedReference      tModelKey=”uddi:uddi.org:ubr:identifier:dnb.com:d-u-n-s”      keyName=”SAP AG”

  •         keyValue=”31-626-8655” />

    • </identifierBag>

  • Optional CategoryBag

    • <categoryBag>  <keyedReference    tModelKey=”uddi:uddi.org:ubr:categorization:iso3166”    keyName=”California, USA”

    •     keyValue=”US-CA” />

    • </categoryBag>





Tmodelinstance details

tModelInstance Details





  • The “technical fingerprint”

    • tModel defines unique identifiers for interfaces and interface specifications

    • Once tModel is published service advertises compliance with the spec represented by including the correct tModelKey

  • Value sets

    • Categorization hierarchies

    • E.g. categoryBag and identifierBag have references to tModels with the system of values

  • Find qualifiers

    • find_businessuddi:uddi.org:findqualifier:sortbydateasc

Tmodel structure

tModel Structure

Tmodel structure1

tModel Structure

  • Exactly one non-empty name

  • Zero or more descriptions

  • Zero or more overviewDocs

    • useType=text

    • useType=wsdlInterface

  • identifierBag

    • Contains tModelKey which uniquely identifies tModel (inconsistent?)

    • Other logical identifiers

  • categoryBag

    • list of categories that describe specific aspects of the tModel

Uddi standard apis

UDDI Standard APIs

Uddi apis


  • Inquiry

  • Publication

  • Subscription

  • Security

  • Custody Transfer

  • Replication

Inquiry api patterns

Inquiry API Patterns

  • Browse

    • find_xx

  • Drill-down

    • Use browse then drill-down

    • get_xx

  • Invocation

    • Use browse and drilldown and get bindingTemplate

    • Invoke from bindingTemplate

Inquiry api functions

Inquiry API Functions

  • find_binding

  • find_business

  • find_relatedBusinesses

  • find_service

  • find_tModel

  • get_bindingDetail

  • get_businessDetail

  • get_operationalInfo

  • get_serviceDetail

  • get_tModelDetail

Public registries

Public Registries

  • IBM Public registry Registration: https://uddi.ibm.com/ubr/registry.html

  • inquiryURL= https://uddi.ibm.com/ubr/inquiryapi

  • publishURL= https://uddi.ibm.com/ubr/publishapi

  • Test registry Registration: https://uddi.ibm.com/testregistry/registry.html

  • inquiryURL= https://uddi.ibm.com/testregistry/inquiryapi publishURL= https://uddi.ibm.com/testregistry/publishapi

Public registries1

Public Registries

  • HP

  • Registration: http://uddi.hp.com

  • inquiryURL = http://uddi.hp.com/ubr/inquire

  • publishURL = https://uddi.hp.com/ubr/publish

  • Microsoft

  • Registration: http://uddi.rte.microsoft.com inquiryURL=http://uddi.rte.microsoft.com/inquire publishURL=https://uddi.rte.microsoft.com/publish

  • SAP

  • Registration: http://udditest.sap.com inquiryURL=http://uddi.sap.com/UDDI/api/inquiry/ publishURL=https://uddi.sap.com/UDDI/api/publish/

Searching for web services

Searching for Web Services

Publishing a web service

Publishing a Web Service

Connecting to uddi with net

Connecting to UDDI with .NET

public UddiConnectionInitializeConnection() {

string szInquiry = "http://test.uddi.microsoft.com/inquire"; string szPublish = "https://test.uddi.microsoft.com/publish"; string szExtension = "http://test.uddi.microsoft.com/extension.asmx";

string szUsername = null;

string szPassword = null;

UddiConnectionoConnection = null;

try {

oConnect = new UddiConnection(szInquiry, szPublish, szExtension, szUsername, szPassword);

System.Net.IWebProxyoProxy = System.Net.WebProxy("http://someproxy:80",true); oConnect.AutoGetAuthToken = true;

oConnect.HttpClient.Proxy = oProxy;

GetAuthTokenoGetToken = new GetAuthToken(szUsername, szPassword); oConnect.AuthInfo = oGetToken.Send(oConnect);


catch(InvalidUrlPassedExceptionoUddiEx) {

// Insert exception-handling code.

return null;


catch(UddiExceptionoUddiEx) {

// Insert exception-handling code.

return null;


return oConnect;


Finding businesses with net

Finding Businesses with .NET

using Microsoft.Uddi;


{// Create a connection to the UDDI node that is to be accessed.UddiConnectionmyConn = new UddiConnection("http://test.uddi.microsoft.com/inquire");// Create an object to find a business.FindBusinessfb = new FindBusiness("Fabrikam");// Send the prepared FindBusiness request over the connection.BusinessListbizList = fb.Send(myConn);// Report the summary result.Console.WriteLine("Found " + bizList.BusinessInfos.Count + " businesses");}catch (Microsoft.Uddi.UddiException e){ Console.WriteLine("UDDI error: " + e.Message); }catch (Exception gen){ Console.WriteLine("General exception: {0}", gen.Message);


Publishing with net

Publishing with .NET

  • UddiConnection myConn = new UddiConnection(InquireTextbox.Text,PublishTextBox.Text);

  • myConn.AuthenticationMode = AuthenticationMode.UddiAuthentication;

  • myConn.Username = UserTextbox.Text;

  • myConn.Password = PasswordTextbox.Text;

  • // Create a named business entity.

  • BusinessEntity myBiz = new BusinessEntity(BusinessNameTextbox.Text);

  • // Use business entity to create an object to save a business.

  • SaveBusiness sb = new SaveBusiness(myBiz);

  • // Send the prepared save business request.

  • BusinessDetail savedBiz = sb.Send(myConn);

  • ReturnBiz.Text= savedBiz.BusinessEntities[0].Names[0].Text;

  • ReturnKey.Text=savedBiz.BusinessEntities[0].BusinessKey;

Finding services with net

Finding Services with .NET

try {

UddiConnection conn = new UddiConnection("http://localhost/uddi/inquire.asmx");

FindService fs = new FindService(“holdem odds”);

ServiceList servList = fs.Send(conn);

// Display the service name and unique identifying key.

foreach (ServiceInfo servInfo in servList.ServiceInfos) { MessageBox.Show("Service: " + servInfo.Names[0].Text + " " + servInfo.ServiceKey);



catch (Microsoft.Uddi.UddiException ex) {

MessageBox.Show("UDDI Exception: " + ex.Message);


catch (Exception gen) {

MessageBox.Show("General Exception: " + gen.Message);


Mapping wsdl to uddi

Mapping WSDL to UDDI

  • UDDI technote (V2.0 in August 2003) regarding

    • How to take about WSDL objects and store them in UDDI equivalents

    • Enables queries on WSDL constituents (portTypes, operations, ports)



  • Login