Developing Grid Services

Following on from the first Grid Services tutorial, this tutorial aims to demonstrate more of the features of the MS.NETGrid software.

By the end of this tutorial, you will have developed a service that implements the Math portType. The Math portType is defined in the following WSDL document.

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
  xmlns:s="http://www.w3.org/2001/XMLSchema" 
  xmlns:s0="http://nesc.ac.uk/Tutorial/MathService/" 
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
  xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" 
  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
  targetNamespace="http://nesc.ac.uk/Tutorial/MathService/" 
  xmlns="http://schemas.xmlsoap.org/wsdl/"> 
 <types>
  <s:schema elementFormDefault="qualified" 
      targetNamespace="http://nesc.ac.uk/Tutorial/MathService/">
      <s:element name="SquareRoot">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="val" type="s:double" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="SquareRootResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="SquareRootResult" type="s:double" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </types>
  <message name= "SquareRootSoapIn">
    <part name="parameters" element="s0:SquareRoot" />
  </message>
  <message name= "SquareRootSoapOut">
    <part name="parameters" element="s0:SquareRootResponse" />
  </message>
  <portType name="MathServiceSoap">
    <operation name="SquareRoot">
      <input message="s0:SquareRootSoapIn" />
      <output message="s0:SquareRootSoapOut" />
    </operation>
      </portType> 
  <binding name= "MathServiceSoap" type= "s0:MathServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
      <operation name="SquareRoot">
        <soap:operation 
         soapAction="http://nesc.ac.uk/Tutorial/MathService/SquareRoot"
         style="document" />
      <input>
        <soap:body use="literal" />
      </input>
      <output>
        <soap:body use="literal" />
      </output>
    </operation>
  </binding>
  <service name= "MathService">
    <port name="MathServiceSoap" binding="s0:MathServiceSoap">
      <soap:address location="http://localhost/Math/MathService.asmx" />
    </port>
  </service>
</definitions>



As can be seen, the Math portType exposes one operation, namely SquareRoot, which takes double and returns its square root as a double.

We are going to develop a persistent service, that is, a service that is initialised and maintained by the container application when it starts up. The other type of service is the factory-activated or transient service. We will discuss service types in more depth during the next lecture. Comprehensive guidelines on how to create both persistent and transient services are available in the user manual that is available with the software. This tutorial aims to guide you through this process in a step-by-step manner.

Developing the Service Components

Developing a Grid Service for the MS.NETGrid hosting environment involves a number of steps. These steps are:

The remainder of the tutorial takes you through each of these steps for the Math service.

Next >>