Tutorials » Creating a Web Service using ActiveX Components

Introduction

As all of us in the technology field know, it is a constant battle to keep up with all the cutting edge technology. I once thought you needed .NET, Java, or some newer language to create XML Web Services. To be honest, I never heard of XML Web Services until the release of .NET. I never really took the time to think about how a web service actually worked. After some initial investigation, I learned that a web service is an application or component which can be invoked remotely and supply responses using a strictly defined message exchange pattern. I also learned that web services can be developed on many platforms, not just .NET or java.

Faced with the challenge to create a web service for a client in a pre .net Microsoft environment, I discovered SOAP and Microsoft's SOAP toolkit. The subject of this article is not SOAP but it is important that everyone understands these basic points.

  • SOAP stands for Simple Object Access Protocol
  • SOAP is a lightweight protocol for exchange of information
  • SOAP consists of three parts

    1. Envelope
    2. Encoding rules
    3. RPC Representation (Remote Procedure Calls and Responses)

If you read the definition of a web service above you will agree that SOAP satisfies the "strictly defined message pattern". So how do you remotely invoke objects and supply responses. This is where Microsoft's SOAP toolkit comes in. The SOAP toolkit provides a simple low-level interface for a client to generate and build SOAP messages, send them to the server for processing and return a response back to the client. So to create a web service all we need is to build a client to send the messages and a server to process and respond.

In this tutorial we are going to do exactly that. To accomplish this task we will:

  •   Develop 2 ActiveX Server Components (Visual Basic 6.0 dll's)

    1. SOAP Client
    2. SOAP Server

  •   2 Active Server Pages

    1. ASP Listener
    2. ASP User Interface

We will accomplish this task easily with Visual Basic 6.0 and the SOAP Toolkit. The topic for our example is going to be math (everyone's favorite). Our web service will calculate the factorial or square root of a given number. Let's get started.

Contents

  1. Introduction
  2. SOAP Server
  3. ASP Listener
  4. SOAP Client
  5. ASP User Interface
  6. Summary
  Start Next
 
  1 2 3 4 5 6