Home > Store

Real World XML Web Services: For VB and VB .NET Developers

Register your product to gain access to bonus material or receive a coupon.

Real World XML Web Services: For VB and VB .NET Developers

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

  • The book covers SOAP, WSDL (the Web services Description Language), and UDDI, among other topics.
  • Contains many practical examples, ranging from a few lines of code to long projects. The quality and the quantity of these real-world examples will set this book apart.
  • Unlike competing books, the author covers the use of both Visual Basic 6 as well as Visual Basic .NET.

Description

  • Copyright 2003
  • Edition: 1st
  • Premium Website
  • ISBN-10: 0-201-77425-9
  • ISBN-13: 978-0-201-77425-2

"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:

  • Use XML Schema to define Web service messages
  • Use SOAP for messaging and Remote Procedure Calls (RPC)
  • Read and modify WSDL documents
  • Build Web services with the SOAP Toolkit
  • Create and invoke Web services using the .NET framework
  • Implement SOAP headers and use SOAP Fault
  • Develop interface-based Web services
  • Handle data in .NET Web services, including objects, arrays, and DataSets
  • Use SOAP extensions to build reusable infrastructure for security and compression
  • Use Universal Description Discovery and Integration (UDDI) at design time and run time
  • Understand the architecture of other popular toolkits, such as Apache SOAP for Java, and learn how to solve interoperability problems

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.



0201774259B08192002

Extras

Author's Site

Click for the Author's Web Site related to this title.

Sample Content

Online Sample Chapter

.NET Web Services: Interface-Based Web Service Development

Downloadable Sample Chapter

Click below for Sample Chapter(s) related to this title:
Sample Chapter 8

Table of Contents



Foreword by Keith Ballinger.


Foreword by Aaron Skonnard


Preface.


Acknowledgments.


1 Introduction to Web Services.

Distributed Applications and the Browser.

Interoperability.

What Are Web Services.

The New Platform.

XML and XSD.

SOAP.

WSDL.

Typical Web Service Architecture.

Remote Procedure Calls versus Messaging.

Creating Web Services.

Using the SOAP Toolkit.

Using.NET.

When to Use Web Services.

Communicating through a Firewall.

Application Integration.

Business to Business Integration.

Software Reuse.

When Not to Use Web Services.

Single Machine Applications.

Homogenous Applications on a LAN.

Summary.



2. XSD: The Web Services Type System.

Why A Type System.

What Is XSD.

The XSD Type System.

Authoring XSD Schemas.

Declaring Elements.

Defining Simple Types.

Defining Complex Types.

Declaring Attributes.

Simple Content.

Mixed Content.

Empty Elements.

Anonymous Types.

XSD and XML Namespaces

A Quick Introduction to XML Namespaces.

Namespaces in Instance Documents.

XSD Types and Namespaces.

Validating with XSD.

Programmatic Validation.

Type Substitution.

Nil Values.

Uniqueness and Keys.

Object Serialization.

How Serialization Works.

Schemas and XML Serialization.

Overriding Serialization Attributes.

Inheritance, Interfaces and Serialization.

XML Serialization and Remoting.

Summary.

Resources.

Specifications.



3. SOAP: Invoking Web Services.

What Is SOAP.

SOAP Architecture.

The SOAP Message.

SOAP Message Formats.

Messaging with SOAP.

SOAP over HTTP.

Capturing SOAP Messages.

The Web Service.

The Client.

RPC with SOAP.

Section 5 Encoding.

When Things Go Wrong.

<faultCode>.

<faultString>.

<detail>.

Communicating Error Information.

Extending SOAP.

Handling Binary Data.

Base64 Encoding.

SOAP with Attachments.

A Simple Solution.

Summary.

Resources.

Specifications.



4. Describing Web Services.

Why Describe Web Services.

WSDL overview.

A WSDL Example.

WSDL SOAP Binding.

Document/Literal.

RPC/Encoded.

SOAP Header.

SOAP Fault.

Using WSDL Documents.

Product Checker.

The Weather Service.

Quote of the Day.

Other WSDL Features.

Documenting Your WSDL.

WSDL Imports.

Extending WSDL.

WSDL Operations.

HTTP Binding.

MIME Binding.

Summary.

Resources.



5. The Microsoft SOAP Toolkit.

Toolkit API Architecture.

Exposing Web Services.

Using the High-Level API.

Exposing Web Services.

Invoking Web Services.

Error Handling.

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.

Summary.

Resources.



6..NET WEB SERVICES.

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.

Distributed transactions.

Customizing the Service's WSDL.

Disabling Protocols.

Names and Namespaces.

Controlling SOAP Message Style.

Parameter Encoding.

One-Way Operations.

Ignoring/Specifying SOAP Action.

Understanding Web Service Clients.

Summary.

Resources.



7. SOAP Header and Fault.

Defining SOAP Headers.

Using Headers on the Service.

Using Headers on the Client.

Mystery Headers.

You Must Understand This.

Communicating Errors.

Summary.

Resources.



8. Interface-Based Web Service Development.

Defining Interfaces.

Implementing an Interface.

Implementing Multiple Interfaces.

Interfaces In Different Namespaces.

Programming against Interfaces.

Choosing Implementations At Runtime.

Summary.

Resources.



9. Handling Data IN.NET Web Services.

Serialization and Web Services.

Starting with a Relational Database.

Typed DataSets.

Nested Elements.

Round-Triping DataSets.

Starting with A Schema.

DataSets from Schemas.

Typed DataSets from Schemas.

Handling XML Documents.

Handling Object Arrays.

Summary.

Resources.



10. Reusable Infrastructure with Soap Extensions.

Web Service Request Processing.

Extending Web Service Request Processing.

SOAP Extension Processing.

Per-Instance Initialization.

Applying SOAP Extensions.

Applying SOAP Extensions with CLR Attributes.

Per-Service Initialization.

Per-Method Initialization.

Modifying Message Streams.

SOAP Extension Lifetime Summary.

Client-Side SOAP Extensions.

Authorization SOAP Extension.

Database Schema.

Overall Architecture.

LogOn/LogOff and Permissions Checking.

Using SOAP Headers.

The Authorization SOAP Extension.

Using The SOAP Extension.

Usage Accounting.

Using The Thread Pool.

An Example Client.

A Compression SOAP Extension.

Summary.

Resources.



11. UDDI: A Web Service.

What Is UDDI.

What UDDI Is Made Of.

UDDI Specifications.

UDDI Operators.

UDDI Registrars.

Private Implementations.

UDDI Usage Scenarios.

Finding Closest Business.

The Invocation Pattern.

Finding Trading Partners' Services.

Registering Services.

Publish/Subscribe Pattern.

Main Data Structures.

businessEntity.

businessService.

bindingTemplate.

tModel.

tModels as Service Types.

tModel as Meta data.

tModelInstanceInfo.

publisherAssertion.

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.

Programming UDDI.

UDDI Message Types.

A UDDI API Learning Aid.

Querying UDDI.

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.

UDDI Security.

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.

Windows.NET Server.

Summary.

Resources.



12. Other SOAP Toolkits.

Defining INTEROP.

INTEROP Problems.

HTTP.

WSDL.

SOAP.

INTEROP Efforts.

PocketSOAP Clients.

RPC/Encoded Messages with PocketSOAP.

Document/Literal Messages with PocketSOAP.

JAVA Clients.

IBM's Web Services Toolkit.

RPC/Encoded Messages.

Document/Literal Messages.

The Web Service Behavior.

Setting Up the Behavior.

Invoking Web Services.

Handling Complex Types.

VB 6 Clients.

.NET Clients.

Bad WSDL, No Problem.

Deeper Issues.

Summary.

Resources.



13. A Web Service Walkthrough.

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.

Usage Accounting.

Customizing the Documentation Page.

A VB 6 Client.

Leveraging UDDI.

Implementing the Invocation Pattern.

Summary.

Resources.



A: Data Type Mappings


B: .NET Web Services Tips and Tricks.

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.



Index. 0201774259T11042002.

Preface

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.

Chapter 1: Introduction to Web Services

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.

Chapter 2: XSD The Web Services Type System

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.

Chapter 3: SOAP Invoking Web Services

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.

Chapter 4: WSDL Describing Web Services

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: The Microsoft SOAP Toolkit

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.

Chapter 6: .NET Web Services

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.

Chapter 7: SOAP Header and Fault

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.

Chapter 8: Interface-Based Web Service Development

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.

Chapter 9: Handling Data In .NET Web Services

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.

Chapter 10: Reusable Infrastructure with SOAP Extensions

.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.

Chapter 11: UDDI: A Web Service

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.

Chapter 12: Other SOAP Toolkits

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.

Chapter 13: A Web Service Walkthrough

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.



0201774259P05142002

Foreword

Untitled Document Foreword by Aaron Skonnard
There definitely isn't a shortage of XML or Web services-related titles today. What's missing from most of these books, however, is a focus on the true "Web services platform," which consists of the core XML technologies most authors prefer to brush over or avoid altogether.
You can't blame authors alone for this dilemma since most developers who purchase their books want to avoid XML technologies at all costs and they demand the same focus from publishers. Developers who feel this way about Web services typically want tool vendors to hide the XML details and make every Web service look like a method on an object. These developers are missing the point.

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.

Aaron Skonnard
Instructor and Author, DevelopMentor
http://skonnard.com

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!

Keith Ballinger
Program Manager, XML Messaging
Microsoft
http://keithba.com

Index

Click below to download the Index file related to this title:
Index

Updates

Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership