Introduction
This book offers you the most
opportune moment to set sail on a voyage of discovery, during which, you shall
visit the topics of XML Web Services and the Simple Object Access Protocol,
SOAP. It proceeds according to a coherent roadmap, to ensure that each topic
builds up incrementally on its predecessor.
You should assimilate what has
been presented in a specific chapter, before venturing on to the next one. We
have essayed at quelling the general fear of learning a new language by clearly
explaining all the complex topics. We have re-visited some topics to ensure
that you have a lucid understanding of the intricate concepts, even though we
are aware that reiterations could result in ennui. We have included a vast
array of examples, which strip the sheen of complexity in which most concepts
are generally ensconced.
XML Web services are the
fundamental building blocks in the transition towards Distributed Computing on
the Internet. XML Web Services are fast becoming the standard for application
interaction. An XML Web Service is a standard way of exposing services to a
large number of users.
An XML Web service is a function
that is exposed, so that other applications on the Web can exploit its inherent
capabilities. By using XML Web services, application developers can converge
their creative energies on the unique value-added functions that they wish to
provide. XML Web services are modular and extensible. However, there are a
number of features that have been left to the developer for implementation.
SOAP, Simple Object Access
Protocol, is described as a communications protocol. It is a specification that
defines the XML format for messages. The SOAP specification defines the
structure of an XML document, which can be used to exchange data between two applications.
It expounds a way to represent programming language specific datatypes, in XML.
The most compelling feature of
SOAP is that, it has been implemented on many different hardware and software
platforms. This implies that SOAP can be used to link disparate systems both,
within and outside your organization. SOAP is primarily used to facilitate
communication between different programs. These programs may have been written
in different languages, and could be running on different platforms.
SOAP is extremely popular and
has become the de facto industry standard, as it facilitates interoperability
between assorted environments, and it uses HTTP as the transport mechanism.
You would acquiesce that our
book titled 'XML Web Services and SOAP' is not meant for the technically naοve.
The reader must have sufficient knowledge of C# and ASP.Net, before launching
forth with this book. The primary assumption is that you have either read our
book on C#, ASP.NET, or any one of the other innumerable books on this topic,
strewn all over the market.
We have adopted a step-by-step
approach wherein, we first acquaint you with the smallest Web Service. Once you
are at ease with it and can create a webservice effortlessly, we progress on to
examining the packets that are sent across by the client to the server, and
vice-versa. We have based our theory on the packets that have been trapped,
using the Trace Utility from the Microsoft SOAP Toolkit, 2.0.
The XML Web Services are built
on WSDL, SOAP, XML and UDDI specifications. The second chapter introduces us to
WSDL. We have even endeavored to explicate the code generated by the wsdl
program. While doing so, we realized that we had to devote an entire chapter to
the different data types. We also had to analyze the changes that occur, when
data is sent across from client to server and vice-versa. This eventually
directed us on to the next chapter of DataSet, since a DataSet is a collection
of DataTable objects that embody data. Following this, we attempt to perceive
how a web service can be called, using Javascript in an html file.
Then, we proceed on a sojourn to
the SOAP packets, which are our next area of interest. Here, we begin with the
SOAP headers, and learn how to create custom attributes to enhance the
capabilities of the Web Service. Once these aspects have been elucidated, we
focus on security issues relating to SOAP. Here, we delve upon the processes of
encryption and decryption of data, as well as, on compression and decompression
of data.
Finally, all miscellaneous
attributes relating to Web Services, which were not touched upon earlier, are
tackled in the remaining chapters. After discussing the SOAP faults, we move on
to an authentication program, where all the knowledge attained by us so far,
has been put to use. The topic of Disco has also been attended to, before going
into the details of a WSDL file. We have concluded this book with the chapter
on Remoting, where our attention rivets around the data and the data types that
get generated in the SOAP packets, when functions are called with different
types of parameters.
We are sure that if you read
this book with earnest, you diligence will definitely pay off. We exhort you to
make the most of this wonderful opportunity. Let the pursuit of knowledge be
your lodestar.
Requirements
The software requirements to
successfully run all the programs in this book are
Operating System - Windows 2000
Microsoft IIS ver 5.0
SQLServer 2000 (Evaluation Edition)
Internet Explorer 5.5
.Net Framework SDK Beta 2 (111 MB)
Soap Toolkit 2.0
Internet Explorer 5.5 can be
downloaded off the Microsoft site
http://www.microsoft.com/windows/ie/download/ie55sp1.htm
Net Framework SDK Beta 2 can be
downloaded off the Microsoft site
http://download.microsoft.com/download/VisualStudioNET/Trial/2.0/W982KMeXP/EN-US/setup.exe
Alternatively, you can visit the
download section at Microsoft ( http://msdn.microsoft.com/downloads/default.asp
) and download the .Net framework SDK
Beta 2 under the Software Development Kit option.
Soap Toolkit 2.0
The Soap Toolkit 2.0, approx.
1.44 mb, can be downloaded from the Microsoft site
http://download.microsoft.com/download/xml/soap/2.0/W98NT42KMe/EN-US/SoapToolkit20.exe
SQLServer 2000
While installing the evaluation
edition of SQLServer 2000, we have chosen the default selected settings. The
only modification made is in the Authentication Dialog Box.
You see two options
Windows Authentication mode
Mixed mode (Windows Authentication
and SQL Server Mode)
The default option selected is
Windows Authentication mode. We have instead selected Mixed mode (Windows
Authentication and SQL Server Mode). Once this option is selected, the password
text boxes for the 'sa' user gets activated. As we would prefer using a blank
password in our programs, we select Blank Password. On selecting this option,
the text boxes get disabled again.
Once the database server is
installed and started, you will have to Install the .NET Framework Samples
Database. To do so, click on Start->Programs-> Microsoft .NET Framework
SDK-> Samples and QuickStart Tutorials. Follow the instructions given in
this html file to install all the samples that come with the SDK.
Acknowledgements
The many individuals who have
worked together to produce this great work of art and motivated me all the way
need a mention here. Their bright ideas, inspiration, support has made me a lot
more stronger and wiser.
First and foremost, thanks to Manish
Jain, BPB Publications for publishing the book.
To my co-authors, Vikram
and Sonal who have put in a lot of hard work to complete the work
assigned to them.
To Tanuja Sodhi, an
ex-Naval Officer from the first batch of lady officers and an MBA from Jamnalal
Bajaj, for editing the book. She is presently freelancing as a creative writer.
To Altaf Hemani and Kishore
Rohra, for their creativity in designing the cover in a given short time.
Thanks to Manish Purohit
for putting in late hours while testing all the applications in the book and
then giving the book a good look and feel.
To Pradeep Mukhi and Shivanand
Shetty, who have always been there, as a source of inspiration and
encouragement.
My Mother, Shana Aunty and a
long list of friends need a mention here for their patience and cooperation on
this book while it was being written.
-Vijay Mukhi