Sloan Digital Sky Survey
Astronomical Data Query Language >> Creating a new .Net Web Client

Creating a new .Net Web Client

Let us now look at how we create a new C# Web client in few easy steps. You can either start by generating code on your machine or you can use the already generated code provided in the Download Code section.

Requirements

Code Generation

  1. First, let us download the latest ADQL webservice wsdl file into a local file Archive.wsdl.
  2. Next Run wsdl.exe /n:edu.jhu.adql.ws.client Archive.wsdl /o:ArchiveClient.cs on the command line. This generates a SOAP Client class called Archive inside ArchiveClient.cs file.
  3. We are now ready to write an application to use any ADQL web service. Let us write a small tester class called ArchiveTest. Create instances of the edu.jhu.adql.ws.client.Archive class to query any ADQL service.
  4. Change the Url property of the Archive object to access web services running at different locations.

Download Code

You can download the entire source code in a zip format over here. This includes the WSDL file, the generated ArchiveClient.cs file, and the ArchiveTest.cs file. Once you have tested the deployment of this code, feel free to change the implementation of the ArchiveTest based on your needs.

Deployment

  1. Create a new C# Console Application.
  2. Add the ArchiveClient.cs as an exisiting item to the project.
  3. Use the edu.jhu.adql.ws.client.Archive class to query the ADQL services available on different servers.
  4. Set the Url property of the Archive object to any of the below listed ADQL services.


Vivek Haridas
Last Modified :Friday, July 25, 2003 at 3:34:45 PM , $Revision 1.1 $