web service challenges who provides web services? how are they implemented? where are they provided?...

43
Web Web Service Service Challenges Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible? Searching and indexing are do not work today • how to find the right services at the right time? • we need solutions designed for tools and apps • our expectations have been lowered by the Internet experience today

Upload: branden-kendle

Post on 31-Mar-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

WebWeb Service ChallengesService Challenges• Who provides web services?• How are they implemented?• Where are they provided?• What is their behavior?• Is an application compatible?

• Searching and indexing are do not work today

• how to find the right services at the right time?• we need solutions designed for tools and apps• our expectations have been lowered by the Internet

experience today

Page 2: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

A “meta service” for locating web A “meta service” for locating web services by enabling robust services by enabling robust queries against rich metadataqueries against rich metadata

How would you define UDDI:How would you define UDDI:

Page 3: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

What is UDDI?What is UDDI? Universal Description Discovery and Integration

Industry-wide initiative supporting web services

Specifications Schemas for service description Schemas for business (service implementers) description

Developed on industry standards (XML, HTTP, TCP/IP, SOAP)

Applies equally to XML and non-XML web services

Implementation Public web service registry and development resources

Page 4: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Industry-Wide Project SupportIndustry-Wide Project Support

All major technology providers Global corporations Strong resource and product commitment Roadmap for transition to standards body

Unprecedented collaboration XML and Web Services recognized as core standards Competition on services built on a common model Technology, platform, and development language neutral

Page 5: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

What Problems Do We Solve?What Problems Do We Solve?An organization needs to An organization needs to create 400 electronic create 400 electronic relationships with relationships with partners, each with its partners, each with its own standards and own standards and protocolsprotocols

BroaderBroaderB2BB2B

A small business wants to A small business wants to be “plugged in” to every be “plugged in” to every marketplace in the world, marketplace in the world, but doesn’t know howbut doesn’t know how

SmarterSmarterSearchSearch

A B2B marketplace cannot A B2B marketplace cannot get catalog data for get catalog data for relevant suppliers in its relevant suppliers in its industry, along with industry, along with connections to shippers, connections to shippers, insurers, etc.insurers, etc.

Easier Easier AggregationAggregation

Describe Describe ServicesServices

Discover Discover ServicesServices

IntegrateIntegrateThemThemTogetherTogether

Provide a standards-based Provide a standards-based profile for all electronic profile for all electronic services that are provided. services that are provided. Includes web sites, other Includes web sites, other electronic resourceselectronic resources

Web ServiceWeb ServiceVisibilityVisibility

Publish for Publish for AccessibilityAccessibility

Page 6: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

How did this come about?How did this come about?

• Naturally “evolved”– Ariba and IBM collaboration

around B2B– IBM and Microsoft collaboration

around XML and SOAP– Microsoft and Ariba collaboration

around BizTalk and cXML• 6 months, ~50 meetings

Page 7: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Foundation for Web ServicesFoundation for Web Services

Ubiquitous Communications: InternetUbiquitous Communications: Internet

Universal Data Format:Universal Data Format: XMLXML

Service Interactions:Service Interactions: SOAPSOAP

Formal Service Descriptions:Formal Service Descriptions: WSDLWSDL

Broad Industry Support, Simple ProcessBroad Industry Support, Simple Process

Publish and Discover Services:Publish and Discover Services: UDDIUDDI

Page 8: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Again What is UDDI?Again What is UDDI?• A project to speed interoperability and adoption for 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• Universal Description, Discovery, and Integration

Page 9: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Base UDDI ArchitectureBase UDDI Architecture

A UDDI information model is composed of instances of the following entity types:

·         businessEntity: Describes a business or other organization that typically provides Web services.

·         businessService: Describes a collection of related Web services offered by an organization described by a businessEntity.

·         bindingTemplate: Describes the technical information necessary to use a particular Web service.

·         tModel: Describes a “technical model” representing a reusable concept, such as a Web service type, a protocol used by Web services, or a category system.

·         publisherAssertion: Describes, in the view of one businessEntity, the relationship that the businessEntity has with another  businessEntity

·         subscription: Describes a standing request to keep track of changes to the entities described by the subscription.

Page 10: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

AThe set of Web services supporting at least one of the Node API sets is referred to as a UDDI node.

A UDDI node has these defining characteristics:1.       A UDDI node supports interaction with UDDI data through one or more UDDI API sets2.       A UDDI node is a member of exactly one UDDI registry.3.       A UDDI node conceptually has access to and manipulates a complete logical copy of the UDDI data managed by the registry of which it is a part. Moreover, it is this data which is manipulated by any query and publish APIs supported by the node.

Typically, UDDI replication occurs between UDDI nodes which reside on different systems in order to manifest this logical copy in the node.The physical realization of a UDDI node is not mandated by this specification.

UDDI Nodes

Page 11: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

One or more UDDI nodes may be combined to form a UDDI Registry.

A UDDI Registry has these defining characteristics.

1.A registry is comprised of one or more UDDI nodes.

2.The nodes of a registry collectively manage a well-defined set of UDDI data. Typically, this is supported by the use of UDDI replication between the nodes in the registry which reside on different systems.

3.A registry MUST make a policy decision for each policy decision point. It MAY choose to delegate policy decisions to nodes. See Chapter 9 Policy for details.

P.S The physical realization of a UDDI Registry is not mandated by this specification.

UDDI Registries

Page 12: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Technical Models, or tModels for short, are used in UDDI to represent unique concepts or constructs which provide a structure that allows re-use and, thus, standardization within a software framework.

tModels exist outside the parent-child containment relationships between the businessEntity, businessService and bindingTemplate structures.  

Examples of tModels that enable the interoperability of Web services include those based on Web Service Description Language (WSDL), XML Schema Definition (XSD), and other documents that outline and specify the contract and behavior

tModels can be used to promote the interoperability between software systems.

A UDDI tModel simply contains the addresses where those documents can be found.  A tModel, however, contains more than just URLs; it also stores metadata about the technical documents and an entity key that identifies that tModel.

Technical Models (tModels)

Page 13: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Technical Models, or tModels for short, are used in UDDI to represent unique concepts or constructs which provide a structure that allows re-use and, thus, standardization within a software framework.

tModels exist outside the parent-child containment relationships between the businessEntity, businessService and bindingTemplate structures.  

Examples of tModels that enable the interoperability of Web services include those based on Web Service Description Language (WSDL), XML Schema Definition (XSD), and other documents that outline and specify the contract and behavior

tModels can be used to promote the interoperability between software systems.

A UDDI tModel simply contains the addresses where those documents can be found.  A tModel, however, contains more than just URLs; it also stores metadata about the technical documents and an entity key that identifies that tModel.

Technical Models (tModels)

Page 14: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Technical Models, or tModels for short, are used in UDDI to represent unique concepts or constructs which provide a structure that allows re-use and, thus, standardization within a software framework.

tModels exist outside the parent-child containment relationships between the businessEntity, businessService and bindingTemplate structures.  

Examples of tModels that enable the interoperability of Web services include those based on Web Service Description Language (WSDL), XML Schema Definition (XSD), and other documents that outline and specify the contract and behavior

tModels can be used to promote the interoperability between software systems.

A UDDI tModel simply contains the addresses where those documents can be found.  A tModel, however, contains more than just URLs; it also stores metadata about the technical documents and an entity key that identifies that tModel.

Technical Models (tModels)

Page 15: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Technical Models, or tModels for short, are used in UDDI to represent unique concepts or constructs which provide a structure that allows re-use and, thus, standardization within a software framework.

tModels exist outside the parent-child containment relationships between the businessEntity, businessService and bindingTemplate structures.  

Examples of tModels that enable the interoperability of Web services include those based on Web Service Description Language (WSDL), XML Schema Definition (XSD), and other documents that outline and specify the contract and behavior

tModels can be used to promote the interoperability between software systems.

A UDDI tModel simply contains the addresses where those documents can be found.  A tModel, however, contains more than just URLs; it also stores metadata about the technical documents and an entity key that identifies that tModel.

Technical Models (tModels)

Page 16: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Technical Models, or tModels for short, are used in UDDI to represent unique concepts or constructs which provide a structure that allows re-use and, thus, standardization within a software framework.

tModels exist outside the parent-child containment relationships between the businessEntity, businessService and bindingTemplate structures.  

Examples of tModels that enable the interoperability of Web services include those based on Web Service Description Language (WSDL), XML Schema Definition (XSD), and other documents that outline and specify the contract and behavior

tModels can be used to promote the interoperability between software systems.

A UDDI tModel simply contains the addresses where those documents can be found.  A tModel, however, contains more than just URLs; it also stores metadata about the technical documents and an entity key that identifies that tModel.

Technical Models (tModels)

Page 17: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

UDDI v1 ImplementationUDDI v1 Implementation

UDDI Business RegistryProgrammatic descriptions of web servicesProgrammatic descriptions of businesses and the services they support Programming model, schema, and platform agnosticUses XML, HTTP, and SOAPFree on the Internet

Manufacturers

Flower Shops

Marketplaces

Page 18: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

How UDDI v1 WorksHow UDDI v1 Works

UDDI Business Registry

3. UBR assigns a programmatically unique identifier to each service and business registration

Marketplaces, search engines, and business apps query the registry to discover services at other companies

4.

Segrvice TypeReistrations

SW companies, standards bodies, and programmers populate the registry withdescriptions of different types of services

1.

BusinessRegistrationsBusinesses

populate the registry withdescriptions of the services they support

2.

Business uses this data to facilitate easier integration with each other over the Web

5.

Page 19: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

UDDI Registry EntriesUDDI Registry Entries Standards Bodies, Standards Bodies,

Agencies, Programmers, Agencies, Programmers, Publishers register Publishers register specifications for their specifications for their Service TypesService Types

Service providers register Service providers register precise information about precise information about themselves and their Web themselves and their Web servicesservices

Page 20: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

• Business name• General business description

– Any number of languages• Contact info

– Names, phone numbers, fax numbers, web sites, etc.

• Known identifiers

– List of unique identifiers for a business

D-U-N-S, Thomas, domain name, stock ticker symbol, other

Page 21: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

• Business categories

– 3 base taxonomies in V1• Industry: NAICS (Industry codes - US Govt.)• Product/Services: UNSPSC (ECCMA)• Location: Geographical taxonomy (ISO 3166)• …easy extension in upcoming releases

Page 22: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

• New set of information businesses use to describe how to “do e-commerce” with them

– Nested model• Business process (functional)• Service specifications (technical)• Binding information (implementation)

– Programming/platform/implementation agnostic

– Services can also be categorized

Page 23: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Public Registry OperationPublic Registry Operation

IBM

HP (planned)

Microsoftother

other

• Peer registry nodes (websites)• Information registered

with any node• Registrations replicated

on a daily basis• Complete set of

“registered” recordsavailable at all nodes

• Common set ofSOAP APIs supportedby all nodes

• Compliance enforced by business contract

• All technologies applied

– Interoperability verified constantly UDDI.org

queriesqueries

ApplicationsApplicationsApplicationsApplications

MarketplacesMarketplacesMarketplacesMarketplaces

End UsersEnd UsersEnd UsersEnd Users

DevelopersDevelopersDevelopersDevelopers

Page 24: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Service Type RegistrationService Type Registration• Pointer to the namespace where service type is described

– What programmers read 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

Page 25: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

businessEntitybusinessKeynameURLdescriptioncontactsbusinessServicesidentifierBagcategoryBag

PhoneAddressEmail

Contact

businessServiceKeyNameDescriptionBindingTemplates

PhoneAddressEmail

Contact

businessServiceserviceKeytModelKeyNameDescriptionBindingTemplates

keyedReferencetModelKeykeyNamekeyValue

keyedReferencetModelKeykeyNamekeyValue

keyedReferencetModelKeykeyNamekeyValue

keyedReferencetModelKeykeyNamekeyValue

Business RegistrationBusiness Registration

• XML document• Created by end-user

company (or on their behalf)

• Can have multiple service listings

• Can have multiple taxonomy listings

Page 26: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Example of a RegistrationExample of a Registration

businessEntityTB993… Harbour Metalswww.harbourmetals.co.au“Serving Inner Sydney Harbour for …contactsbusinessServicesidentifierBagcategoryBag

872-68914281 King’s Blvd, Sydney, [email protected]

Peter Smythe

businessServiceKeyNameDescriptionBindingTemplates

businessService

23T701e54683nf…Online catalog“Website where you can …BindingTemplates

BindingTemplate5E2D412E5-44EE-…http://www.sydneynet/harbour…tModelInstanceDetails

tModelInstanceInfo

4453D6FC-223C-3ED0…

http://www.rosetta.net/catalogPIP

keyedReference

DFE-2B…DUNS45231

keyedReference

EE123…NAICS02417

tModelKeys

Page 27: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Registry APIs (SOAP Messages)Registry APIs (SOAP Messages)

• 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

Page 28: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

IBM

Ariba

Microsoftother

other

Now look at that again:Registry Now look at that again:Registry OperationOperation

• Peer nodes (websites)• Companies register

with any node• Registrations replicated

on a daily basis• Complete set of

“registered” recordsavailable at all nodes

• Common set ofSOAP APIs supportedby all nodes

• Compliance enforced bybusiness contract

UDDI.org

queries

Page 29: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

The programmer’s API ImplementationThe programmer’s API Implementation

•The Universal Description, Discovery, and Integration (UDDI) Service is up and running at Microsoft, IBM, and Ariba.

•This is an online Web Service that you can use from your applications to dynamically discover other online services, all neatly packaged in a simple XML interface. Following are the three URLs:

http://uddi.microsoft.com/inquire http://uddi.ariba.com/UDDIProcessor.aw/ad/process

http://www-3.ibm.com/services/uddi/inquiryapi

•These are the UDDI entry points for “INQUIRIES”. The entry points for updates are different and are typically HTTPS addresses for security reasons.

Here is the deal!

Page 30: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

The four core types of data structures that are specified by the UDDI API Schema and their relationships are shown here

Page 31: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

businessEntity Structure

Each businessEntity entity contains descriptive information about a business or organization and, through its contained businessService entities, information about the services that it offers

Page 32: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

What XML Do You POST? What XML Do You POST? <?xml version='1.0' encoding='UTF-8'?> <Envelope xmlns='http://schemas.xmlsoap.org/soap/envelope/'> <Body>…</Body> </Envelope>

The contents of the <Body> element can be any query from the uddi schema. For example, the following query, when placed inside the <Body> of the SOAP envelope returns the details on Microsoft:

<find_business generic="1.0" xmlns="urn:uddi-org:api"> <name>Microsoft</name> </find_business>

Page 33: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

From a JScript file or HTML page the XMLHTTP control provided by MSXML can be used as follows:

How Do You Post the XML?How Do You Post the XML?

http = new ActiveXObject("Microsoft.XMLHTTP");http.open("POST", url, false);http.setRequestHeader("Accept","text/xml");http.setRequestHeader("Cache-Control","no-cache");http.setRequestHeader("SOAPAction",'""');http.send(msg);

Page 34: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

What Do You Get Back?What Do You Get Back?In this case you get a detailed listing of <businessInfo> elements currently registered for Microsoft, which includes information about the UDDI service itself.

<businessList generic="1.0" operator="Microsoft Corporation" truncated="false" xmlns="urn:uddi-org:api"> <businessInfos> <businessInfo businessKey="0076B468-EB27-42E5-AC09-9955CFF462A3"> <name>Microsoft Corporation</name> <description xml:lang="en">Empowering people through great software - any time, any place and on any device is Microsofts vision. As the worldwide leader in software for personal and business computing, we strive to produce innovative products and services that meet our customer's </description> <serviceInfos> <serviceInfo businessKey="0076B468-EB27-42E5-AC09-9955CFF462A3" serviceKey="8BF2F51F-8ED4-43FE-B665-38D8205D1333"> <name>Electronic Business Integration Services</name> </serviceInfo> <serviceInfo businessKey="0076B468-EB27-42E5-AC09-9955CFF462A3" serviceKey="D2BC296A-723B-4C45-9ED4-494F9E53F1D1"> <name>UDDI Web Services</name> </serviceInfo> </serviceInfos> </businessInfo> </businessInfos> </businessList>

Page 35: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

How how to drill in and get information about How how to drill in and get information about one specific service one specific service

For example, let’s drill in on the UDDI Web Service. You can take the businessKey from the above results and use <find_service> to look up a service by name:

<find_service generic='1.0' xmlns='urn:uddi-org:api' businessKey='0076B468-EB27-42E5-AC09-9955CFF462A3'> <name>UDDI Web Services</name> </find_service>

This returns the information about this service:

<serviceList generic="1.0" operator="Microsoft Corporation" truncated="false" xmlns="urn:uddi-org:api"> <serviceInfos> <serviceInfo businessKey="0076B468-EB27-42E5-AC09-9955CFF462A3" serviceKey="D2BC296A-723B-4C45-9ED4-494F9E53F1D1"> <name>UDDI Web Services</name> </serviceInfo> </serviceInfos> </serviceList>

Page 36: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Then you can use the serviceKey to get the details about this particular service:Then you can use the serviceKey to get the details about this particular service:

<get_serviceDetail generic='1.0' xmlns='urn:uddi-org:api'> <serviceKey>D2BC296A-723B-4C45-9ED4-494F9E53F1D1</serviceKey> </get_serviceDetail>

This returns the following <bindingTemplates>:

<serviceDetail generic="1.0" operator="Microsoft Corporation" truncated="false" xmlns="urn:uddi-org:api"> <businessService businessKey="0076B468-EB27-42E5-AC09-9955CFF462A3" serviceKey="D2BC296A-723B-4C45-9ED4-494F9E53F1D1"> <name>UDDI Web Services</name> <description xml:lang="en">UDDI SOAP/XML message-based programmatic web service interfaces.</description> <bindingTemplate bindingKey="A9CAFBE4-11C6-4BFE-90F5-595970D3DE24" serviceKey="D2BC296A-723B-4C45-9ED4-494F9E53F1D1"> <description xml:lang="en">Production UDDI server, Inquiry interface</description> <accessPoint URLType="http">http://uddi.microsoft.com/inquire</accessPoint> <tModelInstanceDetails> <tModelInstanceInfo tModelKey="uuid:4CD7E4BC-648B-426D-9936-443EAAC8AE23"> <description xml:lang="en">UDDI SOAP Inquiry Interface</description> </tModelInstanceInfo> </tModelInstanceDetails> </bindingTemplate><categoryBag> <keyedReference keyName="KEYWORD" keyValue="API" tModelKey="uuid:A035A07C-F362-44DD-8F95-E2B134BF43B4"></keyedReference> <keyedReference keyName="KEYWORD" keyValue="SOAP" tModelKey="uuid:A035A07C-F362-44DD-8F95-E2B134BF43B4"></keyedReference> <keyedReference keyName="KEYWORD" keyValue="XML" tModelKey="uuid:A035A07C-F362-44DD-8F95-E2B134BF43B4"></keyedReference> </categoryBag> </businessService> </serviceDetail>

