Home arrow Delphi-Kylix arrow Page 4 - Creating a Web Service Client with Delphi

Creating a Web Service Client with Delphi

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.

Author Info:
By: Leidago
Rating: 5 stars5 stars5 stars5 stars5 stars / 34
October 30, 2006
  1. · Creating a Web Service Client with Delphi
  2. · Code Listing
  3. · The application
  4. · Behind the scenes

print this article

Creating a Web Service Client with Delphi - Behind the scenes
(Page 4 of 4 )

So what is happening behind the scenes when you execute the code? Well, the HTTPRIO component creates a SOAP envelop and sends this off to the web service server, which in turn processes the message and returns an appropriate response. The messages, both outgoing and incoming, are in XML  format:

Outgoing message:

<?xml version="1.0"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=http://www.w3.org/2001/XMLSchema
<GetWeatherByPlaceName xmlns="http://www.webservicex.net">

You can clearly see the place name parameter that we entered. In this case it is London. Below is the response message we get from the web service server:

Incoming message:

<?xml version="1.0" encoding="utf-8"?>
<GetWeatherByPlaceNameResponse xmlns="http://www.webservicex.net">
<Day>Sunday, August 13, 2006</Day>

The Delphi SOAP framework does all the hard work of putting together the SOAP envelope and sending it off to the server; then it reads the response and converts the XML into a human readable form.


In this article we went through the process of building a web service client and also discussed the various components and methods needed to make an application work. In the next article we are going to create a web service from scratch and also create a client that will enable us to use the service.

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus

- Loading an XML Document into the DOM
- 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...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials