Download Introduction to UDDI - Component-Based Software Development | SWE 645 and more Study notes Engineering in PDF only on Docsity!
Introduction to UDDI
Ye Wu
http://www.ise.gmu.edu/~wuye
SWE 645
Component-based Software Development
sources: Java Web Service Architecture, James McGoven and etc., Morgan Kaufmann, Ch 6, 2006-11-15 © Dr. Ye Wu 2
UDDI
U niversal D escription, D iscovery, and I ntegration (UDDI)
is a technical specification for describing, discovering, and
integrating web services.
- 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.
- Operator’s specification defines policies for security and
data management.
2006-11-15 © Dr. Ye Wu 3
Web Service Architecture
Service
Registry
Service
Consumer
Service
Provider
Discover Service Publish Service
Invoke Service
2006-11-15 © Dr. Ye Wu 4
UDDI Registries
UDDI registries contains information about businesses and the services these businesses offer.
- Public registries
- Private registries
2006-11-15 © Dr. Ye Wu 5
Public Registries
IBM, Microsoft, SAP, HP, … …
Microsoft, IBM, and SAP are discontinuing the UDDI Business Registry (UBR) project for Web services on January 12, 2006
"Since the fall of 2000, the UBR has been a significant asset for testing during the development of the three versions of the UDDI specifications and the vendor software based on it," IBM said in a statement.
While the shutdown indicates that the original intent of UDDI was unsuccessful, the specification itself has changed in purpose, said Jason Bloomberg, senior analyst at ZapThink.
http://www.infoworld.com/article/05/12/16/HNuddishut_1.html 2006-11-15 © Dr. Ye Wu 6
Private UDDI Registries
- Operate your own registry for testing purposes
- Establish your own registry of service for your own
organization
- Trust issue
- BEA - WebLogic Server UDDI Registry
- Oracle - OracleAS UDDI Registry
- IBM - WebSphere UDDI Registry
- Microsoft - Enterprise UDDI Services in Microsoft® Windows Server 2003
2006-11-15 © Dr. Ye Wu 7
UDDI Data Structure
- White pages: contains information about
businesses’ name, addresses, phone numbers, and so on.
- Yellow pages: contains business listings based on
the types of these businesses.
- Green pages: contains all services each business
offers, including all of the technical information involved in interacting with or using the service.
2006-11-15 © Dr. Ye Wu 8
UDDI Data Structure
- UDDI include 4 core types of information
- businessEntity
- businessService
- bindingTemplate
- tModel
2006-11-15 © Dr. Ye Wu 9
- Represents a technical specification in a UDDI
registry
- Unique identifier
- A pointer to a specification
2006-11-15 © Dr. Ye Wu 10
- Root of the UDDI data hierarchy
- Contains information about the business
- Name
- Address
- Phone-number
- Category information
- Services provided
2006-11-15 © Dr. Ye Wu 11
/
- Partition the data domain to improve the
efficiency and effectiveness of UDDI search.
- Predefined taxonomies
- UNSPSC – Universal Standard and Products Classification
- NAICS – North American Industry Classification System
- ISO3166 – Geographic Classification System
- Format
- Key – value pairs
- tModels
2006-11-15 © Dr. Ye Wu 12
- Contains information about a single webservice or a group of related web services. - Name - Description - bindingTemplate
2006-11-15 © Dr. Ye Wu 19
Publish Web Service
- Make connection
- Get an authentication token authInfo = proxy.get_authToken(userid, password).getAuthInfoString();
- Create a new businessEnity entry. BusinessEntity be = new BusinessEntity(); be.setDefaultNameString("Bill's Office Services", "en"); be.setDefaultDescriptionString("A business offering services around the office"); be.setBusinessKey(""); be.setContacts(contacts); be.setCategoryBag(cb); 2006-11-15 © Dr. Ye Wu 20
Publish Web Service
3. Create a new tModel entry.
TModel tm = new TModel(); tm.setName("Addressbook tModel"); tm.setTModelKey(""); OverviewDoc od = new OverviewDoc(); od.setOverviewURL("http://localhost:8080/.../...?WSDL"); tm.setOverviewDoc(od); … .. tm.setCategoryBag(cb); Vector entities = new Vector(); entities.addElement(tm); TModelDetail r = proxy.save_tModel(authInfo, entities);
2006-11-15 © Dr. Ye Wu 21
Publish Web Service
4. Create a new businessService entry.
BusinessService bs = new BusinessService(); bs.setDefaultNameString("Addressbook Service", "en"); bs.setBusinessKey(businessKey); bs.setServiceKey(""); Vector btv = new Vector(); BindingTemplates bts = new BindingTemplates(); bts.setBindingTemplateVector(btv); bs.setBindingTemplates(bts); … … cb.setKeyedReferenceVector(krv); bs.setCategoryBag(cb); 2006-11-15 © Dr. Ye Wu 22
Publish Web Service
- Create a new businessService entry.
// Save service
Vector entities = new Vector();
entities.addElement(bs);
ServiceDetail r = proxy.save_service(authInfo,
entities);
2006-11-15 © Dr. Ye Wu 23
Publish Web Service
- Create a bindingTemplate BindingTemplate bt = new BindingTemplate(); bt.setServiceKey(serviceKey); bt.setBindingKey(""); AccessPoint ap = new AccessPoint(); ap.setURLType("http"); ap.setText("http://localhost:8080/soap/servlet/rpcrouter"); bt.setAccessPoint(ap); OverviewDoc tmod = new OverviewDoc(); tmod.setOverviewURL("http://hermes.gmu.edu:9090/…Service.wsdl");
2006-11-15 © Dr. Ye Wu 24
Publish Web Service
- Create a bindingTemplate Vector entities = new Vector(); entities.addElement(bt); BindingDetail r = proxy.save_binding(authInfo, entities);
2006-11-15 © Dr. Ye Wu 25
Search Web Service by UDDI
- Make connection
- Add https protocol 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());
- Connect to UDDI registry proxy = new UDDIProxy(new URL(inquiryURL),null);
2006-11-15 © Dr. Ye Wu 26
Search Web Service by UDDI
2. Search the registry
Vector names = new Vector(); names.addElement(new Name("Bill's Office Services")); BusinessList list = proxy.find_business(names, null, null, null, null, null, 0); BusinessInfos infos = list.getBusinessInfos(); BusinessInfo info = (BusinessInfo) infos.getBusinessInfoVector().elementAt(0); String businessKey = info.getBusinessKey(); businessEntity = (BusinessEntity) proxy.get_businessDetail(businessKey) .getBusinessEntityVector().elementAt(0);
2006-11-15 © Dr. Ye Wu 27
Environment Setting
- Software to Install
- jUddi (http://ws.apache.org/juddi/index.html)
- UDDI4j (http://uddi4j.sourceforge.net/)
- UDDIBrowser (http://uddibrowser.org/)
2006-11-15 © Dr. Ye Wu 28
Environment Setting
- Install jUddi
- Unzip juddi-0.9rc4.zip
- Copy juddi.war to JBOSS_HOME/deploy
- Update your mysql-ds.xml or oracle-ds.xml <local-tx-datasource> <jndi-name>juddiDB</jndi-name> <connection-url>jdbc:mysql://localhost/juddi</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>juddi</user-name> juddi </local-tx-datasource>
- Execute the ddl under \juddi-0.9rc4\sql
2006-11-15 © Dr. Ye Wu 29
Environment Setting
- Add the following jar files to you class path.
- Uddi4j.jar
- Soap.jar
- Mail.jar
- Activation.jar