"You are holding in your hands my favorite book on Web services and .NET. What else can I say? Buy this book now, and be prepared for a new way of coding!"
—Keith Ballinger, Program Manager for XML Web Services, Microsoft
"If you've been searching for a book that goes beyond the Web services hype, and distills the benefits of the actual platform, look no further, you've found the right one."
—Aaron Skonnard, Instructor and Author, DevelopMentor
Real World XML Web Services is the Visual Basic programmer's definitive guide to designing and building Web services. It provides developers with a comprehensive understanding of Web services, covering everything from basic concepts and solutions to interoperability problems. This book begins with a concise and practical introduction to Web services and the foundation on which they are built, including Web Services Description Language (WSDL) and Simple Object Access Protocol (SOAP). Readers learn, by example, how to use each tool for developing Web services, starting with the SOAP Toolkit and the .NET framework.
Visual Basic programmers discover how to:
The book closes by walking the reader through the creation of a Web service with .NET and Visual Basic 6 clients. Real World XML Web Services empowers Visual Basic programmers to design and build the next generation of applications using Web services.
Click below for Sample Chapter(s) related to this title:
Sample Chapter 8
Foreword by Keith Ballinger.
Foreword by Aaron Skonnard
1 Introduction to Web Services.
Distributed Applications and the Browser.
What Are Web Services.
The New Platform.
XML and XSD.
Typical Web Service Architecture.
Remote Procedure Calls versus Messaging.
Creating Web Services.
Using the SOAP Toolkit.
When to Use Web Services.
Communicating through a Firewall.
Business to Business Integration.
When Not to Use Web Services.
Single Machine Applications.
Homogenous Applications on a LAN.
Why A Type System.
What Is XSD.
The XSD Type System.
Authoring XSD Schemas.
Defining Simple Types.
Defining Complex Types.
XSD and XML Namespaces
A Quick Introduction to XML Namespaces.
Namespaces in Instance Documents.
XSD Types and Namespaces.
Validating with XSD.
Uniqueness and Keys.
How Serialization Works.
Schemas and XML Serialization.
Overriding Serialization Attributes.
Inheritance, Interfaces and Serialization.
XML Serialization and Remoting.
What Is SOAP.
The SOAP Message.
SOAP Message Formats.
Messaging with SOAP.
SOAP over HTTP.
Capturing SOAP Messages.
The Web Service.
RPC with SOAP.
Section 5 Encoding.
When Things Go Wrong.
Communicating Error Information.
Handling Binary Data.
SOAP with Attachments.
A Simple Solution.
Why Describe Web Services.
A WSDL Example.
WSDL SOAP Binding.
Using WSDL Documents.
The Weather Service.
Quote of the Day.
Other WSDL Features.
Documenting Your WSDL.
Toolkit API Architecture.
Exposing Web Services.
Using the High-Level API.
Exposing Web Services.
Invoking Web Services.
Troubleshooting with the Trace Utility.
Using High-Level API From Classic ASP.
Serialization in the High-Level API.
Generic Type Mapper.
User-Defined Data Type Mapper.
Custom Type Mappers.
Complex Types as IXMLDOMNodeList.
Implementing Header Handlers.
Exposing Services with Headers.
Invoking Services with Headers.
Using the Low Level API.
Exposing Services with Low-Level API.
Invoking Services with the Low Level API.
The ISAPI Listener.
Tweaking the ISAPI Listener.
Creating Web Services with VS.NET.
Creating A Web Service.
Invoking Web Services with Visual Studio.NET.
Using an HTTP Proxy.
Leveraging the ASP.NET Framework.
Using ASP.NET Sessions.
Enabling Output Caching.
Using Data Caching.
Customizing the Service's WSDL.
Names and Namespaces.
Controlling SOAP Message Style.
Ignoring/Specifying SOAP Action.
Understanding Web Service Clients.
Defining SOAP Headers.
Using Headers on the Service.
Using Headers on the Client.
You Must Understand This.
Implementing an Interface.
Implementing Multiple Interfaces.
Interfaces In Different Namespaces.
Programming against Interfaces.
Choosing Implementations At Runtime.
Serialization and Web Services.
Starting with a Relational Database.
Starting with A Schema.
DataSets from Schemas.
Typed DataSets from Schemas.
Handling XML Documents.
Handling Object Arrays.
Web Service Request Processing.
Extending Web Service Request Processing.
SOAP Extension Processing.
Applying SOAP Extensions.
Applying SOAP Extensions with CLR Attributes.
Modifying Message Streams.
SOAP Extension Lifetime Summary.
Client-Side SOAP Extensions.
Authorization SOAP Extension.
LogOn/LogOff and Permissions Checking.
Using SOAP Headers.
The Authorization SOAP Extension.
Using The SOAP Extension.
Using The Thread Pool.
An Example Client.
A Compression SOAP Extension.
What Is UDDI.
What UDDI Is Made Of.
UDDI Usage Scenarios.
Finding Closest Business.
The Invocation Pattern.
Finding Trading Partners' Services.
Main Data Structures.
tModels as Service Types.
tModel as Meta data.
A Real-World Example.
How Categorization Works.
How Identifiers Work.
WSDL and UDDI.
WSDL in UDDI Best Practices View.
Visual Studio .NET and UDDI.
Add Web Reference Dialog.
Getting Services to Appear in the Add Web Reference Dialog.
Searching UDDI from the Start Page.
UDDI Message Types.
A UDDI API Learning Aid.
Finding a Business by Name.
Finding Businesses by Categories.
Finding Service Interfaces.
Finding Businesses by Service Interface.
Finding Services by Name.
Getting Service Details.
Publishing Your Web Services with UDDI.
Publishing a Service Interface.
Publishing a Business.
Publishing a Service.
Specifying Business Relations.
An Inquiry Example.
Choosing Services That Implement a Specific Interface.
Using the UDDI SDK.
Private UDDI Implementations.
RPC/Encoded Messages with PocketSOAP.
Document/Literal Messages with PocketSOAP.
IBM's Web Services Toolkit.
The Web Service Behavior.
Setting Up the Behavior.
Invoking Web Services.
Handling Complex Types.
VB 6 Clients.
Bad WSDL, No Problem.
Introduction and Requirements.
Designing Web Service Messages.
Implementing the Service.
Generating Classes from Complex Types.
Writing the Service Code.
Getting Weather Information.
LogOn and LogOff.
The RequestElement-Bare Dilemma.
Authentication and Authorization.
Customizing the Documentation Page.
A VB 6 Client.
Implementing the Invocation Pattern.
Use Document/Literal SOAP Messages For Data Exchange.
Design Messages Not Methods.
Use an HTTP Proxy Tool For Troubleshooting.
Use Output and Data Caching.
Don't Use HTTP Cookies.
Use SOAP Headers for Session Management.
Use RequestElement Routing.
Use One-Way Operations.
Don't Implement Properties On Web Services.
Use Distributed Transactions Only If You Need Them.
Don't Re-Invent the Wheel.
There's no doubt that the Web was a catalyst for a revolution that changed the lives of software developers and end users alike. Web services provide the foundation for another profound revolution in the way we build and use applications. It is up to developers like you and I to take this foundation and make the revolution happen. With this book, I aim to give you the information and insight you need to design and build next generation distributed interoperable applications with Web services.
My treatment of Web services in this book is divided in two sections: The first four chapters explain the architectural foundation on which Web services are built. The remaining eight chapters explain the tools you use to build Web services including the SOAP toolkit and the .NET framework.Intended Audience
This book is intended for experienced developers who have little or now experience with Web services. The book assumes you have programmed with VB 6, classic ASP, and VB .NET. It assumes you understand the fundamentals of Web application development and have a basic understanding of XML documents and the XML Document Object Model (XML DOM). This book is not for developers who have no .NET knowledge or experience.A Live Book
The world of Web services is changing rapidly. There are new standards being defined every month and new implementations of those standards are being released on a hectic schedule. It is impossible for a traditional printed book to keep up with this rapid pace of change. When I set out to write this book, I decided to combine the print version with an online version that will be maintained and kept up-to-date with the standards.
As an owner of a print copy of this book, you have access to the online version of this book including all the new content being added as standards emerge and tools change. Please make sure you take a look at what's new online at http://www.LearnXmlws.com/book.
To start things off I explain what Web services are and the scenarios where they prove useful. I also show you how to create Web services with .NET and with the SOAP Toolkit. The idea is to give you a head start on creating and invoking Web services before digging into the details.
This is the first of three chapters that cover the fundamentals of Web services. This chapter explains the syntax and usage of XML Schemas and shows examples of validating schemas using VB .NET and VB 6. the chapter also covers XML Serialization and shows examples of shaping the XML generated by the .NET XML Serializer.
Having understood schemas, this chapter explains SOAP, the Web services protocol. It explains how you can use SOAP for messaging as well as Remote Procedure Calls (RPC). It also shows you how to communicate error information to SOAP clients and the built-in mechanism for extending SOAP.
This chapter completes the fundamentals by explaining the Web Services Description Languages, WSDL. The chapter begins with an overview then goes into the details of WSDL documents. It shows you practical examples of writing and reading WSDL documents. While it's unlikely that you'll need to create WSDL documents form scratch, it is likely that you'll need to read them and possibly modify them.
Chapter 5 is the first of a series of chapters that cover the tools you use to build Web services. This entire chapter is dedicated to building Web services with the SOAP Toolkit. It shows you how to expose an existing COM component as a Web service using both the high-level and low-level APIs. It also explains how to handle SOAP headers and SOAP faults.
After learning the SOAP Toolkit, this chapter explains creating and invoking Web services using the .NET framework. Beyond the basics, this chapter shows you the various features provided by the .NET framework such as output caching, data caching, and SOAP message shaping. The last section of this chapter dives into the details of Web service clients explaining how Web service proxies work and how you can customize them.
This chapter builds on what you learned in chapters 3 and 6 and shows you how to implement SOAP headers with the .NET framework. It shows you how to create SOAP headers that must be understood by the Web service and how to process headers on the service. It also shows you how to use SOAP Fault to communicate rich error information between service and client.
This chapter explains the process of interface-based Web services development which is necessary for large-scale projects and useful even for smaller projects. The chapter goes through the steps of defining and implementing an interface then covers implementing multiple interfaces on one Web service.
When building real-world Web services, most of the problems you'll encounter will center on data. Whether you are sending or receiving data, you'll almost always need to decide the optimum format for this data and how to get it into this format. This chapter focuses on the mechanics of handling data in .NET Web services. The chapter is divided in sections covering ADO.NET DataSets, XML documents, custom objects and object arrays.
.NET provides an architecture for performing custom request/response processing at the SOAP message level via SOAP extensions. This chapter explains how SOAP extensions work and shows you three example SOAP extensions including one for compressing/decompressing SOAP messages.
This chapter explains the Universal Description, Discovery and Integration standards and demonstrates scenarions where UDDI is useful. The objective of this chapter is to open your mind to design patterns and usage scenarios that leverage Web services registries. Such registries will become commonplace within the intranet with future versions of Windows server.
Throughout the process of building and maintaining Web services you're likely to run into interoperability issues with other SOAP implementations. This chapter explains some of the more common SOAP toolkits including Apache SOAP and PocketSoap and shows you how they interoperate with .NET Web services.
To wrap things up, chapter 13 walks through the steps of building a .NET Web service with .NET and VB 6 clients. The chapter also covers registering the service with UDDI.
Yasser has written the first Web services book to break this trend. His book focuses on the Web services platform from the ground up. The book starts by introducing the fundamental Web services architecture and its core technology underpinnings, including XML 1.0, XML Schema, SOAP, WSDL, and UDDI. Yasser does a great job explaining not only how these technologies work, but also why they matter to a Web services developer grappling to understand the platform. Each chapter spotlights a core Web services technology centered on clear explanations, compelling examples, and most importantly, code.
Yasser's approach clarifies some common misconceptions about Web services design and helps to promote best practices that will prepare you for long-term success. As an example, he emphasizes that the Web services "interface" is the XML message on the wire, not the class definition one may work with to process the message in VB. Understanding this key distinction is crucial to understanding the rest of the Web services platform.
Not only is the book conceptually solid, it is also practical. The book is chock-full of examples illustrating how Microsoft's Web services implementations work in both the VB 6 (Microsoft SOAP Toolkit) and .NET environments. As you read through the prose and parse through the accompanying sample code, you're bound to experience the breakthrough epiphanies that make reading a technical book worthwhile.
If you've been searching for a book that goes beyond the Web services hype and distills the benefits of the actual platform; look no further, you've found the right one.
Instructor and Author, DevelopMentor
Foreword by Keith Ballinger
You are holding in your hands my favorite book on Web services and .NET. Yasser has done an outstanding job of pulling together an intelligent and well-thought-out book that provides you with tons of practical information about Web services.
One of the things that always used to frustrate me when I read a Web services book that cost more than five dollars was the apparent inexperience of the author, which became clear after a month of trying to implement his suggestions. You know what I'm talking about: wrong information about APIs, bone-headed architectural recommendations that would never perform well, and sample code that is a security hole. All that's the hard stuff.
With Yasser's book, I don't think you'll spend much time being frustrated; Yasser's covering the hard stuff and is also setting you up for success with this book. He's thought hard, written hard, and listened hard. Listened to whom? Well, to you. He's an active member of the developer community. He's also listened hard to me and the other members of Microsoft's development team.
What else can I say? Read his book, and be prepared for a new way of coding!
Program Manager, XML Messaging
Click below to download the Index file related to this title: