A simple Chrome webservice

This is a simple webservice that works in .NET and Mono too!

<%@ WebService Language="Chrome" Codebehind="TestServicePAS.asmx.pas" Class="WebServiceTests.TestServicePAS" %> namespace WebServiceTests; interface uses System, System.Web.Services, System.Web.Services.Protocols, System.Data, System.Reflection; type TestServicePAS = public class(System.Web.Services.WebService) public method Subtract(a, b : Integer) : Integer; method Add(a, b : Integer) : Integer; method Divide(a, b : Integer) : Integer; method Multiply(a, b : Integer) : Integer; end; implementation var cncType : &Type := nil; [WebMethod] method TestServicePAS.Subtract(a, b : Integer) : Integer; begin Result := a - b; end; [WebMethod] method TestServicePAS.Add(a, b : Integer) : Integer; begin Result := a + b; end; [WebMethod] method TestServicePAS.Multiply(a, b : Integer) : Integer; begin Result := a * b; end; [WebMethod] method TestServicePAS.Divide(a, b : Integer) : Integer; begin Result := a / b; end; end.

I’ll post more examples about what works fine under Mono soon!!!

rogerio

0