2. The topics we have already gone
through :
What Are Web Services ?
History
Other Concerns
Java And Web Services
Application Scenarios
Business To Business
Enterprise Application Integration
3. Contents
Implementation Scenarios
1. Simple Services
2. Composite Services
3. Middleware Service
4. Service Bus
Benefits Of Web Services
A Word About Standards
Summary
4. 1.IMPLEMENTATION SCENARIOS
Since a Web service can be developed on many different types of platforms, it can follow many
different implementation models.
The implementation model it uses depends on the problem it needs to solve and the platforms
available to create it.
The model for Web service implementations can be grouped into four types:
1. simple service,
2. composite service,
3. middleware service,
4. and service bus.
5. • Extensions within a UDDI registry are usually associated with one or
more tModels that hold reference to the extension.
• The tModel in this scenario indicates that it represents an extension to
one or more UDDI APIs. By using tModels, clients can discover
extensions to the core UDDI API. An example is shown below:
<keyedReference keyName="uddi-org:derivedFrom:v2_inquiry"
keyValue="uddi:uddi.org:v2_inquiry"
tModelKey="uddi:uddi.org:categorization:derivedFrom"/>
6. Flute Bank has decided to take advantage of the extension
capabilities of UDDI to add supporting documentation as
part of the UDDI publisher Assertion data structure.
The bank has added a discovery URL element to the
publisher Assertion structure that will contain a URL to the
business agreements and licensing terms agreed upon
between Flute Bank and its partners.
9. UDDI4J
UDDI4J is a Java client API used to access a UDDI registry.
UDDI4J objects and methods are used to build a request message
in SOAP format that is sent to the registry.
UDDI4J was originally developed by IBM as an open source
undertaking and has the endorsement of HP, SAP, and others.
UDDI4J contains APIs that allows you to publish, find, and bind to a
Web service.
Because UDDI4J is open source, it comes with source code,
JavaDoc, and several sample applications. It contains multiple APIs
but the one most frequently used is the UDDIProxy class.
10. How UDDI Proxy class interacts with a
registry:
UDDIProxy proxy = new UDDIProxy();
proxy.setInquiryURL("http://www.flutebank.com/uddi/test/inquiryapi");
proxy.setPublishURL("https://www.flutebank.com/uddi/test/publishapi");
11. The code for changing providers
The publish URL can use protocols other than SSL for publication as long as it is supported by
a valid Java security provider (JSSE). As you may be aware, security providers are
configured in the java.security configuration file or, alternatively, can be done at runtime.
The code for changing providers is simple:
System.setProperty("java.protocol.handler.pkgs"," com.sun.net.ssl.internal.www
.protocol");
Java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
12. System Properties Supported by
UDDI4J
System Properties Supported by UDDI4J
Property Description
http.proxyHost The hostname of the network proxy server.
http.proxyPort The port number used by the network proxy server. This defaults to port 80.
https.proxyHost he hostname of the network proxy server that supports SSL. This is usually the
same server as HTTP.
https.proxyPort The port number used by the network proxy server for SSL. This defaults to port
443.
socksProxy.Host The hostname of the network proxy server that supports Socks-based proxies.
socksProxy.Port The port number used by the network proxy server.
13. A user who wanted to find all businesses that meet a specified criterion, such as
companies that start with the name "Flute," would use the find_business method of
the proxy similar to this:
BusinessList bl = proxy.find_business("Flute", null, 0);
The find_business method has three parameters:
The first contains the search string, the second points to an instance of a
FindQualifiers object, for which we are specifying null, and the third is the number
of matches to return.
Zero specifies that we should return all matches. For advanced searching, you can
use the FindQualifiers object to include searching on business categories,
identifiers, and tModels.
The BusinessList object is a collection that contains all businesses that match the
search criteria.
14. Let us look at a simple example that specifies the name of the business and the
operator:
AuthToken token = proxy.get_authToken("uid"," pass");
Vector entityVector = new Vector();
BusinessEntity be = new BusinessEntity("");
be.setName("Flute Bank");
be.setOperator("Administrator");
entityVector.addElement(be);
BusinessDetail bd = proxy.save_business(token.getAuthInfoString(), entityVector);
15. 2.Creating a new business assertion
// Create a vector of names
Vector names = new Vector();
names.add(new Name("Flute Bank Biche")));
// Let's make search case sensitive
FindQualifiers findQualifiers = new FindQualifiers
Vector qualifier = new Vector();
qualifier.add(new FindQualifier("caseSensitiveMatch"));
findQualifiers.setFindQualifierVector(qualifier);
16. // Search for specified business and limit result to 10
BusinessList businessList = proxy.find_business(names, null, null, null, null,
findQualifiers, 10);
Vector businessInfoVector =
businessList.getBusinessInfos().getBusinessInfoVector();
// Delete any businesses returned from the search
for (int ii = 0; ii < businessInfoVector.size(); ii++) {
BusinessInfo bi = (BusinessInfo)businessInfoVector.elementAt(ii);
DispositionReport dr = proxy.delete_business(token.getAuthInfoString(),
bi.getBusinessKey());
if (dr.success()) {
System.out.println("Business Deleted");
} else
System.out.println("Error Number: "+ dr.getErrno() +
"n Error Code: "+ dr.getErrCode() +
"n Error Text: "+ dr.getErrInfoText());
}
}
17. 3.Creating a new publisher assertion
Vector descriptionVector = businessInfo.getDescriptionVector();
String businessDescription = "";
String defaultDescription = "";
for (int ii = 0; ii < descriptionVector.size(); ii++) {
Description description = (Description)descriptionVector.elementAt(ii);
if (description.getLang().compareToIgnoreCase("en-zh") == 0) {
businessDescription = description.getText();
break;
}
18. // More than likely a business will have an English description.
// Use this as default
if (description.getLang().compareToIgnoreCase("en-us") == 0) {
defaultDescription = description.getText();
}
// If none in Chinese, then use default
if (businessDescription == "") {
businessDescription = defaultDescription;
}
// Convert to appropriate character set
businessDescription = new String(businessDescription.getBytes("ISO-
8859-1")," UTF-8);
19. Private UDDI Registries
Many organizations may not use external Web services for years to come.
Instead, they will use Web services for providing integration between legacy systems, customer
relationship management applications, and other internal systems.
In this scenario, it makes sense for an enterprise to consider implementing its own private UDDI
registry.
Having your own private registry brings many other benefits.
Sometimes it is advisable to restrict who is allowed to view service description information,
especially for sensitive services.
The organization can not only control who publishes information but can also require
authentication.
Private UDDI registry implementations are available from BEA, IONA, Microsoft, Systinet, and the
Mind Electric.
20. A private UDDI registry can be further
extended to support the following business
scenarios :
a) Marketplace registries
b) Portal registries
c) Enterprise application integration
registries
21. a. Marketplace registries
Marketplace registries are hosted by industry consortiums that collaborate and compete in a
particular industry vertical.
Many businesses are cooperating and forming consortiums that allow them to conduct business
more easily.
Several examples in the market exist today where a marketplace registry would be useful.
The Big Three automakers—Ford, General Motors, and Daimler/Chrysler—might want to unify
their purchasing power on commodity parts.
22. b. Portal Registries
Flute Bank currently maintains a presence on the World Wide Web at
www.flutebank.com.
The bank has also decided to maintain a presence on the semantic web by exposing its
private UDDI registry at www.flutebank.com/services/uddi. It uses the portal metaphor.
Flute Bank has registered itself in multiple public registries. It also populated the
discoveryURL element in its businessEntity registration with the location of its private UDDI
registry.
A partial businessEntity registration example is shown below:
24. c. Enterprise Application Integration
Registries
Enterprise Application Integration registries are used in the same manner as partner registries, except that
they contain services available from other departments or divisions within an organization.
Considerations
Here are some of the recommendations and considerations an architect of a Web services initiative
should consider before implementing an in-house registry:
1. The vast majority of Web services applications will not use a public registry.
2. A private registry makes sense for large organizations, such as the Fortune 500, where the number of
services created are used across the enterprise and/ or divisional boundaries.
3. A private registry makes little sense for a small IT shop, where the number of services will be small
and/or used by a few applications.
25. UDDI Futures
UDDI Version 3.0 was released in July 2002. Future versions of UDDI will be built on the foundation of
prior versions and incorporate many enhancement requests, including additional security
functionality, advanced WSDL support, multiregistry topologies, and a new subscription API.
i. Digital Signatures
ii. Human-Friendly Keys
iii. Subscriptions, etc;
26. Summary
In this chapter, we looked at different UDDI considerations for implementing Web services,
including
Discovering Web services
Categorizing services
Business entity relationships
Using UDDI SOAP interfaces
UDDI and SOAP/WSDL relationships
Publishing WSDL service interfaces in UDDI
Extending a UDDI registry
UDDI4J
Private UDDI registries