UDDI: an XML Web service

Source: Internet
Author: User
Tags html page interface soap version uuid web services xmlns access
Web|xml

UDDI Query Example (requires Internet Explorer 5.x)
Universal Description, Discovery, and Integration (UDDI) services are currently available to run directly at Microsoft, IBM, and Ariba. This is an online WEB service that you can use to dynamically discover other online services in your application. All of this service is cleverly packaged in a simple XML interface.

For experienced XML readers, passing XML between a client application and a middle-tier server is nothing new. We've been doing this since 1998. However, we are also pleased to see the industry developing other services in this direction that are as useful as UDDI.

So let's focus on the basic facts. What you really need to know is the URL to which you can post the XML. After trying, we found the following three URLs:

Http://uddi.microsoft.com/inquire
Http://uddi.ariba.com/UDDIProcessor.aw/ad/process
Http://www-3.ibm.com/services/uddi/inquiryapi
They are UDDI entry points for "queries." The entry points for updates are not the same as they are, and the HTTPS address is usually used for security reasons.

What kind of XML is posted?
First, the XML must be UTF-8 (carefully simplified by the UDDI project) and must be wrapped in a SOAP envelope. The SOAP envelope looks as follows:

<?xml version= ' 1.0 ' encoding= ' UTF-8 '?>
<envelope xmlns= ' http://schemas.xmlsoap.org/soap/envelope/' >
<Body>?lt;/Body>
</Envelope>

The content of the element can be any query from the UDDI Architecture (English). For example, the following query, when placed in a SOAP envelope, returns detailed information about Microsoft:

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

Note: We switch the namespace from the SOAP namespace to the "Urn:uddi-org:api" namespace. There are many other things you can do in a find_business query.

How do I post XML?
You can use the XMLHTTP control provided by MSXML in a JScript file or HTML page, as follows:

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);

In this case, I decided to be a good SOAP citizen, so I set soapaction in the HTTP header. Because every time I need dynamic results, I also decide to accept only text/xml results and turn off all caches. Of course, in the attached sample code, I do this asynchronously through the ready state change callback.

What is returned?
Of course it's XML. In this case, you get a detailed list of the <businessInfo> elements currently registered for Microsoft, including information about the UDDI services 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" > Gives strength to excellent software-anytime, anywhere, in any
Device-This is Microsoft's goal. As
The world's leading individual and business software vendors, we are committed to
Provide innovative products and services to meet the needs of our customers </description>
<serviceInfos>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "1FFE1F71-2AF3-45FB-B788-09AF7FF151A4" >
<name> Intelligent Search Web Services </name>
</serviceInfo>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "8bf2f51f-8ed4-43fe-b665-38d8205d1333" >
<name> e-Commerce Integrated Services </name>
</serviceInfo>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "611c5867-384e-4ffd-b49c-28f93a7b4f9b" >
<name> Volume Licensing Selector </name>
</serviceInfo>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "5DE3CE59-923E-42D3-B7FB-34FC3C3CBC16" >
<name>Technet</name>
</serviceInfo>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "24e553c3-7e3e-484a-8eca-80e0d0b4a91f" >
<name>microsoft Developer Network </name>
</serviceInfo>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "77dd86e5-cd70-4219-a28c-37231eaf3901" >
<name> Online Shopping </name>
</serviceInfo>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "0860e130-d4af-4bd5-9f5c-d7f6fa4b1ad8" >
<name> Home </name>
</serviceInfo>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "D2BC296A-723B-4C45-9ED4-494F9E53F1D1" >
<name>uddi Web Services </name>
</serviceInfo>
<serviceinfo businesskey= "0076b468-eb27-42e5-ac09-9955cff462a3"
servicekey= "a8e4999a-21a3-47fa-802e-ee50a88b266f" >
<name>uddi Web site </name>
</serviceInfo>
</serviceInfos>
</businessInfo>
</businessInfos>
</businessList>

Here, you can repeatedly query and get information about a particular service. For example, let's query the UDDI Web service over and over again. You can get businesskey from the results above and use <find_service> to find 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 will return 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>

You can then use Servicekey to obtain more information about this service:

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

