Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - Building a Web Service from Scratch with D...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Building a Web Service from Scratch with Delphi
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2006-11-06

    Table of Contents:
  • Building a Web Service from Scratch with Delphi
  • Writing the Methods
  • Adding state
  • Testing the service

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building a Web Service from Scratch with Delphi - Writing the Methods


    (Page 2 of 4 )

    We need to write our own methods, so I'm going to create two very simple methods to which this service will respond. Go to the interface unit and add the following two methods under the IMyWebServer class definition:

    Procedure SetTxt(Const AValue : String); stdcall;

    Function GetTxt : String; stdcall;

    Then go to the implementation unit and under the TMyWebServer class definition add the following two lines:

    Private

     TheTxt : String;

    And then under these two add the following:

    Procedure SetTxt(Const AValue : String); stdcall;

    Function GetTxt : String; stdcall;

    Then in the implementation section of the unit, add the following code:

    function TMyWebServer.GetTxt: String;
    begin 
      Result := TheTxt;
    end;
    procedure TMyWebServer.SetTxt(const AValue: String);
    begin 
     TheTxt := AValue;
    end;

    So, what does the code do? Well, one of them (settxt) gets parameters from the user and the other reads it and shows the data.

    More Delphi-Kylix Articles
    More By Leidago


       · Web services are a exiting new technology, this article will explain how you can...
     

    DELPHI-KYLIX ARTICLES

    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...
    - Using the Client Dataset in Two-Tiered Clien...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT