Delphi-Kylix
  Home arrow Delphi-Kylix arrow Creating a Web Service Client with Delphi
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  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
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

Creating a Web Service Client with Delphi
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2006-10-30

    Table of Contents:
  • Creating a Web Service Client with Delphi
  • Code Listing
  • The application
  • Behind the scenes

  • 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


    Creating a Web Service Client with Delphi


    (Page 1 of 4 )

    In this article, the second of three parts covering web services, we will build a web service client and discuss the various components and methods needed to make an application work.
    A downloadable file for this article is available here.

    In the previous article we learned what a web service is and examined the kind of code used to create one. We also looked at some actual WSDL, XML and SOAP code. In the second part of the "Web Services Made Easy" series we are going to create a web service client for an already existing web service, and then we are going to create our own simple web service and client with Borland Delphi. This is because I want you to see how easy it is to access a web service that is already built by someone else in a different programming  language. We will create our own custom web service because in this way you will learn how to create your own methods for the web service and also how to access them. Since we’ve done a lot of theoretical work in the first part, I feel it is time to demonstrate everything we discussed, in practice.

    Building a web service client

    The first client we are going to create is going to be a service that will give us the weather forecast for international cities such as London or Paris. So open up your web browser and go to http://www.xmethods.com/. There you will see a complete listing of all the web services that are available, as well as what programming language was used to create them.

    Click on the link that says "View full listing" and then press "ctrl + f" to bring up the find dialog box (I.E. browsers only). Type in "USA Weather Forecast" and then click on "find next." This should take you straight to the "USA Weather Forecast" link. Click on the link and then find the label that says "WSDL." Copy the link next to it. Now start Delphi, go to File|New|Other, and then click on the web services tab. You should now see a dialog like this:

    Click on the  WSDL importer icon. You should now see the following screen:

    Enter the link you copied and click on "next." You should now see the following screen:

    Click on "finish" and Delphi will create a unit called "Weatherforecast" for you. Save the unit. We'll take a look at the unit's code listing in the next section.

    More Delphi-Kylix Articles
    More By Leidago


       · In this article i explain how to create a webservice client with Delphi.
     

    DELPHI-KYLIX ARTICLES

    - 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...
    - Using the Client Dataset in File-Based Archi...
    - Demystifying the Client Dataset
    - Working with INI Files in Delphi
    - Creating Data Link (UDL) Files in Delphi
    - Looking at the Details for an Invoicing Appl...
    - Invoicing in Delphi: Show Me the Money
    - Saving Images and Binary Files to a Database...
    - Saving Files to a Database using Delphi: Sav...
    - Creating CF Applications and Integrating a S...







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway