Using the NVO Registry WebService from Java and C#

Below I briefly describe how to make a simple client for the registry prototype.

The Service URL

First we need the service URL which is http://sdssdbs1.stsci.edu/nvo/registry/registry.asmx

The Client

Next we need some Client code - here is a simple client in Java

-- WilliamOMullane - 02 Oct 2003


Edit | Attach | Watch | Print version | History: r7 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2003-10-02 - WilliamOMullane
 


AXIS always creates Localtor classes - where the servie url may be changed.

Simple Resource is the object returned by the registry.

import org.us_vo.www.*;

class RegClient {
public static void main (String[] args) throws Exception {
    RegistryLocator loc = new RegistryLocator();
    RegistrySoap reg = loc.getRegistrySoap();
    ArrayOfSimpleResource reses = null;
    if ( args.length ==0 ) {
   reses = reg.dumpRegistry();
    } else {
   reses = reg.queryRegistry(args[0]);
    }
   for (int i = 0 ; i < reses.getSimpleResource().length; i++) {
      print(reses.getSimpleResource(i));

   }
}
   public static void print(SimpleResource res ) {
   System.out.println(res.getTitle()+ "|"+ res.getPublisher() + "|" + res.getMaxSR());

   }
}
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback