Skip to Content

Using the XMethods UDDI server

There are a lot of people out there who don’t think UDDI is particularly useful. Typically when I defend it when speaking to these misguided souls I discover their only experience is with the public UBR (Universal Business Registry) nodes. I somewhat agree that the UBR nodes are not that interesting (I’ll save what is interesting for a future post) as they are filled with a lot of junk. Not that long ago though I discovered that XMethods provides a UDDI version of their registry of public Web services available. Now if you’ve spent any time at all with Web services I hope I have your attention now. To see why UDDI is so cool you can integrate the XMethods registry into your local SAP NetWeaver installation to experience it first hand.

First make sure the UDDI server that is part of your NetWeaver installation is set up. To do this follow the excellent article on setting up a local UDDI server by Anne Lanfermann. Follow the instructions there on configuring your server for setting up a registry and add a new one for the XMethods UDDI server (I named it XMethods Registry to be clear about the text below). You will need to set the Inquiry URL to and the Publish URL to Now, as if you haven’t already impatiently done so, fire up the NetWeaver IDE. Create a Web service Standalone Proxy project and then create a new Client Proxy Definition. Fill in the required parameters and choose the radio button for UDDI or URL. In the next dialog select UDDI. You will see that the XMethods Registry added above is available as an option to search.

image of Select UDDI Registry

Being a political junky in an election year I’ll search for “WhoIsGoingToBePresident?”. (Note that you need to use the scroll bar as the search button is unfortunately hidden low in the window) Wouldn’t you know it, I get a hit. (I cheated of course, I subscribe to the XMethods RSS feed so I saw this one show up last week there)

image of WhoIsGoingToBePresident? UDDI entry description

I got back this nice little page shown above where I can review if this is what I want or not. Based on the description here that this Web service returns the latest polling data for the 2004 US Presidential election how can I pass this up? Select OK and hit next. I’ve added a Java scrapbook page to my project just to try this out. Here is the code.

com.example.PresidentialElectionResults2004 service = new com.example.PresidentialElectionResults2004Impl();
com.example.PresidentialElectionResults2004BindingStub election = (com.example.PresidentialElectionResults2004BindingStub)service.getLogicalPort();

com.example.types.Results results = com.example.whoisgoingtobepresident();
System.out.println("Bush = " + results.getBush());
System.out.println("Kerry = " + results.getKerry());

The output I got today for that is:
Bush = 231
Kerry = 307

If I were really clever I’d add a routine to compensate for inevitable electronic voting machine fraud, but for now I’ll leave it as an exercise for the reader.

A note on a common problem. Don’t forget to set your proxy server settings for the IDE and the J2EE server. For the IDE it is under Preferences, Workbench, Proxy Settings. For the server in the Visual Administrator go to Services, Web services Container and select the Settings tab.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.