Page 37: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

This diagram illustrates several models of registry interaction enabled by the UDDI 3 specification. Through mechanisms like publish/subscribe and replication among peer nodes, information in UDDI servers can be fully public, semiprivate, or fully private. (Source: uddi.org)

Page 38: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

https://uddi.ibm.com/beta/registry.html

Practical Examples of UDDI registries

Page 39: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Practical Example from IBMPractical Example from IBMhttp://www-106.ibm.com/developerworks/library/ws-uddhttp://www-106.ibm.com/developerworks/library/ws-uddi4j.htmli4j.html

UDDIProxy proxy = new UDDIProxy();

proxy.setInquiryURL("http://www-3.ibm.com/services/uddi/ testregistry/inquiryapi");

proxy.setPublishURL("https://www-3.ibm.com/services/uddi/ testregistry/protect/publishapi");

Code fragment for creating a UDDIProxy

Page 40: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

FindBusinessExample.java

BusinessList bl = proxy.find_business("S", null, 0);

Code fragment to Find a business in Code fragment to Find a business in the UDDI registrythe UDDI registry

Once we have the list of businesses that match our search criteria, this code iterates through the list and prints the names of all the businesses that match:

Vector businessInfoVector = bl.getBusinessInfos().getBusinessInfoVector();

for (int i = 0; i < businessInfoVector.size(); i++)

{

BusinessInfo businessInfo = (BusinessInfo)businessInfoVector.elementAt(i);

System.out.println(businessInfo.getNameString());

}

Page 41: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Publish a business listingPublish a business listing

SaveBusinessExample.javaUDDIProxysetPublishURL

AuthToken token = proxy.get_authToken("userid", "password");

The next step is to defining the business name

Vector entities = new Vector();

BusinessEntity be = new BusinessEntity("");

be.setName("Sample business");

entities.addElement(be);

BusinessDetail bd = proxy.save_business(token.getAuthInfoString(), entities);

To verify that our data was published to the registry successfully, print the data we received from the save_business method

Vector businessEntities = bd.getBusinessEntityVector();

BusinessEntity returnedBusinessEntity = (BusinessEntity)(businessEntities.elementAt(0));

System.out.println("Returned businessKey:" + returnedBusinessEntity.getBusinessKey());

Page 42: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

Unpublish (delete) a business listingUnpublish (delete) a business listing

DeleteBusinessExample.javaBusinessEntity BusinessList bl = proxy.find_business("Sample business", null, 0);

Now that I have the list of businesses that match, I'll attempt to delete each one

Vector businessInfoVector = bl.getBusinessInfos().getBusinessInfoVector();

for (int i = 0; i < businessInfoVector.size(); i++) {

BusinessInfo bi = (BusinessInfo)businessInfoVector.elementAt(i); System.out.println("Found business key:" + bi.getBusinessKey());

DispositionReport dr = proxy.delete_business(token.getAuthInfoString(), bi.getBusinessKey());

if (dr.success()) {

System.out.println("Business successfully deleted");

}

Else

// handle error case

Page 43: Web Service Challenges Who provides web services? How are they implemented? Where are they provided? What is their behavior? Is an application compatible?

More InformationMore Information• UDDI Resources

– http://www.uddi.org– http://uddi.microsoft.com– http://www-3.ibm.com/services/uddi– Public discussions and mailing lists at

www.yahoogroups.com

• For DevelopersSOAP/Web Services SDK

msdn.microsoft.com/xml/general/soap1and2.aspVisual Basic UDDI SDK

www.microsoft.com/downloads/release.asp?ReleaseID=24822

IBM AlphaWorks Web Services Toolkithttp://www.alphaworks.ibm.com/tech/webservicestoolkit