This will return 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" > A programmable Web Service interface based on UDDI soap/xml messages. </description>
<bindingTemplates>
<bindingtemplate bindingkey= "313c2bf0-021d-405c-8149-25fd969f7f0b"
servicekey= "D2BC296A-723B-4C45-9ED4-494F9E53F1D1" >
<description xml:lang= "en" > Products UDDI server, publishing interface </description>
<accesspoint urltype= "https" >https://uddi.microsoft.com/publish</accessPoint>
<tModelInstanceDetails>
<tmodelinstanceinfo tmodelkey= "Uuid:64c756d1-3374-4e00-ae83-ee12e38fae63" >
<description xml:lang= "en" >uddi SOAP Publishing Interface </description>
</tModelInstanceInfo>
</tModelInstanceDetails>
</bindingTemplate>
<bindingtemplate bindingkey= "A9cafbe4-11c6-4bfe-90f5-595970d3de24"
servicekey= "D2BC296A-723B-4C45-9ED4-494F9E53F1D1" >
<description xml:lang= "en" > Products UDDI Server, query 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 query Interface </description>
</tModelInstanceInfo>
</tModelInstanceDetails>
</bindingTemplate>
<bindingtemplate bindingkey= "3fe6c834-293e-4341-af6e-41dc68949764"
servicekey= "D2BC296A-723B-4C45-9ED4-494F9E53F1D1" >
<description xml:lang= "en" > Test UDDI Server, publishing interface </description>
<accesspoint urltype= "https" >https://test.uddi.microsoft.com/publish</accessPoint>
<tModelInstanceDetails>
<tmodelinstanceinfo tmodelkey= "Uuid:64c756d1-3374-4e00-ae83-ee12e38fae63" >
<description xml:lang= "en" >uddi SOAP Publishing Interface </description>
</tModelInstanceInfo>
<tmodelinstanceinfo tmodelkey= "Uuid:f372e009-f372-429c-a09a-794113a5c5f9" >
<description xml:lang= "en" >urn:microsoft-com:test-signature-element indicates that this is a beta version of the service </description>
</tModelInstanceInfo>
</tModelInstanceDetails>
</bindingTemplate>
<bindingtemplate bindingkey= "8ed4ad10-c63b-495e-8969-b3938f86e937"
servicekey= "D2BC296A-723B-4C45-9ED4-494F9E53F1D1" >
<description xml:lang= "en" > Test UDDI Server, query interface </description>
<accesspoint urltype= "http" >http://test.uddi.microsoft.com/inquire</accessPoint>
<tModelInstanceDetails>
<tmodelinstanceinfo tmodelkey= "Uuid:4cd7e4bc-648b-426d-9936-443eaac8ae23" >
<description xml:lang= "en" >uddi SOAP query Interface </description>
</tModelInstanceInfo>
<tmodelinstanceinfo tmodelkey= "Uuid:f372e009-f372-429c-a09a-794113a5c5f9" >
<description xml:lang= "en" >urn:microsoft-com:test-signature-element indicates that this is a beta version of the service </description>
</tModelInstanceInfo>
</tModelInstanceDetails>
</bindingTemplate>
</bindingTemplates>
<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>
Now you can see that we get very rich information about the online WEB service itself. This information tells us that there are actually four access points, two test access points on http://test.uddi.microsoft.com (English), and two product access points on http://uddi.microsoft.com (English). It also tells us that a UDDI query access point is publicly addressable through HTTP, and that the publishing access point is under the protection of HTTPS.

You can also use tModelKey information to find all registered businesses that provide UDDI WEB services, as follows:

<find_business generic= ' 1.0 ' xmlns= ' Urn:uddi-org:api ' >
<tmodelbag><tmodelkey>uuid:4cd7e4bc-648b-426d-9936-443eaac8ae23</tmodelkey></tmodelbag >
</find_business>

Return <businessInfos> for Microsoft and IBM. Did not return Ariba because Ariba <tModelInstanceDetails> seems to be not yet available.

What is the effect of the work?
I find that there are some disturbing differences between the two implementations of Microsoft and Ariba. For example, Ariba's implementation requires UTF-8 all uppercase, and cannot handle extra spaces in an XML declaration.

In order for these services to be fully interoperable, problems like this must be eliminated. I found that the response time was very satisfying, but the synchronization of the data seemed to be a bit problematic. I hope the synchronization problem will improve over time.

Summarize
If you are creating an application that needs to be dynamically connected to the services provided by an external business partner, you will undoubtedly want to consider connecting your application to the UDDI registry. Imagine it as DNS for the business application tier. Interestingly, you can add, change, and delete access points in real time to resolve delays of one weeks or longer in DNS propagation.

Many people will ask what to do when you find a company and its registration service in a UDDI directory. Indeed, UDDI does not claim to be able to solve everything. Trying to explain the main merchant agreement that contains everything that has been created is a very onerous task and almost impossible to achieve. The theory of UDDI is that applications will know how to use some well-known business protocols to conduct their business, and that these protocols are described in a well-known way so that you can dynamically find other businesses that support the protocol. In addition, you can have a small number of well-known and reliable global business partners, through which you can simply use UDDI to find new services provided by them. In this case, you may already have other reliable channels for downloading the adapters that are required to connect to each service.

In short, UDDI does go a step in the right direction.






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.