Thursday, October 25, 2007

REST API (GET) for UDDI entities - does anyone implement it?

pencil icon, that"s clickable to start editing the post

The webservice API for UDDI isn't pure SOAP, there's also a little REST part, though calling it an API for itself would be an exaggeration since it only enables aminor part of the SOAP API, that for retrieving the basic entities. It's and optional feature (may but for some reason not with capital letters) and described in Section 6.5 HTTP GET Services for UDDI Data Structures :

A node may offer an HTTP GET service for access to the XML representations of UDDI data structures. If a node offers this service, the URLs should be in a format that is predictable and uses the entity key as a URL parameter.

The RECOMMENDED syntax for the URLs for such a service is as follows:

If a UDDI node’s base URI is, then the URI<entity>Key=uddiKey would retrieve the XML for the data structure whose type is <entity> and whose key is uddiKey. For example, the XML representation of a tModel whose key is "" can be retrieved by using the URL

In the case of businessEntities, the node MAY add these URIs to the businessEntity’s discoveryURLs structure, though this is NOT RECOMMENDED behavior as it complicates the use of digital signatures.

First example - Global Biodiversity Information Facility UDDI Registry

An example of a registry supporting the HTTP GET Services is theGlobal Biodiversity Information Facility UDDI Registry. The documentation contains a very nice presentation of the UDDI data structures in XML Schema in a fashion very like JavaDoc. On the frontpage the product and version number is given "GBIF UDDI is powered by Systinet (c) WASP 4.6 UDDI engine" - doing a HTTP GET returns the following headers:

wget --no-check-certificate -S
Connecting to||:443... connected.
WARNING: cannot verify's certificate, issued by
  `/C=DK/ST=Copenhagen/L=Copenhagen/O=GBIF Secretariat/OU=ICT/':
  Self-signed certificate encountered.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Tue, 23 Oct 2007 20:10:38 GMT
  Server: Systinet WASP Server for Java/4.6.1 (Java/1.4.1_03; Linux/2.4.21-52.ELsmp)
  Content-type: text/html; charset=UTF-8
  Connection: close
Length: unspecified [text/html]

That confirms this. Not exactly the newest versions, Linux 2.4 kernel, Java 1.4 and WASP server that seems to have run though two major releases in the meantime. I also find that it's run from Copenhagen.

Doing a browse search and choosing 'Australian National Insect Collection, CSIRO Entomology' gives:

Australian National Insect Collection, CSIRO Entomology, Business entity, web presentation

Activating The View as XML button, implemented as:

<input value="View as XML" 

using a simple JavaScript function defined in

function displayXMLDirect(paramName, paramValue, authinfo) {    
    window.location = "?"+paramName+"="+paramValue+"&authInfo="+authinfo;    

For my own preference I would have skipped the JavaScript and just made the link (HTTP GET) directly - simpler and more accessible. Any way the raw XML describing the Business Entity Australian National Insect Collection, CSIRO Entomology

<?xml version="1.0" encoding="UTF-8"?>
<businessEntity authorizedName="provider"
  businessKey="06bbd2a0-671b-11d8-b9b2-b8a03c50a862" operator="GBIFS">
    <discoveryURL useType="businessEntity"></discoveryURL>
  <name xml:lang="en">Australian National Insect Collection, CSIRO Entomology</name>
  <description xml:lang="en"></description>

Obviously there's either a configuration error or some redirecting going on since I can't access discoveryURL running on port 8009. A similar problem can be found in the old OIO UDDI based on another product so this is obviously a general problem.

Second example - OIO e-Business Registry

Abother UDDI is the OIO e-Business Registry, that can be accessed as Oracle Application Server Service Registry (don't use the Business Control Center that is another interface to the same data, though I haven't figured out the real diffenrence). Choosing 'Search' gives the simple search page:

Doing a wildcard/browse search and choosing KMD Gateway SKI 0.7 - 04:

But I can't call this as raw XML with the HTTP GET as described in the UDDI version 3 specification:

gives an error page similar to this:

But through the button on the page, that's a link enabled image:

<a href="javascript:submitToURL('form','/directGetXml','root##465195',-1,false,'');;void(0);" .....</a>

this is worse than the older version, since is all JavaScript but based on href and not onClick. The JavaScript function is defined in wf.js (port 12443):

// submits page to url
function submitToURL (formName, targetTask, actionID, targetDepth, redirect, targetURL)
  document.forms[formName].action = targetURL;
  submitPage(formName, targetTask, actionID, targetDepth, redirect);

// submits page
function submitPage (formName, targetTask, actionID, targetDepth, redirect)
  if (checkFields(formName,actionID)) {
    document.forms[formName].elements['actionId'].value = actionID;
    document.forms[formName].elements['targetTask'].value = targetTask;
    document.forms[formName].elements['targetDepth'].value = targetDepth;
    document.forms[formName].elements['redirect'].value = redirect;

which relates to this form:

<form name="form" method="POST" >
<input type="hidden" name="actionId"/>
<input type="hidden" name="targetTask"/>
<input type="hidden" name="targetDepth"/>
<input type="hidden" name="redirect"/>

The values were:

  • formName='form'
  • targetTask='/directGetXml'
  • actionID='root##465195'
  • targetDepth=-1
  • redirect=false
  • targetURL=''

So it can be POST'ed and that might not be true REST or according to what the specification suggests, but it can done by ex. curl or a simple form on another web page. I haven't tried to access it with GET, but it might work.

Does anyone implement it?

In fact it would be more interesting to know whether anyone uses it, but the two examples I've looked at here does both implement it (both systinet products), in diffent ways, I haven't used UDDI for a real business case or development so I can't way whether is a great feature or just a possible feature.