.NET Overview

This talk gives a very quick overview of the .NET architecture for people interested in distributed programming with SOAP.

1 What is .NET?

2 Architecture

Web Services
Frameworks and Libraries:
ASP.NET, ADO.NET, Window Forms
Interchange standards:
SOAP, WSDL, UDDI
Common Development Tools:
Visual Studio .NET
Component Model
Object Model and Common Language specification
Common Language Runtime

3 ASP.NET

4 Component Model

5 Language Interoperability

CLR

6 Building a .NET Web Service

  1. Write a class with attributes (comments) that identify it as a web service with exposed methods.
  2. .NET uses these to create WSDL document.
  3. Client adds service as web reference in Visual Studio .NET, or runs WSDL.exe to create stubs.
  4. .NET uses WSDL file to generate proxy (stub) classes.
  5. Client instantiates proxy class and calls methods on it.
  6. Proxy class converts it to a SOAP message and sents it.
  7. Proxy class receives SOAP reply, parses it, and returns value to client.

6.1 Placing Attributes

<%@ WebService Language="C#"
Class="ProgWS.HelloWorldService" %>
using System.Web.Services;
namespace ProgWS
{
  public class HelloWorldService: WebService 
  {
    [WebMethod]
    public string HelloWorld()
    {
      return "Hello World";
    }
  }
}

6.2 Accessing

access
access wsdl

6.3 The Client

using System;
namespace DNSConsumerApp
{
  class Consumer
  {
    static void Main(String[] args)
    {
      localhost.DNSLookupService objDNS= new localhost.DNSLookupService();
      string strIPAddress = "";
      strIPAddress = objDNS.getIPForHostnae(args[0]);
      Console.WriteLine("Hostname: " + args[0] + " IP: " + strIPAddress);
    }
  }
}

6.4 Asynchronous Invocation

class proxy {
  ...
  public System.IAsyncResult BeginDelay(System.AsyncCallback callback,
                                        object asyncState){
  return this.BeginInvoke("Delay", new object[0], callback, asyncState);
}
  public int EndDelay(System.IAsyncResult asyncResult){
    object[] results = this.EndInvoke(asyncResult);
    return((int)(results[0]));
  }
}

7 Summary

URLs

  1. Microsoft .NET, http://msdn.microsoft.com/netframework/technologyinfo/overview/

This talk available at http://jmvidal.cse.sc.edu/talks/dotnetoverview/
Copyright © 2009 José M. Vidal . All rights reserved.

13 April 2004, 03:12PM