Special Edition Using SOAP Special Edition Using John Paul Mueller
Special Edition Using SOAP Special Edition Using John Paul Mueller
Special Edition Using SOAP Special Edition Using John Paul Mueller
Special Edition Using SOAP Special Edition Using John Paul Mueller
1. Special Edition Using SOAP Special Edition Using
John Paul Mueller pdf download
https://ebookgate.com/product/special-edition-using-soap-special-
edition-using-john-paul-mueller/
Get Instant Ebook Downloads – Browse at https://ebookgate.com
2. Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...
Special edition using Microsoft Windows Vista Robert
Cowart
https://ebookgate.com/product/special-edition-using-microsoft-
windows-vista-robert-cowart/
Special Edition Using TCP IP Niit (Usa) Inc.
https://ebookgate.com/product/special-edition-using-tcp-ip-niit-
usa-inc/
Special Edition Using Microsoft Office PowerPoint 2007
Patrice-Anne Rutledge
https://ebookgate.com/product/special-edition-using-microsoft-
office-powerpoint-2007-patrice-anne-rutledge/
Special Edition Using the Internet Fourth Edition Table
of Contents Unknown
https://ebookgate.com/product/special-edition-using-the-internet-
fourth-edition-table-of-contents-unknown/
3. RibbonX For Dummies John Paul Mueller
https://ebookgate.com/product/ribbonx-for-dummies-john-paul-
mueller/
Mapping Hazardous Terrain using Remote Sensing
Geological Society Special Publication No 283 1st
Edition R. M. Teeuw
https://ebookgate.com/product/mapping-hazardous-terrain-using-
remote-sensing-geological-society-special-publication-no-283-1st-
edition-r-m-teeuw/
CSS3 for dummies 1st Edition John Paul Mueller
https://ebookgate.com/product/css3-for-dummies-1st-edition-john-
paul-mueller/
Artificial Intelligence For Dummies 2nd Edition John
Paul Mueller
https://ebookgate.com/product/artificial-intelligence-for-
dummies-2nd-edition-john-paul-mueller/
Special Teaching For Special Children Pedagogies For
Inclusion Lewis
https://ebookgate.com/product/special-teaching-for-special-
children-pedagogies-for-inclusion-lewis/
4. Contents at a Glance
Introduction
1 An Overview of SOAP 11
2 SOAP in Theory 33
3 An Overview of Security Issues for SOAP 61
4 Using SOAP to Create a Simple Application 81
5 Migrating an Application from DCOM to SOAP 121
6 Creating Remote Access Utilities 161
7 Creating Data Entry Forms and Surveys 195
8 Providing Remote Database Access 237
9 Moving to Web-based Applications 283
10 Working with PDAs 321
Appendixes
A SOAP Data Types and Data Type Conversions 345
B Microsoft Biztalk and SOAP 355
C Third-Party Tool Reference 371
D SOAP for Visual C++ Developers 389
Glossary 407
Index 427
Using
SOAP
John Paul Mueller
201 W. 103rd Street
Indianapolis, Indiana 46290
5. Special Edition Using SOAP
Copyright 2002 by Que
All rights reserved. No part of this book shall be repro-
duced, stored in a retrieval system, or transmitted by any
means, electronic, mechanical, photocopying, recording,
or otherwise, without written permission from the pub-
lisher. No patent liability is assumed with respect to the
use of the information contained herein. Although every
precaution has been taken in the preparation of this book,
the publisher and author assume no responsibility for
errors or omissions. Nor is any liability assumed for dam-
ages resulting from the use of the information contained
herein.
International Standard Book Number: 0-7897-2566-5
Library of Congress Catalog Card Number: 2001090465
Printed in the United States of America
First Printing: September, 2001
04 03 02 01 4 3 2 1
Trademarks
All terms mentioned in this book that are known to be
trademarks or service marks have been appropriately capi-
talized. Que cannot attest to the accuracy of this informa-
tion. Use of a term in this book should not be regarded as
affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete
and as accurate as possible, but no warranty or fitness is
implied. The information provided is on an “as is” basis.
The author and the publisher shall have neither liability
nor responsibility to any person or entity with respect to
any loss or damages arising from the information con-
tained in this book.
Associate Publisher
Dean Miller
Executive Editor
Candace Hall
Acquisitions Editor
Michelle Newcomb
Development Editors
Sarah Robbins
Maureen McDaniel
Managing Editor
Thomas F. Hayes
Project Editor
Karen S. Shields
Copy Editors
Karen Gill
Kay Hoskin
Indexer
Johnna Dinse
Proofreader
Marcia Deboy
Technical Editor
Russ Mullen
Team Coordinator
Cindy Teeters
Media Developer
Michael Hunter
Interior Designer
Ruth Harvey
Cover Designers
Dan Armstrong
Ruth Harvey
Page Layout
Tricia Bronkella
Rebecca Harmon
Cheryl Lynch
6. Contents
Introduction 1
1 An Overview of SOAP 11
What Is SOAP? 13
How SOAP Differs from DCOM and
CORBA 15
DCOM Wire Protocol 15
CORBA IIOP 19
Java RMI 20
SOAP, HTTP, and XML 22
Problems Solved by Using SOAP 24
Performance Issues 26
Tradeoffs of Using SOAP 26
When SOAP Is Faster 27
SOAP and the Web Server 28
Why Make the Move to SOAP? 28
Case Study 29
Definition of a Problem 29
Light at the End of the Tunnel 30
Perfection, an Ongoing Process 30
2 SOAP in Theory 33
Dissecting the SOAP Message 35
Viewing the HTTP Portion of
SOAP 37
Viewing the XML Portion of
SOAP 38
Working with the SOAP Message 39
Using SOAP with Your Current
Code 45
Discovering SOAP Services 47
Understanding Discovery of Web
Services (DISCO) 48
Working with the Web Service
Description Language (WSDL) 48
Understanding Universal Discovery,
Description, and Integration
(UDDI) 49
Putting Everything Together 50
Using SOAP to Move Data 52
Current SOAP Implementation
Problems 53
SOAP and XML-RPC 56
SOAP and XML Protocol
(XMLP) 56
Understanding SOAP Attachments 57
Case Study 58
3 An Overview of Security Issues
for SOAP 61
Introduction 62
Understanding SOAP Privacy and
Security Issues 63
What Are the Issues? 64
User Privacy Issues 65
Data Security Issues 66
Security Standards You Should Know
About 67
HTTP Authentication Framework 71
Secure/Multipurpose Internet Mail
Extensions (S/MIME) 73
Secure Socket Layer (SSL) 74
User Identification Issues 75
Using Smart Cards 75
Using Biometrics 76
Where Do You Go from Here? 77
Case Study 78
7. 4 Using SOAP to Create a Simple
Application 81
Introduction 82
An Overview of Microsoft’s SOAP
Toolkit 83
Toolkit Features 84
Three Types of Microsoft SOAP
Toolkit Application 86
Problems You’ll Experience 87
Using the Microsoft SOAP
Toolkit 90
An Overview of the Application 98
How SOAP Applications Differ 98
Basic Application Design and Data
Flow 99
Understanding the Simple Application
in This Chapter 100
Shortcuts for Creating SOAP
Applications Quickly 100
Understanding Namespaces, the Short
Version 102
Creating the Server Side Code 104
Designing the Component 104
Designing a Listener 105
Creating the Client Code 106
Testing the SOAP Application 109
Checking the Example Application
for Errors 110
SOAP Testing Tips 112
Testing Your Server 113
Handling SOAP Errors 116
Performance Concerns for all
Applications 117
Attributes Versus Elements 118
Code Optimization 119
Project 120
Special Edition Using SOAP
iv
5 Migrating an Application from DCOM
to SOAP 121
Introduction 122
SOAP Application Conversion
Prerequisites 123
An Overview of the Conversion
Process 123
Deciding Which Application Modules
to Change 126
Avoiding Protocol-Related Problems in
Modified Applications 129
Integrating New Modules with Existing
Application Elements 134
Implementing SOAP with COM
Language Binding 136
Productivity Tips 137
Updating a Simple Utility Program 140
Updating the Server-Side
Component 141
Creating the Local Component 142
Updating the Standard Client 144
Updating a Data Viewer 145
Understanding the Importance of
Three-Tier Programming 146
Updating the Common Business
Logic Component 147
Separating the Data Viewing Logic
from the Main Database
Component 148
Creating the Data Viewer Client 151
Updating a Complete Database
Application 153
Modified Application Concerns 155
Reliability 156
Security 157
Performance 158
Troubleshooting 159
8. 6 Creating Remote Access Utilities 161
Introduction 162
An Overview of Remote Access
Utilities 162
Uses for Remote Access Utility
Applications 163
Understanding the Web Services
Difference 165
When Is SOAP Overkill? 166
Making Utility Programs Flexible 167
Shortcuts for Using Existing
Components with Utilities 168
Utility Program Security Issues 169
Non-Issues for Utility Programs 170
Writing a Server Status Viewer 172
Creating the Server-Side
Component 173
Tips for Working with Server Status
Information 177
Working with the ISAPI Listener 179
Creating the Client 181
Creating a Simple Employee Check-In
Application 182
Creating the Component 183
Some Caveats About WSDL
Files 188
Creating the Client 190
Testing the Application 191
Project 193
Creating Your Own Utility 193
Upgrading the Server State and User
Check-In Utilities 194
7 Creating Data Entry Forms
and Surveys 195
Determining Which Data Entry Vehicle
to Use 197
Shortcuts for Data Entry and Survey
Applications 199
Reducing the Number of Round
Trips 199
Choosing Document or RPC Style
WSDL Files 200
Empty and NULL Value
Processing 202
Unregistering Your Control 203
Understanding CDATA Sections 204
Understanding XML Document
Transmission Restrictions 204
Using a Third-Party Product to
Document Your Components 206
Creating a Simple Survey Form 208
Creating the Database 210
Creating the Server-Side
Component 210
Designing a Survey Form 212
Testing the Input Application 214
Writing an Analysis Component 216
Designing an Output Application 218
Survey Application Data Processing
Concerns 221
Testing the Output 221
Creating a Simple Data Entry Form
Application 221
Creating the Database 223
Designing the Server-Side
Component 223
Creating a Data Entry Client 225
Testing the Data Entry
Application 227
Security, Privacy, Performance, and
Reliability Issues 227
Security 228
Privacy 229
Performance 230
Reliability 231
Handling Data Entry and Survey Form
Errors 232
Using Templates for Quick Forms 233
Using MIME for SOAP
Applications 234
Special Considerations for MIME
Messages 234
Where MIME Support Is Going 235
Project 236
v
Contents
9. 8 Providing Remote Database Access 237
Remote Database Application Uses and
Concerns 239
Concerns 240
Common Uses Based on SOAP
Limitations 242
Developer Shortcuts for Remote
Database Applications 243
Using Complex Data Types 245
Understanding the Problem 245
Understanding WSDL Generator
Differences 247
Describing the Interface 249
Creating the Server-Side
Component 251
Creating the Remote Client 252
Testing the Complete Data Type
Application 254
Defining the SQL Server Database 255
Creating the Server-Side
Component 255
Tips for Working with Database
Components 256
Working with SQLXML 257
Using Multiple Server-Side
Components 258
Generating the Code 259
Creating a Middle-Tier Component 263
Creating the Client-Side Application 267
Testing the Application 272
Quick Fixes for Remote Database
Applications 274
Loss of Connection 275
Odd Data Entry Errors 275
Performance Issues 276
Server Is Busy or Missing Objects 277
Addressing Transaction Issues 278
Special Edition Using SOAP
vi
Troubleshooting 279
How Do I Detect SOAP-Related
Database Errors? 279
Are the Database Shortcomings of
SOAP Permanent? 280
What Are the Top Ten Issues for SOAP
Database Developers? 280
9 Moving to Web-Based Applications 283
Uses for Web-Based Applications 285
Overcoming Problems with Web-Based
Applications 287
Updating a Thick Client Application for
Thin Client Use 289
Generating Proxy Classes the Easy
Way 290
Using Thick and Thin Clients
Simultaneously 291
Creating the Server-Side
Component 292
Creating the Processing
Component 295
Designing the Thick Client
Application 297
Designing a Thin Client Form
View 298
Designing the Thin Client Web
Page 299
Creating a Live Data Application 302
Handling Web-Based Application
Errors 303
Handling Connection Loss 304
Scripting Errors 304
Component Security Problems 305
Service Is in Use 305
ActiveX Component Can’t Create
Object 306
Nothing Happens or Strange Error
Message 307
10. vii
Contents
Security Issues for Web-Based
Applications 307
An Overview of the Potential Security
Solutions 309
Using SSL 311
Using IBM Web Services Toolkit 311
Quick Fixes for Memory and Other
Resource Problems 312
Component Interactions 313
Benefits of the Script Debugger 314
Human Language Support 316
ASP and Component
Communication 316
Component Doesn’t Support Locale
Error 317
Case Study 317
An Overview of the Problem 317
The Solution 318
The SOAP Connection 319
A Negative to Consider 319
10 Working with PDAs 321
Special Needs for PDAs 323
The Case for PDAs 323
Special Add-ons 324
Networking 325
Operating System 325
Getting SOAP for Your PDA 326
pocketSOAP 327
IdooXoap 328
kSOAP 328
Updating the Complex Type
Example 329
Creating the Client Code 329
Differences in Implementation 331
Testing the Application 331
Updating the Computer Name
Example 332
Creating the Code 333
A Look at the Message Traffic 335
Server Differences Revisited 337
Testing the Application 338
Addressing PDA Display Issues 338
Screen Size 339
Using Color 340
Pointer Pointers 340
Beyond PDAs to Telephones 341
Understanding PDA Security Issues 341
Troubleshooting 343
Why Does the Example Seem to
Run, and Then Display Nothing
Onscreen? 343
Why Doesn’t My Code Run Properly
on All of My PDAs? 344
How Do I Fix Messaging Problems
with the Client? 344
A SOAP Data Types and Data Type
Conversions 345
Data Types Overview 346
Complex Data Types 349
Differences in Implementation 351
Data Type Conversions 353
B Microsoft BizTalk and SOAP 355
What Is BizTalk? 357
How BizTalk and SOAP Work
Together 358
An Overview of Useful BizTalk Utilities
for SOAP 359
BizTalk Editor 359
BizTalk Mapper 363
BizTalk Orchestration Designer 365
BizTalk Fixes a Few SOAP Problems 368
Is BizTalk the SOAP Add-On for Your
Company? 369
11. An Overview of the Application 394
Creating the Server-Side
Component 395
Generating a Static WSDL File 395
Developing the Server-Side
Component Code 396
Making the CONFIG.XML
Entry 399
Creating the Client 400
Initial Setup 400
Adding the Code 401
Handling SOAP Errors 404
Glossary 407
Index 427
Special Edition Using SOAP
viii
C Third-Party Tool Reference 371
Finding the Right Tools 372
Tools That Make You Productive 372
Tools That Fix Problems 373
Masker 2.0 374
MZTools Add-In for Visual Basic 376
psWSDL Wizard 381
tcpTrace 383
XML Spy 384
Typical File Views 385
Viewing Data in More Than
One Way 386
Special Features 388
D SOAP for Visual C++ Developers 389
Introduction 390
An Overview of the 4S4C SOAP
Toolkit 391
Features 391
Installation 393
12. About the Author
John Mueller is a freelance author and technical editor. He has writing in his blood, hav-
ing produced more than 50 books and more than 200 articles to date. The topics range
from networking to artificial intelligence and from database management to heads-down
programming. Some of his current books include several COM+ developer guides, a small
business and home office networking guide, and a Windows 2000 Performance, Tuning,
and Optimization book. His technical writing skills have helped more than 25 authors
refine the content of their manuscripts. John has provided technical editing services to both
Data Based Advisor and Coast Compute magazines. He has also contributed articles to maga-
zines like SQL Server Professional, Visual C++ Developer, and Visual Basic Developer.
When John isn’t working at the computer, you can find him in his workshop. He’s an avid
woodworker and candle maker. On any given afternoon, you can find him working at a lathe
or putting the finishing touches on a bookcase. One of his newest craft projects is glycerin
soap making, which comes in pretty handy for gift baskets. You can reach John on the
Internet at JMueller@mwt.net. John is also setting up a Web site at http://www.mwt.net/
~jmueller/. Feel free to take a look and make suggestions on how he can improve it. One of
his current projects is creating book FAQ sheets that should help you find the book informa-
tion you need much faster.
13. Dedication
This is my 50th book, so I spent time considering everything that has gone on during the past
13 years. So many people have helped me that listing them here would consume many pages.
Authors require help from those around them. They not only require technical help, but also
help with other issues such as the daily needs that we all have. I dedicate this book to all of those
tireless helpers who have meant so much to me over the years. I wish that I could list all of you
on this page.
Acknowledgments
Thanks to my wife, Rebecca, for working with me to get this book completed. I really don't
know what I would have done without her help in proofreading my rough draft. She also
helped research, compile, and edit some of the information that appears in this book.
Russ Mullen deserves thanks for his technical edit of this book. Russ greatly added to the
accuracy and depth of the material you see here. In addition, he spent many hours working
with me through e-mail to find solutions to some of the problems that SOAP presented,
and he's responsible for providing many of the Web-site addresses sprinkled throughout the
book. Russ went even further in this book; he spent hours finding just the right equipment
to use when performing his technical edit. I can never sufficiently express my thanks to him.
As you read this book, you'll see mentions of many third-party products and in-depth looks
at products from major vendors. The SOAP community provided much of this information
through conversation and by checking the technical accuracy of both code and theory. I'd
like to thank everyone, but space won't allow me to mention them all. However, I would
like to mention that the people on the Developmentor list server and the Microsoft SOAP
newsgroups were exceptionally helpful.
Some special people stand above the rest. Simon Fell helped me in many areas, including
the complex type and PDA examples. He also helped with the products he develops and
supports, including 4S4C and pocketSOAP. Roger Wolter helped in many of the Microsoft
SOAP Toolkit examples. He read and commented on many of the theory sections of the
book. Paul Kulchenko discussed MIME and SOAP attachments with me, among other top-
ics. Karen Watterson provided several tips for the book and pointed me toward some of the
third-party products. Rosimildo DaSilva taught me about SOAP and embedded systems.
Yasser Shohoud helped me understand the problems with user-defined type support in
SOAP toolkits. Birgit Reidinger helped me with XML Spy and discussed some compatibil-
ity issues with me. Ahmad Baitalmal provided me with a glimpse of a completely functional
SOAP application that appears as one of the case studies in this book. He reviewed and
helped me refine the case study so that you could read about a real-world application in
action. Jacek Kopecky provided me with information about IdooXoap and discussed PDA
issues with me.
14. Every book begins with a good outline and proposal. I would like to thank the following
reviewers for their help in getting this book off to a good start: Clemens Vasters, Jeremiah
Talkar, Ken Rabold, Madhu Govinda, Rob Caron, and Alek Aslom. All of these reviewers
provided solid comments that affected the final content of the book and my approach in
discussing certain topics.
Matt Wagner, my agent, deserves credit for helping me get the contract in the first place
and taking care of all the details that most authors don't really think about. I always appreci-
ate his help. It's good to know that someone wants to help.
Finally, I would like to thank Candace Hall, Michelle Newcomb, Sarah Robbins, Karen
Shields, Maureen McDaniel, and other members of the Que staff for their assistance in
bringing this book to print. Writing a book about SOAP presented many logistical chal-
lenges, and I appreciate their willingness to give me the time required to put a good book
together. Que was also kind enough to provide me with a Palm to use in the PDA section of
this chapter.
15. Tell Us What You Think!
As the reader of this book, you are our most important critic and commentator. We value
your opinion and want to know what we're doing right, what we could do better, what areas
you'd like to see us publish in, and any other words of wisdom you're willing to pass our way.
As an associate publisher for Que, I welcome your comments. You can fax, email, or write
me directly to let me know what you did or didn't like about this book—as well as what we
can do to make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this book, and that
due to the high volume of mail I receive, I might not be able to reply to every message.
When you write, please be sure to include this book’s title and author as well as your name
and phone or fax number. I will carefully review your comments and share them with the
author and editors who worked on the book.
Fax: 317-581-4666
Email: feedback@quepublishing.com
Mail: Associate Publisher
Que
201 West 103rd Street
Indianapolis, IN 46290 USA
16. INTRODUCTION
In this chapter
What's in This Book 3
On the Web 6
Intended Audience 7
Equipment Used for This Book 7
Conventions Used in This Book 8
17. 2 Introduction
It is difficult to get some types of applications to work on the Internet because of the lack of
technologies that can move data from one point to another safely and with few technical
problems. In addition, developers need a single standard for transferring data that will work
on all operating system platforms. The need for a single solution for data transfer is becom-
ing apparent as financial institutions begin moving their operations to the Internet.
Recently, credit card companies began actively promoting their Web site as a better alterna-
tive for customer support than calling on the telephone. Many trade journals have also had
stories of major financial institutions making the move to the Internet.
DCOM and CORBA, the two most popular technologies currently in use, have a myriad of
technical problems, including lack of operating system platform independence. The fact
that many Web servers with firewalls won’t work with either technology only complicates
matters. In addition, the use of two technologies means that developers end up working
twice as hard to get their distributed applications to work.
Clearly, developers require a new data transfer technology, and I believe that technology
will be the Simple Object Access Protocol (SOAP). SOAP is based on XML and allows data
transfer through firewalls with a minimum of problems. Because SOAP is XML-based,
developers find that it suffers few platform-related problems. (Of course, compatibility is
always an issue with a new technology.) In short, SOAP is the technology that you need to
solve your distributed application programming problems. It will allow you to transfer data
between disparate machines more efficiently and with fewer problems.
SOAP is such a new technology that most developers have to rely on the white papers pro-
duced by developers of the technology for reference purposes. Special Edition Using SOAP
provides the kind of information that you’ll need to get your applications working quickly
after you understand the basic theory behind SOAP. This book will help you gain
proficiency in SOAP in the following ways:
■ A technology overview that cuts out superfluous information and provides just the
information needed to write applications
■ Detailed examples that show how to create new applications as well as convert
existing ones
■ Tips that show how to become proficient with SOAP quickly
■ Solutions for problems with using SOAP in certain environments
■ Performance and other tips that will make applications perform faster and more
reliably
■ A data type and data conversion reference
■ An overview of Microsoft’s Biztalk technology
■ A third-party tool reference that will allow you to start working with SOAP immediately,
rather than build tools first.
18. 3
What’s in This Book
As you can see, this book provides complete coverage for the developer who needs to com-
plete projects quickly. Special Edition Using SOAP focuses on getting work done, rather than
on the theoretical aspects of the technology. Of course, the book covers all of the details,
such as ensuring that security is in place and that the application will perform reliably.
Although the focus is on speed, the book will also provide tips that ensure development
speed gains aren’t overshadowed by hours of debugging later. Special Edition Using SOAP is
the book you need on your shelf because it provides the real-world tools that you require to
make Web-based applications a reality.
What’s in This Book
I’ve designed this book to get you up and running with SOAP as quickly as possible. In fact,
this book contains only three theory chapters—the remaining seven chapters focus on
example code and how to accomplish work quickly. You’ll find a wealth of productivity aids
and tips on how to avoid pitfalls. The following sections provide an overview of the book.
Chapter 1: An Overview of SOAP
This chapter tells you what SOAP is and how it differs from older technologies, such as
DCOM and CORBA. It also talks about how SOAP uses HTTP and XML with some addi-
tional elements to create a message. Finally, we’ll talk about the advantages and disadvan-
tages of using SOAP to develop applications. This includes problems you might experience,
such as getting the same performance from your application as before you converted it to
use SOAP.
Chapter 2: SOAP in Theory
SOAP is a protocol (set of rules), rather than an application programming interface (API) or
programming methodology. This chapter will help you understand how SOAP works and
why it can avoid certain problems that DCOM and CORBA can’t in a distributed environ-
ment. The coverage in this section will be complete, but extremely focused. The chapter
provides many references to Microsoft and other vendor material on the Internet. Even if
you need a detailed view of the inner workings of SOAP, the combination theory overview
in this chapter and references to white papers on the Internet should provide everything
you need.
Chapter 3: An Overview of Security Issues for SOAP
Security issues are a concern for any application. Protecting data is a problem that has
plagued computers since the very beginning. The distributed application environment
provided by the Internet only makes matters worse.
19. 4 Introduction
This chapter discusses the major security concerns for any SOAP application. Later chap-
ters will discuss specific concerns for particular application types. You’ll also find a discus-
sion of privacy issues in this chapter. Securing the user’s identity is becoming more
important as countries pass laws requiring secure and hassle-free communication.
Finally, this chapter discusses some alternative technologies, such as biometrics, for securing
your system. It’s important to look at these alternatives as a way to reduce coding require-
ments and application usage complexity.
Chapter 4: Using SOAP to Create a Simple Application
This chapter contains the first complete SOAP example in the book. The example isn’t that
complicated, but we do examine it thoroughly. The chapter will discuss issues such as error
handling and testing techniques. We’ll also talk about methods for creating WSDL files and
discuss how those WSDL files reflect the underlying component technology. This chapter
concentrates on the Microsoft SOAP Toolkit.
Chapter 5: Migrating an Application from DCOM to SOAP
Many developers will spend more time converting existing applications to SOAP than cre-
ating new ones. This chapter shows how to move an application from the DCOM environ-
ment to the SOAP environment. It also shows how to maximize your current coding
investment by continuing to use as many of the DCOM modules as possible. We’ll also
discuss some practical issues. For example, SOAP isn’t always the correct solution to your
application problem; you might find that DCOM is still the right tool for the job.
Chapter 6: Creating Remote Access Utilities
More employees are on the road than ever before. They want access to their applications
back at the office and it’s your responsibility to provide that access. In addition, a remote
user might have new application needs, such as a utility for quickly checking in at the home
office without calling. This chapter looks at these issues and more. You’ll find two program-
ming examples that show how to use SOAP for the remote user’s needs.
Chapter 7: Creating Data Entry Forms and Surveys
Web-based applications are useful because you can share information with others outside
your company. You can also gather information from others and use it for analysis. For
example, companies are always looking for new ways to request information from customers
and use it to improve sales or service.
SOAP is a useful technology because it extends the data entry form and survey application
to perform tasks that you can’t generally perform now. For example, such an application can
completely automate the process of entering new data into the database. For that matter,
you can automate the analysis as well and send the results to concerned parties.
20. 5
What’s in This Book
This chapter also discusses some practical issues you need to consider, such as using tem-
plates to reduce the amount of coding required to create an application. Templates are espe-
cially important for survey applications where the presentation changes regularly. We’ll also
discuss some special issues, such as the enhanced error-handling requirements for a survey
application.
Chapter 8: Providing Remote Database Access
The database is the center of every business. In fact, the organized storage of data is the
center of every business, even those that don’t have a computer (admittedly rare today).
SOAP provides new opportunities to handle data in the distributed application environ-
ment. Not only can you create new data connections internally, but also partners can now
access your data directly as needed.
This chapter addresses some special database applications needs. For one thing, most devel-
opers want to use transactions to ensure reliable data transfer from one point to another.
We’ll discuss this issue along with methods for fixing database application problems.
Although this chapter won’t provide you with a complete tutorial on database design and
implementation, it does provide you with the SOAP piece of the puzzle.
Chapter 9: Moving to Web-Based Applications
Several of the previous chapters have led up to this one. The application of the future will
always provide a distributed connection. The user won’t care where he uses the application
because it won’t matter. Web-based applications represent the future of programming tech-
nology. This chapter shows you how to create some simple Web-based applications.
Of course, the important issue is preserving all of that code you have right now. This chap-
ter also tells you how to preserve your investment by leveraging your current code base.
You’ll avoid creating applications from scratch by carefully designing your Web-based
application to hook into the existing application infrastructure.
Chapter 10: Working with PDAs
Many users are completely hooked on the personal digital assistant (PDA). This little device
holds a significant piece of their lives. It stores all of their contact information, tasks they
need to perform, and schedule for upcoming weeks. Unlike a desktop computer, a PDA is
small and you can take it with you anywhere to record new information. In short, PDAs are
becoming an essential asset for most employees.
It won’t be long before you’ll find yourself moving existing applications to the PDA—at
least the applications that are small enough to move. This chapter examines methods for
moving common applications to the PDA. We’ll look at two examples so that you can see
some of the pitfalls in developing a PDA solution.
21. 6 Introduction
This chapter also discusses some of the issues surrounding PDA development. We’ll cover
SOAP-specific issues, such as the selection of a SOAP toolkit for PDA development. This
chapter also discusses a few general PDA issues. For example, the small screen that a PDA
provides will affect the way that you develop the application interface.
Appendix A: SOAP Data Types and Data Type Conversions
This short appendix tells what data types SOAP supports and how to convert data from
existing languages to a format that SOAP will understand. It’s a quick reference with code
snippets that show how to perform the required work. There aren’t any complete program-
ming examples.
Appendix B: Microsoft Biztalk and SOAP
Although Microsoft isn’t the only company working with SOAP, for readers of this book,
Microsoft will probably be a major supplier of SOAP technology. Biztalk provides access to
Microsoft’s XML and SOAP technology implementations, so a discussion of this important
server product is essential. This appendix provides an overview of Biztalk as a whole, plus
specifics on how this server will provide XML and SOAP services.
Appendix C: Third-Party Tool Reference
Because SOAP is so new, you’ll want to know what types of tools are available from third
parties. This appendix provides a list of the tools that are available at the time of writing.
This list isn’t complete, but it does represent some of the better tools available for SOAP
development today.
Appendix D: SOAP for Visual C++ Developers
Most of the examples in this book concentrate on Visual Basic or some form of scripting.
This appendix discusses SOAP for the Visual C++ developer. You’ll find example code and a
complete discussion of Visual C++ development issues. Like the example in Chapter 4,
“Using SOAP to Create a Simple Application,” the appendix example is somewhat simple,
but the discussion is in depth. We’ll talk about issues such as testing and SOAP error han-
dling, as well as the creation of client-side code.
On the Web
We’ve provided all the source code for the examples in the book at an easy to find website.
Just go to www.quepublishing.com and check out the site. There you will find easy to down-
load executables that contain all the source code separated by chapter. Everything you need
to complete the exercises is right there.
22. 7
Equipment Used for This Book
Intended Audience
I wrote this book for the developer who has a good understanding of programming princi-
ples and has worked with distributed applications sometime in the past. In other words, a
complete novice will have a difficult time understanding the material, but someone with a
little experience will get some information from it almost immediately. All of the examples
assume that you know something about Visual Basic or Visual C++ programming and have
worked with DCOM or CORBA in the past. You need to understand terms like interface
because the theory sections in this book are short and concentrate only on SOAP principles.
As the book progresses, the topics become more difficult and the anticipated understanding
level of the reader increases. By the time you reach the remote database programming
example (Chapter 8, “Providing Remote Database Access”), I’m assuming that you’re at
least an intermediate to advanced reader who has spent some time developing remote data-
base applications. You must understand how to work with databases. Although the chapters
do provide details on constructing the applications, you won’t find any information about
working with the database managers or procedural steps for constructing the tables. All that
I provide is the schema you need to build the application.
This doesn’t mean that I’m going to bury you with arcane information; this book covers the
various topics in simple terms that you’ll find easy to understand. The purpose of this book
is to discuss as many SOAP issues as possible in terms that everyone will understand.
However, a beginner will still very likely get lost as the book progresses because there’s little
in the way of introductory information.
Equipment Used for This Book
I made some assumptions while writing the application programming examples in this book.
First, you need at least two machines: a workstation and a server. This two-machine setup is
the only way that you’ll see SOAP in action and truly know it works as anticipated. During
the writing of this book, I used a Windows 2000 and Windows 98 workstation. The servers
included Windows 2000 Server and Red Hat Linux. I also experimented with two Web
servers running on a NetWare file server, and two PDAs (Windows CE-based Pocket PC
and a Palm).
I tested all of the examples in this book with Visual Studio 6.0 Enterprise Edition. Most of
the examples use Visual Basic, but you’ll also find examples written in Visual C++ and in
various scripting languages. None of these examples is guaranteed to work with any other
programming language products and none of them will work with the educational versions
of Visual Studio.
23. 8 Introduction
You must install the latest service packs for all products before the examples will work prop-
erly. SOAP is a new technology that relies on the latest versions of many DLLs, especially
the XML parsers used in the examples. This book doesn’t support the beta versions of the
SOAP toolkits unless I specifically note that I’ve used a beta version. Make sure you use
release versions of the SOAP toolkits, especially the Microsoft SOAP Toolkit Version 2.0.
Some of the example programs rely on a database manager. I used SQL Server 7.0 for all of
the examples in this book. The source code provides scripts that I tested on SQL Server,
but may work with other database managers as well. The sample data is in delimited text
format and you should be able to import it into any database manager. In short, you can use
any database manager you want, but the examples might require modification to do so.
Conventions Used in This Book
There are several conventions used within this book will help you get more out of it. Look
for special fonts or text styles and icons that emphasize special information.
■ Sometimes I’ll ask you to type something. This information always appears in bold type
like this: Type Hello World.
■ Code normally appears on separate lines from the rest of the text. However, there are
special situations where small amounts of code appear directly in the paragraph for expla-
nation purposes. This code will appear in a special font like this: Some Special Code.
■ Definitions are always handy to have. I’ll use italic text to differentiate definitions from
the rest of the text, like this: A CPU is a required part of your machine.
■ In some cases, I won’t have an exact value to provide, so I’ll give you an idea of what
you should type by enclosing it in angle brackets like this: Provide a <Machine Name>
value for the Name field.
■ You’ll always be able to recognize menu selections and command sequences because
they’re implemented like this: Use the File | Open command.
■ URLs for Web sites are presented like this: http://www.microsoft.com.
Notes help you understand principle or provide amplifying information. In many cases,
a note is used to emphasize some piece of critical information that you need.
All of us like to know special bits of information that will make our job easier, more
fun, or faster to perform. Tips help you get the job done faster and more safely. In
many cases, the information found in a Tip is drawn from experience, rather than
through experimentation or the documentation.
24. 9
Conventions Used in This Book
Any time you see a caution, make sure that you take special care to read it. This infor-
mation is vital. I’ll always uses the Caution to designate information that will help you
avoid damage to your application, data, machine, or self. Never skip the Cautions in a
chapter, and always follow their advice.
Finding what you need quickly is more important than ever before. Many people work
at a pace that they call Internet time. They no longer have the luxury of performing
hours of research to find that magic piece of information needed to complete an appli-
cation. With this in mind, I’ve spent the time you don’t have to find unique information
sources on the Internet. This icon will always provide that information so that you can
get what you need quickly.
26. An Overview of SOAP
In this chapter
What Is SOAP? 13
How SOAP Differs from DCOM and CORBA 15
SOAP, HTTP, and XML 22
Problems Solved by Using SOAP 24
Performance Issues 26
SOAP and the Web Server 28
Why Make the Move to SOAP? 28
Case Study 29
1
CHAPTER
27. 12 Chapter 1 An Overview of Soap
At one time in the history of the PC, computing consisted of a single computer using simple
applications that relied only on local resources. Eventually, networking changed the way
people shared expensive peripherals and data, but the data was still, to an extent, stored
locally. As companies grew and became more dependent on the PC, the concept of the
Local Area Network (LAN) gave way to the Metro Area Network (MAN) and Wide Area
Network (WAN). The client/server architecture of days gone by allowed a limited form of
distributed computing. However, there was still a direct connection and all of the data
appeared within the confines of one company, so sharing data was still relatively easy.
Today, computing is all about distributed applications running on machines that may not
know anything about each other. Data is no longer restricted to one company; business-to-
business communication is now the norm. Consequently, these machines may not even have
a direct connection or access the network at the same time. Data sharing occurs between
individuals who may not ever meet. In short, there isn’t a direct connection between the
provider and the user of data anymore, which means the rules used in the past don’t work
well for modern communication needs.
Early computers relied on protocols (predefined rules) that ensured safe data transfer
between machines that knew what to expect from each other. These protocols work fine on
a LAN, MAN, or WAN because there’s a direct connection between machines. A protocol
designed for the LAN environment, however, may run into problems when dealing with
something like the Internet. For example, the protocol may expect to find another Windows
machine when the client really needs to communicate with a Unix server. That’s precisely
what’s happened and why we need a new protocol named Simple Object Access Protocol
(SOAP). The fact that you’re reading this book means that you already have some idea of
why you need SOAP and may even know something about it from a technical perspective.
The first section of this chapter is going to tell you more about SOAP—what it does and
how it works. This section isn’t going to provide many details, but it will prepare you for the
detailed discussion in Chapter 2. I want to present a basic overview of the technology before
jumping into the details.
SOAP is different from older protocols. It provides some features these older protocols
don’t have. For example, unlike Distributed Component Object Model (DCOM) and other
binary protocols, SOAP won’t interfere with the operation of the firewall on your Web
server. It uses a plain text transfer method that firewalls readily accept. This means that you
can maintain the integrity of your company’s Web site, and still get the data you need.
Some of these neat new features come at a cost. You lose some of the features provided by
the older protocols. For example, security is an issue that many SOAP developers are trying
to address as of this writing. The second section of the chapter provides a brief comparison of
SOAP to older protocols, such as DCOM and Common Object Request Broker Architecture
(CORBA). You’ll learn how SOAP excels and where it provides less than stellar results.
SOAP actually interacts with other Web technologies that you may have used in the past.
Although SOAP can theoretically rely on any transport protocol, the current toolkit from
Microsoft uses the same Hypertext Transfer Protocol (HTTP) used to move Web pages
across the Internet. (Note that you can use any reliable protocol to transfer SOAP
28. 13
What Is SOAP?
messages—HTTP is simply the most straightforward and easily accessible method right
now, so developers are using it.) In addition, SOAP relies on the eXtensible Markup
Language (XML) to format data before moving it from one point to another. The third
section of the chapter discusses the interaction between these three technologies.
As previously mentioned, Microsoft designed SOAP to address specific problems. Technologies
such as DCOM just can’t make the grade in the distributed computing environment of the
Internet. The fourth section of the chapter discusses these problems in detail and explains how
SOAP addresses them.
SOAP changes the performance picture—it uses a new technique to transfer data, so differ-
ences in performance are expected. In many cases, SOAP is slower than older technologies
like DCOM. You can’t beat a direct binary connection between client and server that relies
on optimized data transfers. However, given the distributed nature of applications today,
there are also situations when SOAP is faster than binary technologies. In the fifth section
of the chapter, we’ll talk about SOAP performance issues. This section also talks about ways
of mitigating some of those performance losses by using better coding techniques.
Microsoft designed SOAP to work with the Internet—which means you’ll eventually run
into a Web server. The sixth section of the chapter discusses how SOAP works with a Web
server to handle client requests. We’ll talk about some of the mechanics you’ll need to know
later, like common storage locations for files and some of the implementation details.
The final section of the chapter discusses a topic that many of you will ask about once you
see everything required to move to SOAP. It’s important to know why this move is so
important and how you’ll benefit from it. SOAP is a great technology with a very important
purpose for your company. This section discusses why you need to include SOAP in your
programming toolbox.
What Is SOAP?
SOAP is a lightweight communication protocol based on the eXtensible Markup Language
(XML). It allows applications and components to exchange data. As mentioned in the intro-
duction, SOAP currently relies on HTTP as a transport protocol, but could use any reliable
transport protocol to transfer data. In addition, SOAP is useful for many data transfer needs,
including LANs, WANs, and MANs—it’s not just for the Internet.
1
Ch
Learning XML is an essential part of learning SOAP. You don’t have to become an XML
guru, but knowing the basics is a requirement. Many XML Web sites offer tutorials and
other information about this technology. For example, DevelopMentor (http://www.
develop.com/dm/dev_resources.asp) provides good tutorials on this and other
distributed application topics from a Microsoft perspective. W3Schools (http://www.
w3schools.com/ xml/) provides detailed tutorials in small segments. Another good
place to look for XML training is Courses in XML by QTrain (http://www.qtrain.
net/). Once you finish the basic XML tutorials, you’ll want to visit XSLT.com (http://
xslt.com/resources_tutorials.htm) and learn more about data transformation
29. 14 Chapter 1 An Overview of Soap
Despite what you may have heard, SOAP isn’t another conspiracy by Microsoft to take over
the world—it’s a protocol supported by many vendors. Some of the most notable contribu-
tors to SOAP are Ariba, Commerce One, Compaq, DevelopMentor, HP, IBM, IONA,
Lotus, SAP, and UserLand. Vendors who support SOAP hope it will eventually gain stan-
dards status. The World Wide Web Consortium (W3C) is currently discussing SOAP. You
can read the W3C comments at http://www.w3.org/Submission/2000/05/Comment and see
the initial specification at http://www.w3.org/TR/SOAP/.
Since SOAP is a new protocol that isn’t tied to a particular operating system, the vendors
working on it are free to add features that make SOAP especially suited to distributed
application use. Three of the features that make SOAP attractive are:
■ No ties to existing component technologies—SOAP will theoretically work with
any platform.
■ No ties to a particular programming language; you can use SOAP with any language
capable of outputting text. (You can also use a special toolkit to output the formatted
text as well, seen in Chapter 4.)
■ Easy to learn and simple to extend.
You’ll see as the book progresses that these three points are important because they’ll affect
your perception of SOAP as an application solution. For example, the fact that vendors haven’t
tied SOAP to a particular programming language means that you’ll very likely see a wealth of
toolkits on the market. These toolkits may not all produce compatible code. In addition, they
may rely on server or client-side components that aren’t compatible with other SOAP imple-
mentations. Problems like these will become less noticeable as SOAP nears standardization.
The last point is important as well. SOAP really is easy to learn. It’s verbose, which means
that some of the code listings you see become quite long and look complicated, but the
underlying technology is simple. The complexity that you’ll see as we work with SOAP
throughout the book comes from the various extensions that Microsoft and other vendors
add. These extensions provide additional flexibility and allow you to tailor a SOAP imple-
mentation to specific needs.
techniques. ZVON.org (http://www.zvon.org/index.php?nav_id=2) includes
tutorials on both XML namespaces and the eXtensible Stylesheet Language
Transformations (XSLT).
SOAP is a very hot topic right now because it offers so much. However, getting the latest
news can prove difficult because the specifications change so quickly. You can usually rely
on news Web sites and newsgroups to provide updated information on a regular basis.
For example, the SOAP News Web site at http://soap.weblogs.com/ provides up to
the minute information about this new standard. DevelopMentor and other organizations
provide list servers that discuss SOAP. The main public SOAP newsgroups appear on the
30. 15
How SOAP Differs from DCOM and CORBA
SOAP is intertwined with other technologies as well. We’ve already discussed its connection
with XML (and by extension, XSLT ). Creating a SOAP implementation is only the first
step. If you want others to use your implementation, you need to advertise it in some way.
As the book progresses, we’ll talk about the significance of Universal Description,
Discovery, and Integration (UDDI). You can find out more about this technology at
http://www.uddi.org/. The main purpose of UDDI is to allow vendors to advertise
services publicly, including those that rely on SOAP.
Another technology that figures prominently in the SOAP picture is Web Services
Description Language (WSDL). We’ll discuss this technology in detail in Chapter 2.
WSDL provides a description of objects and documents on a Web server in the form of a
schema. It also allows advanced features of some programming IDEs to display a list of
functions applicable to a particular object. Look at http://www-106.ibm.com/developerworks/
library/w-wsdl.html to find out more about WSDL.
How SOAP Differs from DCOM and CORBA
SOAP, like DCOM and CORBA, is a wire protocol. The term wire protocol indicates that appli-
cations use SOAP to move data from one place to another. Many people assume that because
COM and DCOM have similar names that they’re the same kind of protocol. COM is actually
a specification that tells how to create components—DCOM enables those components to
interact across a network. It’s an important difference to understand because Microsoft designed
SOAP to overcome some of the limitations of DCOM, not to replace it or replace COM itself.
The first two sections below provide a comparison of SOAP with DCOM and CORBA.
We’ll look at how the protocols compare from a result and method perspective. The essential
difference between SOAP and the other two protocols is that SOAP uses plain text, while
DCOM and CORBA use a binary format.
A third section discusses the Java Remote Method Invocation (RMI). This is a relatively
simple wire protocol that’s designed to support Java. It differs from DCOM and CORBA
because Java RMI is only designed to support Java—these other protocols support any
language. The Java RMI is still a binary protocol, so it differs from SOAP in that regard.
DCOM Wire Protocol
The DCOM Wire Protocol, also known as the DCOM Network Protocol or DCOM for
short, is a high-level protocol based on the Distributed Computing Environment (DCE)
Remote Procedure Call (RPC) Network Protocol and implemented by Microsoft. DCOM
relies on several lower-level protocols to accomplish its work. Like SOAP, DCOM oversees
the data transfer; it doesn’t perform the mechanics of moving the data. As an enabling
1
Ch
Microsoft server (news.microsoft.com). You’ll find a wide range of topics in news-
groups like microsoft.public.msdn.soaptoolbox, microsoft.public.xml.
soap, and microsoft.public.xml.soapsdk.
31. 16 Chapter 1 An Overview of Soap
protocol, DCOM ensures that the client and server can talk to each other, but doesn’t
participate in the conversation or manipulate the data.
Ethernet Driver
Internet Protocol (IP)
DCOM Network Protocol
(DCE RPC Network Protocol)
COM
Runtime
Proxy
Client
Service Control
Manager (SCM)
OLE32
User Datagram Protocol (UDP)
Winsock Driver
Security Provider
Protocol Stack
Ethernet Driver
Internet Protocol (IP)
DCOM Network Protocol
(DCE RPC Network Protocol)
COM
Runtime
Stub
Server-
Side
Component
Service Control
Manager (SCM)
User Datagram Protocol (UDP)
Winsock Driver
Security Provider
Protocol Stack
Figure 1.1
Internet Explorer
versions 5.5 and
above can display
SOAP messages in a
simple format.
Microsoft didn’t create the DCE RPC Network Protocol specification. The Open Software
Foundation (OSF), which is now part of the Open Group, created it. You can find out
more about the DCE RPC Network Protocol specification at http://www.osf.org/.
Find a good RPC overview at http://www.ja.net/documents/ NetworkNews/
Issue44/RPC.html. There’s an article about the inner workings of DCOM at http://
www.microsoft.com/msj/0398/dcom.htm. The main Microsoft DCOM Web site is
at http://www.microsoft.com/com/tech/DCOM.asp.
Figure 1.1 shows a generic DCOM component setup. We aren’t doing anything fancy here
since the idea is to learn how the connection between the client and server works. Table 1.1
tells you about the various components shown in Figure 1.1. Notice that the message goes
through quite a few transition layers. These layers figure prominently in the performance
discussion later in the chapter.
32. 17
How SOAP Differs from DCOM and CORBA
Table 1.1 Components of a Typical DCOM Data Transfer
Component Description
Client Originates requests to the server for resources and support.
DCOM assumes this is a standard desktop application
operating on a LAN.
OLE32 DLL containing the methods used to create an instance
of an object (along with a wealth of other functionality).
Service Control Manager (SCM) Creates the initial connection between the client and
server. DCOM only uses the SCM during object
creation. After the client and server establish a connection,
the SCM steps out of the picture. The SCM represents
one of the handshaking elements that we’ll talk about
later in the performance section of the chapter.
Proxy The server’s presence within the client’s address space.
The proxy is actually a table of interfaces. Windows
creates and manages it at the request of the COM run
time. The proxy allows the client to think that the server
is local, even though the server is located on
another machine.
COM Runtime Operating system elements that host objects and provide
client/server communication. The COM runtime is part
of any COM related scenario—both in-process and out-
of-process—local and remote.
Security Provider The security provider logs the client machine into the
server machine. The operating system determines the
type of security providers available. Some security
providers will also protect all data transferred between
the client and server in some way—usually using
encryption.
DCOM Network Protocol Defines a protocol for creating a connection with a
(DCE RPC Network Protocol) remote server. In addition to implementing a component
protocol, this block contains all the elements to implement
the Object Remote Procedure Call (ORPC) specification
at an application level. This is the wire protocol that’s
the target of this section of the chapter.
Protocol Stack Actual network communication requires more than just
one protocol—there are network-related protocols to
consider as well. The protocol stack consists of all the
protocols required to create a connection between the
client and server, including network specific protocols
like transmission control protocol/Internet protocol
(TCP/IP). Figure 1.1 shows a typical protocol stack
consisting of a Winsock (Windows sockets) driver, user
datagram protocol (UDP), IP, and an Ethernet driver.
Not shown is the Ethernet network interface card (NIC)
actually used to create the physical connection between
the client and server.
1
Ch
33. 18 Chapter 1 An Overview of Soap
Table 1.1 Continued
Component Description
Stub The client’s presence within the server’s address space.
Windows creates and manages the stub at the request of
the COM runtime. As far as the server is concerned, it’s
working with a local client.
Server The COM object that the client has requested services
and resources from.
Figure 1.1 is typical of a binary wire protocol like DCOM and even CORBA. As you can
see, the design is somewhat complex, but works well in a LAN, WAN, or MAN environment.
The point is that DCOM is an enabling technology, not a data manipulation technology.
You can view it as a sort of traffic cop and trail guide rolled into one.
DCOM uses a specific procedure to ensure reliable communications between machines.
This procedure relies on a lot of handshaking to ensure that each phase of the data move-
ment process occurs as anticipated. Contrast this with SOAP, which sends the data and sim-
ply assumes that it will arrive at the remote location. Here are the steps that DCOM follows
to ensure a safe data transfer between machines:
1. Client issues an object creation call. The call must include both a class ID (CLSID) and
a server name (along with any information required to log onto the server). As an alter-
native, the client can issue a standard call that OLE32.DLL will resolve to a remote
location based on a registry entry, or the client can use monikers.
2. OLE32.DLL calls upon the client side SCM to create a connection to the server
machine because it can’t service the call locally.
3. DCOM creates the required packets to send information from the client to the server.
4. The server-side SCM creates an instance of the desired server-side component and
returns a pointer of the object instance to the client.
5. The server-side SCM calls upon the COM runtime to create a stub for the component
to interact with.
6. The client-side SCM calls upon the COM runtime to create a proxy for the client to
interact with.
7. The SCM returns a pointer to the proxy to the client.
8. Normal client and server-side component communications begin.
As you can see, DCOM provides a robust data communication environment that relies on a
client and server that exist at the same time and have a direct connection. It’s important to
understand that DCOM is still an optimal technology when reliability is more important than
flexibility. DCOM provides a secure and reliable environment that SOAP can provide. On the
other hand, the complexities of DCOM make it difficult to use over the Internet. There are
simply too many requirements that DCOM has to satisfy before communication can occur.
34. 19
How SOAP Differs from DCOM and CORBA
CORBA IIOP
CORBA and DCOM have existed side by side for an eternity in computer time. Each tech-
nology has proponents and detractors who protect their point of view with the vigor of
religious zealots. However, many developers view CORBA as simply an alternative to
DCOM and therefore feel that CORBA has the same limitations. The truth is slightly
different. CORBA is more like SOAP than DCOM when it comes to design goals, even
though CORBA is a binary protocol.
There are two main pieces to this architecture, just like COM and DCOM in the world of
Windows. CORBA, like COM, provides a specification for component services. There are
several CORBA implementations on the market. IBM provides the System Object Model
(SOM) and Distributed SOM (DSOM) architectures. Likewise, Netscape offers the Open
Network Environment (ONE) platform. Each CORBA implementation differs a little in
low-level details, which we won’t discuss in this chapter since they aren’t important in the
overall comparison of CORBA to SOAP.
Unlike COM, the Object Management Group (OMG) designed CORBA to run on more than
one operating system. In addition, OMG looked at Internet communication as an important
CORBA feature from the outset. CORBA tends to perform better than DCOM on the
Internet, but still provides less than acceptable performance in most cases. These design
differences make CORBA more like SOAP than DCOM when it comes to design goals.
1
Ch
You can find out more about OMG at http://www.omg.org/. One of the best Web
sites to visit for CORBA details is Distributed Object Computing with CORBA Mid-
dleware (http://www.cs.wustl.edu/ ~schmidt/corba.html). This site
includes a copy of the CORBA specification, a tutorial, and some great overviews of the
technology. There’s an interesting CORBA frequently asked questions (FAQ) site at
http://www.aurora-tech.com/corba-faq/. There are FAQs for all the CORBA
and IIOP components on this site, including answers on IIOP elements like the
Interoperable Object Reference (IOR). The OMG sponsored ORB Interoperability
Showcase appears at http://corbanet.dstc.edu.au/.
CORBA, like COM, is a local component implementation. It requires a wire protocol to
cross machine barriers. That’s where the Internet Inter-ORB Protocol (IIOP) comes into
play. Unlike DCOM, a protocol designed for LAN use alone, OMG developed IIOP for
Internet use. IIOP, like DCOM, is the wire protocol that enables component communica-
tion between remote applications. In fact, you could almost replace the block names in
Figure 1.1 with CORBA and IIOP equivalents and see the technology in operation—the
ideas are the same, the names and precise implementation details are changed.
If you want to know how the DCOM and CORBA technologies differ from a block dia-
gram perspective, compare the CORBA block diagram (Figure 1.2) at http://www.
cs.wustl.edu/~schmidt/corba-overview.html with Figure 1.1 in this chapter.
35. 20 Chapter 1 An Overview of Soap
IIOP provides most of the same functionality of DCOM. Unlike SOAP, both IIOP and
DCOM can transfer a variety of non-ASCII data types, such as integers and objects. The
same binary features that restrict IIOP and DCOM from getting through firewalls allow
them to transfer native data types. This makes binary data transfers more efficient—they
require fewer data packets.
CORBA and DCOM are both stateful protocols. A user establishes a connection with the
server and that connection remains in place during the entire session. This ensures the user’s
state information remains intact and enhances the developer’s ability to write applications
that interact with the user. HTTP is a stateless protocol. Consequently, SOAP can’t main-
tain state information, which causes problems. For example, SOAP can’t support properties
because the use of properties infers maintained session state information; something that
HTTP can’t support.
Another way that CORBA and DCOM are similar (although definitely not equal) is in the
area of security. If you want to secure a SOAP data transfer, you need to rely on a third party
product,such as Secure Sockets Layer (SSL). CORBA and DCOM both include built-in
security. Unfortunately, security settings often cause problems for both CORBA and
DCOM developers. Getting security set high enough so that no one can see your data, yet
low enough to get past firewalls is difficult. In addition, DCOM is especially susceptible to
security-setting errors that result in a loss of communication. If the server and the client
don’t agree about the level of security to support, then communication doesn’t take place.
Obviously, CORBA and DCOM are quite different internally. The packets they produce are
not compatible, some data representations differ, and they use different methods to accom-
plish the same tasks. It’s important to understand that these differences cause problems for
distributed application developers because a company that uses CORBA can’t communicate
with a company that relies on DCOM, and vice versa.
Java RMI
I included Java Remote Method Invocation (RMI) in the chapter because it’s an important
adjunct to CORBA. It isn’t a separate or unique wire protocol because it’s built on CORBA,
but Java RMI does include some features you need to know about. The most important
feature is simplicity. The creators of Java RMI recognized that many developers viewed
CORBA as difficult to use and error prone, so they created an easier to use wire protocol
in the form of Java RMI.
You’ll see definite similarities in the two architectures. For example, you can view the
COM proxy and stub performing a function similar to the CORBA Interface Definition
Language (IDL) stub, Dynamic Invocation Interface (DII), IDL skeleton, and Dynamic
Skeleton Interface (DSI). Note that CORBA uses more layers to accomplish the same
goals as DCOM—some developers say this makes CORBA slower than DCOM even on a
LAN (your mileage may vary).
36. 21
How SOAP Differs from DCOM and CORBA
All you need to do is spend a little time with Java RMI to realize the simplicity it brings to
the development environment. The protocol automatically takes care of many of the low-
level details you normally need to consider. For example, you can gain access to a remote
object by looking it up in a name facility provided by Java RMI, or by receiving the reference
as a return value or method invocation argument. In addition, the protocol doesn’t need to
consider language or platform differences because communication occurs directly between
two Java Virtual Machines (JVMs). You can see that Java RMI is a simplified form of CORBA
by looking at the block diagram and architectural discussion at http://www.java.sun.com/
products/jdk/1.1/docs/guide/rmi/spec/rmi-arch.doc.html#200.
One thing that might escape your notice at first is that Java RMI also inherits all of the good
features of Java. This means you gain access to niceties like garbage collection. When you
develop an application using CORBA or DCOM, you have to allocate objects and remember
to destroy them manually. Java RMI still requires that you allocate the objects, but the run-
time automatically destroys objects that go out of scope (they’re no longer referenced by
other objects).
The first feature that I noticed beyond simplicity is that the Java RMI doesn’t require a large
support library. You don’t have to install anything extra—everything comes with the JVM.
Many developers I know have had horrifying experiences getting DCOM to work because of
DLL hell. DLL hell is an evil giant of a problem in which older applications either won’t run
with new versions of DLLs or they overwrite those DLLs and cause new applications to fail.
The fact that Java RMI appears as part of the whole Java package and there’s little chance for
incompatibilities to creep in can save more development time than you’d ever imagine.
Java RMI also includes a unique feature—the ability to move behaviors between machines
using inheritance. (Normally, Java RMI extends a default class; but, using special program-
ming techniques allows you to extend other classes as well.) This feature allows a developer
to add a new behavior to an existing class. For example, an existing class may perform finan-
cial analysis, but you might want it to include sales tax or other added calculations. A new
behavior would allow an existing class to perform this task. Contrast this with CORBA and
DCOM, which allow a developer to call methods in existing object or move objects around,
but not augment existing object behavior.
Simplicity comes with a high price in this case. For one thing, you’re still dealing with a
binary protocol. It’s still impossible to get messages past firewalls in some cases. In addition,
you have less control over the environment when problems occur (simplicity gets in the way).
1
Ch
One of the better overviews of Java RMI appears at http://www.java.sun.com/
marketing/collateral/ rmi_ds.html. I found the diagrams a little difficult to see,
but, otherwise, the information is easy to understand. You’ll also want to view the more
detailed Java RMI white paper at http://www.java.sun.com/marketing/
collateral/javarmi.html and the specification at http://www.java.sun.com/
products/jdk/1.1/ docs/guide/rmi/spec/rmiTOC.doc.html.
37. 22 Chapter 1 An Overview of Soap
Another problem is that Java RMI is understandably a Java only solution. As long as you’re
willing to make your programming language Java, you’ll be fine. However, Java isn’t noted
for its high execution speed and is, therefore, less suitable than other languages for some
types of desktop and automation applications.
Java RMI passes all parameters by copy rather than by reference. This means a remote
method can’t change the value of an argument you pass; it must provide a return value in
other ways. Passing parameters by copy is the Java RMI method of handling some of the
intricacies of marshalling. Java RMI always passes objects, on the other hand, by reference.
The client gains access to an interface, not an object implementation.
SOAP, HTTP, and XML
I can already hear some of the SOAP savvy among you sighing that I chose to lump SOAP,
HTTP, and XML together. It’s true that these protocols are useful as separate entities and
don’t necessarily depend on each other. However, the real world situation today is that
developers do use them together, so for the sake of simplicity, I’m lumping them together
for now.
So, what does a SOAP message look like? It depends on the technologies that you use with
SOAP, which is why I specified the three technologies I’m using up front. Here’s a simple
example—so simple, in fact, that you probably wouldn’t use this form in a real message.
<SOAP-ENV:Envelope>
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<GetPerson>
<LastName>Mueller</LastName>
<FirstName>John</FirstName>
</GetPerson>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This example points out several similarities between Web technology that you’re already
familiar with and SOAP. Notice that everything has an opening and closing tag—that’s the
XML influence on SOAP, but also has it’s roots in the HyperText Markup Language
(HTML) we’re all familiar with. A SOAP message always appears within an envelope. The
envelope can have a header, just like an HTML document would, but this isn’t required.
The message must have a body. The message content appears within the body as shown
here. We’re making a request of the GetPerson function for a person whose last name is
Mueller and first name is John.
You can extend all of these tags. In fact, you’ll likely extend most of them when creating
standard SOAP messages. For example, the envelope tag will probably look something like
this in a real message.
<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/”>
The second parameter, in this case xmlns, is the namespace used for the envelope. A
namespace reference tells where to find definitions for classes that contain functions used
38. 23
SOAP, HTTP, and XML
within the message. So, let’s expand this principle to the GetPerson function mentioned
previously. Here’s what the body of the example message might actually look like.
<SOAP-ENV:Body xmlns:MyObj=”http://www.mycompany.com/myobjects/”>
<MyObj:GetPerson>
<LastName>Mueller</LastName>
<FirstName>John</FirstName>
</MyObj:GetPerson>
</SOAP-ENV:Body>
The xmlns tag contains the location of the MyObj object on your company server. This
object contains the GetPerson function used in this example. As you can see, a SOAP
message could quickly begin to look complex, but it’s simple in design.
1
Ch
Remember that you must always pair all XML and SOAP tags; there’s always an opening
and closing tag. In cases in which you don’t need to include any data between tags,
you can signify the closing tag by adding a slash at the end of the tag like this example
of a paragraph tag: “<P />”.
We’ll discuss namespaces in more detail as the book progresses. For now, all you need to
know is that SOAP messages have a specific format that looks familiar if you’ve worked with
XML or even HTML in the past.
OK, I’ve shown you the XML and SOAP part of the picture; so where does HTTP come
into play? SOAP uses HTTP as a transport protocol—the method for getting a message
from one place to another. A SOAP message transaction normally occurs in two phases. The
first appears within an HTTP request message. The client requests data from the server, just
as it would for a Web page. The server places the requested data within the SOAP message
that Web server packs into an HTTP response message. The Web server uses the same tech-
nique as it would normally use—only the content of the HTTP message differs from normal.
A standard browser can view the SOAP message you create. For example, Figure 1.2 shows the
output from the sample code we looked at earlier. Since we didn’t create an XSL file for this
example, the browser uses the default template. This template shows you the content of the
SOAP message with keywords and content highlighted in a variety of colors. Normally, you’d
pass the SOAP response message to a client side application for interpretation and display.
Now that you have a taste of what SOAP is like, you might want to view the SOAP
specification. The current specification, as of this writing, is version 1.1. You’ll find it at
http://static.userland.com/xmlRpcCom/ soap/SOAPv11.htm (among
other places). Not only will the specification fill you in on additional details, but you’ll
also see some example messages that contain the HTTP header, as well as the SOAP
message. I chose to concentrate on just the SOAP portion of the message in my
example listings.
39. 24 Chapter 1 An Overview of Soap
Problems Solved by Using SOAP
Some developers are dubious about the benefits of using SOAP because they see it as a com-
plex way to transfer data from one location to another using unsafe methods. For example,
SOAP doesn’t have any form of internal security and you can’t use it when you need trans-
actions. One developer even stated that SOAP was a poor choice for any kind of database
work, unless you include safeguards at both ends of the transaction. (This is where all of
those classes on three-tier design come into play—SOAP should access only the business
logic on your server, not the database itself.)
No matter what the developer community comes up with for a data transfer protocol, there
are always going to be negative points to consider. SOAP is a “fire and forget” solution to
transferring data on the Internet that works well in some cases and not at all in others. I’m
not going to convince you in this section that SOAP is the perfect solution for every prob-
lem. You shouldn’t consider it the solution for all problems either—SOAP has limitations.
All arguments aside, SOAP does solve two very important problems and a host of smaller
problems. The first problem is the matter of network security versus data transfer. DCOM
and CORBA are both binary data transfer protocols. This means they both rely on non-
ASCII characters that a Web server firewall could interpret as executable code and packet
formats that the firewall will interpret as invalid HTTP packets. In both cases, the firewall
throws the packets out because it’s designed to work that way. Since the Web server requires
the firewall to keep crackers out, there’s an obvious problem with using binary data transfers.
SOAP solves the problem by using ASCII in an HTTP package—something the firewall
will instantly recognize as data and pass along to the Web server for processing.
Figure 1.2
Internet Explorer
versions 5.5 and
above can display
SOAP messages in
a simple format.
40. 25
Problems Solved by Using SOAP
The second major problem is one of compatibility. If you use a binary protocol, the client
and server must both use the same method for retrieving the data from the packet. Binary
compatibility is easy to achieve when programmers in one company maintain both the client
and server. However, distributed applications aren’t one-company solutions. You now have
other companies in the form of partners and clients to consider. Transferring ASCII data
within an HTTP packet between companies is easier and less error prone than binary
methods. SOAP combined with UDDI makes it easy for customers to find you and use
the resources you provide. Services such as online ordering are easier to implement when
everyone has common grounds for participation.
It’s ironic that one of the features that makes binary protocols so useful on a LAN actually gets
in the way when working in a distributed environment. DCOM provides a wealth of security
setting features that enable you to fine-tune your approach to keeping your data secure. For
example, you can choose to check a user’s identity only once at the outset of a communication.
On the other hand, you can ask the user for identification information before each transaction.
While this does aid in security, it also means that DCOM is doing a lot of handshaking with
the application; a feature low bandwidth connection like the Internet won’t support. SOAP
doesn’t implement any security internally, so there isn’t any security-related handshaking to
worry about when using this protocol. SOAP relies on security like SSL that’s designed for
Internet use, so again, the effect of security on system performance is minimal.
Proxy servers can also present problems for the developer. The target for a remote call
might not have a publicly routable IP address. This means that a proxy server will have to
route the packets to the correct internal address—adding yet another failure point where
incorrect configuration information can keep an application from working. SOAP is
interpreted by a listener component that has a direct public IP address. You still gain
security benefits because the listener doesn’t do anything with the data—an internal
(nonaccessible) component works with the data after the listener interprets it. There’s
plenty of opportunity to check the data for security and corruption problems as part of
the translation process.
Older wire protocols often rely on nonstandard TCP/IP ports for communication so they
don’t interfere with standard network traffic. One of the more common ports is 135, but
these protocols can use other ports as well. What happens if a network administrator recon-
figures the firewall to close the port the application needs? It may take a long time to find
the problem because this is an unexpected error. DCOM and CORBA will simply report
they can’t contact the server—leaving you in the dark as to the cause of the problem. SOAP
solves this problem by using standard communication ports that a network administrator is
unlikely to close.
This is the tip of the iceberg. Microsoft and other vendors designed SOAP primarily to
solve the problems of Internet communication. It isn’t too surprising that it excels in the
kinds of communication that you’d expect to perform on the Internet. You’ll run into
problems, however, if you assume that SOAP is the only answer. DCOM, CORBA, and Java
RMI still provide many useful features not found in SOAP that address distributed applica-
tion programming within a company or tightly knit group of companies.
1
Ch
41. 26 Chapter 1 An Overview of Soap
Performance Issues
It’s important to realize that SOAP represents a new method of transferring data from one
point to another. Unlike binary technologies used with LANs, SOAP travels between dis-
tributed applications on a public network using ordinary text. The differences between
SOAP and other transport methods like DCOM Wire Protocol mean that you can’t rely
on old technique to ensure swift transmission of data.
The following sections will look at the two sides of the SOAP performance coin. On the
one hand, there’s good reason to suspect that SOAP won’t perform well as binary data trans-
fer methods. For one thing, it’s a verbose data transfer method. On the other hand, SOAP
doesn’t require complex translation methods on both ends of the wire. Plain text can get
through firewalls with relative ease and is understandable by all platforms.
Tradeoffs of Using SOAP
There are many performance tradeoffs to consider when working with SOAP. One of the
most obvious performance tradeoffs is the compactness of binary data when compared to
the ASCII text used by SOAP. Although ASCII text is generally compatible with any system
on the market, it’s also bulky. (Look at the simple coding examples in the “SOAP, HTTP,
and XML” section of this chapter for details.) Unfortunately, there isn’t any direct way to
alleviate this problem. You can’t compress the data without losing some of the compatibility
that SOAP is supposed to provide.
The size of your messages is a concern because SOAP works on low bandwidth networks for
the most part. The Internet isn’t as fast as a LAN or other local dedicated connection. In
fact, large message sizes will also affect local server resources (more storage space and longer
handling times). Overall, message size is the one performance problem that you’ll have a
hard time solving.
You can secure a SOAP transaction if you want to. For example, since SOAP relies on
HTTP as a transport protocol, you have access to all of the same security measures that you
can use with HTTP like Secure Sockets Layer (SSL). However, as anyone who has ever
used SSL will tell you, connection speed suffers greatly. It doesn’t take long to realize that
you can either have a slow secure SOAP connection or a fast connection that gives everyone
access to your data. SOAP lacks the alternatives of other protocols such as DCOM provide.
Another potential problem is a two-edged sword. SOAP messages consist of plain ASCII
data in XML format. This means that an application on the client has to translate binary
data into an ASCII format for transport. Another application on the server end has to
translate the data from ASCII format back into a binary format. The translation of data
takes time. Just how much time depends on the amount of data you need to transfer and
the original data format. Transferring graphics or other strictly binary data is an expensive
proposition, while database fields are less problematic if they contain a lot of string data to
begin with. (You’ll notice that many SOAP examples are queries for data from a database,
but few show record updates or transfers of data that’s normally interpreted from a binary
format.) We’ll see in the next section of the chapter that there’s an up side to the use of
ASCII text to transfer your data that could become a performance boost.
42. 27
Performance Issues
SOAP can also create smaller messages in some cases. A binary protocol uses large object refer-
ence tags in some situations. The resulting message is actually larger than the SOAP message.
A DCOM packet contains information other than the data that you're asking the protocol to
transfer, which is the reason for the increase in message size. Admittedly, this is only the case
when the object is relatively small. However, if you're making a lot of small requests, rather
than a few large requests, the difference in request header size can make a difference.
1
Ch
Sometimes performance tuning an application means getting creative, rather than accept-
ing you can’t do much to improve performance. For example, reducing the length of
string fields can mean the difference between transferring one or two packets.
Reducing the number of packets will increase performance. If you can’t reduce the size of
the strings, then try to use keywords in place of some of the fields. For example, if a field
can only contain a limited number of selections, try passing a number instead of a string.
The component on the receiving end can translate the number back into a string as part of
the process of reading the SOAP message.
Don’t get the idea that there’s any free lunch when it comes to SOAP. Yes, DCOM uses
a large object reference tag that could adversely affect performance, but DCOM also
supports features like properties. SOAP and DCOM aren’t equivalent; DCOM provides
more functionality than SOAP for the near future, so you may still find that you need
DCOM functionality even if using it does hurt performance.
When SOAP Is Faster
The SOAP performance picture isn’t entirely grim. In fact, it can be a faster transport mecha-
nism than those binary alternatives. Consider for a moment that we’re talking about a distrib-
uted application environment with firewalls and other obstacles to overcome when transferring
data from one point to another. A SOAP message requires no translation to get past the
firewalls—binary data may very well require translation, if it gets past the firewall at all.
Here’s the second part of the two-edged sword mentioned in the previous section. There’s
no simple answer to the question of whether it takes more time to transfer binary or ASCII
data over the Internet because there are too many variables to consider. Binary data transfers
could take more time if a firewall configuration issue forces the server to resend the data
multiple times. On the other hand, you have the size of the SOAP message to consider. The
only way you’ll know how well SOAP is going to perform is to test it in actual use and make
a comparison to similar tests using technologies such as DCOM. If performance is a major
criterion, then you need to perform such tests.
Another, more subtle, performance difference is that SOAP requires no handshaking. When
you’re working with a low bandwidth, high latency media like the Internet, handshaking can
become a real performance problem. DCOM requires keep-alive messages and other house-
keeping messages that don’t significantly affect the performance of a LAN, but eat precious
bandwidth on most Internet connections.
43. 28 Chapter 1 An Overview of Soap
SOAP and the Web Server
When you’re working with SOAP, you’ll eventually need to deal with a Web server. Since
Web servers differ in capability and features, it’s almost certain that you’ll run into problem
getting SOAP to work with some of them properly. For example, most developers worry
about interoperability between Internet Information Server (IIS) and the Apache server used
by many UNIX servers right now.
You’ll find two common problems working with Web servers from different vendors. First,
there’s the problem of data reception. A Web server commonly uses a listener component
to pick up SOAP messages and act upon them. If every listener acted the same way, there
wouldn’t be a problem. However, there are nuances of difference between SOAP listener ver-
sions, so developers often run into compatibility problems. The amount of trouble you run
into will depend on the SOAP toolkit you use to create a solution. There are some listener
components written in Java that purport to fix these problems, but little idiosyncrasies remain.
Another problem is one of translation. Getting the data to the server doesn’t help much
if the server can’t interpret it. As we saw earlier, SOAP relies on an XML format to get
data from one place to another. What happens if the server is expecting tags in one
order and the client provides them in another? Obviously, a smart developer creates
components that will interact with the data no matter what order it comes in, but
unforeseen problems can occur during the initial design process.
Why Make the Move to SOAP?
SOAP isn’t a magic bullet designed to kill the problems that plague most of us in a world of
ever-increasing complexity. A distributed application requires time and patience to build—
a new technology is unlikely to reduce that complexity to any extent. However, SOAP can
reduce the difficulty of implementing a distributed application solution by reducing the number
of potential problem areas. The mere fact that SOAP makes it easier to move your data
through firewalls is enough to use this technology when creating distributed applications.
Debugging is another reason to use SOAP. When working with DCOM and other binary
technologies, you can’t really see the data flow between machines. You can see the data
before the sender transmits it and you can see it once it arrives at the destination, but you
can’t see the part in-between (unless you’re very good at reading the binary data in packets).
Since SOAP relies on plain text transmission, debugging is easier because you can see flaws
in the data transmission itself.
Developers who create many distributed applications often cite compatibility as the reason to
use SOAP. Using a binary protocol implies that every machine will understand that protocol
equally. In other words, if you choose CORBA IIOP to transfer your data, every machine
involved needs to speak that protocol. (One kludge that developers use is to write code that
bridges translation differences between different protocols such as DCOM and CORBA, but
this is an error-prone method of handling the problem.) SOAP promises to provide a platform
independent transfer media since every computer speaks plain text. The only requirement is
45. intervening Accidents) found at last Incapable: Upon which, then
They, beginning their Endeavours to second it, generally come too
late. For if the Case does not prove to be past all Remedy, it is at least
(by this Protraction of Time) often rendred not only difficult, but
also desperate; as will evidently appear in the Case in hand, from
what follows, viz.
I. W H I L E They (conformable to the general and universal
Practice of common MIDWIVES) expect the Performance of
Nature, or the Success of their trifling Means, in the mean time, the
Orifice of the Womb is so closely shut up, that in the space of an
Hour or two, it cannot be penetrated, without renovating the most
severe racking Pains to the Woman, who (perhaps) has been
sufficiently spent before, by the D e l i v e r y of her I n f a n t, and is
now consequently incapable of standing out the renew’d P a n g s:
whereby of course She must succumb at last, and give up the Ghost,
for want of Timely Help; as innumerable Instances confirm for an
undeniable Truth. But,
II. S U P P O S I N G the Woman to be able to undergo the PAINS,
yet the Womb is however contracted, and the SECUNDINE bound so
close up, that this Body, which before adher’d Cake-ways to its
Bottom in a smooth and broad Form, is now so squeez’d into a small
and long Figure, that it is even now a Difficulty next to Impossible,
to reach the Bottom of the Womb, and still a harder Task to extract
an entire Secundine, without prejudicing the Womb.
III. T H E Y who altogether neglect Manual Operation, may (I
confess) sometimes deliver their Woman, when Success accidentally
answers their W i s h: But without this Mean, they cannot possibly
restore a prolaps’d, fallen-down, or an obliquely situated Womb, to
its natural Position. No, to the Contrary, Nothing is more common
among ignorant unwary MIDWIVES, than to invert and draw down
the Bottom of the Womb itself, by pulling the Navel-String, as they
foolishly intend by means of it only to extract the SECUNDINE.
Neither does the Mischief always end here, but mistaking this Body,
when so found by their Touch, they immediately imagine it to be the
Head of another Infant; and persevering in this false Conjecture,
they manifestly expose the poor Woman to the Hazard of her Life.
Neither,
46. IV. P O S S I B L Y can They, without the Use of the Hand, so
cleanse the Womb of the Reliques of the SECUNDINE, which may
stick up and down to the Womb; or of the Pieces or Parts of the
Membranes, which may remain there; or of the clotted Blood, which
commonly stays behind. From hence therefore it necessarily follows,
that (without the Means of the Hand) They cannot be Positive or
Certain in any Circumstance, relating to the True State of the
Woman. They can neither assure Herself, nor those concern’d, that
her Womb is duly purged; if (perchance) of the SECUNDINE, which
they may guess at by the Sight, yet not of the Fragments of the
Membranes, nor of the clotted Blood, which they can never be
certain of, but by this Method. I mention these Things, because the
least Part of Either being retain’d, or left Behind in the Womb, may
cost the Woman her Life, as innumerable Precedents do testify. Nor,
V. C A N they possibly secure the Woman, that her WOMB is duly
shut and contracted; much less can they (without these Means)
affirm that it is orderly situated in its proper natural Center: By the
Neglect or Fault of which Condition, she is not only rendred Barren
afterwards, but also most infirm all the Days of her Life.
B U T notwithstanding how plain and easy soever, I have
endeavour’d to make out the above-mention’d Method, I would over
and above recommend It only to the judicious and well-qualify’d
MIDWIFE; by no Means to those that are ignorant in the Parts of
GENERATION, nor to any stiff clumsy-fisted Person: And that for
the Two following Reasons; viz.
I. L E S T the String (by some Accident or other) should break,
and she, missing this Guide to the SECUNDINE, should take One
Part for Another, and consequently dislodge the Womb instead of
the A f t e r - B i r t h; which has undoubtedly often happen’d by
such blind Doings, notwithstanding this very remarkable Difference
between Them, that the SECUNDINE distinguishes itself from the
Other, by a great many little Inequalities on the Outside, occasion’d
by the Roots of the Umbilical Vessels. And,
II. L E S T she should unwarily either break, tear, or scratch the
Womb, with her thick, fleshy, rough, and rigid Hand, or with her
stiff and crooked F i n g e r s: Either of which Accidents, may give
Origin to various Misfortunes; such as a Prolapsus, or Falling-
down, a preternatural Flooding, an Inflammation, or Gangrene, &c.
47. B U T we will now, in fine, suppose that the Ingenuous MIDWIFE
has after All discharged her faithful Duty in these Respects, with
Care, Lenity, and good Conduct, as well as with great Art and
Judgment: In which Case, it only remains, that she take the
necessary and usual Care of the Child-Bed-Woman and Infant; as
hereafter will be directed in the respective Chapters of SECTION
VIth, to come.
I N the mean Time, these curious Things being thus amply
premised in this Place, the Reader has no more superfluous
Repetitions to expect concerning them in the following Performance:
And therefore with these Preliminaries I conclude my Fourth
SECTION.
48. S E C T . V.
C H A P . I.
Of B I R T H.
A N’s appointed Time may as reasonably allude to his
BIRTH, as to his DEATH: His Days and his Months
(mentioned by holy Job[158]
) being as much determin’d,
naturally speaking, in the One, as in the other Case.
T H E I N F A N T thus being thoroughly ripen’d, and
arrived to full Perfection of Maturity, the Hour approaches, in
which it scorns any longer Confinement to such narrow Bounds. For
the Animal Spirits being discontented, for want of due Liberty and
free Motion; the Vitals, for want of Refrigeration and Refreshment;
and the Natural Spirits, for want of sufficient Respiration and
49. Nutrition: They all concur to make a Commotion, and (as it were) a
victorious Revolt or an Effort pushing for CONQUEST.
T H E INFANT being thus irritated, immediately shakes off its
Fetters, breaks the Ligaments, rents the Membranes, thrusts
through the Enclosures, and makes its most vigorous Attempts to
enlarge itself from the Prison of the Womb, into that of the World.
W H I C H Enlargement depends very much indeed upon
N A T U R E, but more particularly on the Strength and Vigour of the
INFANT, seconded by a peculiar Faculty of the Womb, that by
degrees is drawn-in to Consent, and Endeavour to dislodge and
expel its troublesome and obstreperous GUEST.
N O W the INFANT, during the whole Time of Gestation, adhering
to the WOMB, by the Umbilicals, as the Fruit does to the Tree by the
Stalks, upon this Occasion distends the W O M B, and having
valiantly turn’d itself, breaks the Membranes, and dissolves the
Acetabula: When also the Orifice of the WOMB is competently
open’d; and That (in Avicenna’s memorable Words[159]
) at the
Command of the great G o d. Upon This the Waters flow; the
Umbilicals parting from the WOMB and their proper Vessels, and
the Veins and Arteries of the SECUNDINE severing themselves, in
like manner; As ripe Fruit, or the Leaves of Trees in Autumn fall-off
naturally, or break from their proper Stalks.
T H U S the W O M B, exerting its extensive and expulsive
Faculties, excludes the Legitimate INFANT: To which great Work
also, the Painful Labours, and Labouring Pangs of the MOTHER (in
the manner they happen with the contracted Spirits, depress’d
Midriff, and compress’d Muscles of the A b d o m e n) contribute not
a little Help. And, in short, this stupendous Work or Action is called
BIRTH; and is nothing else, but an Exclusion of the mature CHILD.
W H I C H BIRTH proceeds either from Causes of the INFANT, or
from Causes of the WOMB: Of the INFANT, because through the
strict Confinement of a narrow Place, and Defect[160]
of Aliment, and
Refrigeration, It kicks and spurns for its Exit: Of the WOMB,
because about that Time, being overloaded and aggrieved by the Bulk
and Weight of the Child, it endeavours, by its own expulsive
Faculty, to disburthen itself, and propel or drive it forth to the
utmost of its Power. For——
50. A S it is the proper Function of the Stomach, to eject the noxious
Humours by Vomit, and deject the Natural Excrements into the
INTESTINES; as it is also the Office of the RECTUM to evacuate the
Fæces; as likewise the Profusion of the Urine is the Action of the
Bladder; as again the Extrusion of all fuliginous Matters is the
Work of the Heart and Lungs; and as, at last, the Effusion of the
Genital Seed (in Venery) is the Operation of the Virile Testicles: So
the Exclusion of the Mature FOETUS is the Eighth[161]
and last
proper Action of the WOMB; which is justly deem’d the only
Primary Agent and Active Cause of BIRTH, as the excluded
FOETUS is the Passive.
B U T this BIRTH is not always Uniform; for as it differs in Time,
so it does also in Manner: From hence we have with respect to the
Time, Legitimate and Illegitimate BIRTHS, which being already
discuss’d[162]
, I shall resume nothing by way of Repetition in this
Place: And with respect to the Manner, we have also two general
Sorts, namely, Natural and Preternatural BIRTHS; which together
with their particular Branches, I am now to enter upon, without any
farther Digression.
51. B
C H A P . II.
Of Natural B I R T H S.
Y a Natural BIRTH, I mean nothing else, but that which is
perform’d without any A R T or Artificial Means; which BIRTH
(of itself) strictly observes the Order and Appointment of Nature:
That is, in the INFANT’s coming Head foremost, Face downwards,
Arms following, extended (along the Sides) strait upwards, towards
the Thighs.
H I P P O C R A T E S’s Reason[163]
, in short, for the CHILD’s thus
turning and presenting itself, is very good; viz. Because of all the
Parts, the Head is the Heaviest about the Time of BIRTH, as appears
more at large from Sect. I. Chap. 10.
B U T besides this Argument, I believe Wise Nature has also
order’d it thus; because This indubitably is the most safe and easy
Manner of EXITION both for the Mother and Infant: Insomuch that
by all other Methods of E X T R A C T I O N, One or the Other, and
sometimes Both Lives are, or may be, endanger’d, if not very
dextrously perform’d, according to the best Laws of Art and
Judgment, as by and by will more manifestly appear.
B U T because I have generally observ’d most Authors to treat
promiscuously of BIRTHS, not only accounting some, which are
really Natural, to be Preternatural; but also both handling and
writing of them as such, only because attended with some difficult
Circumstances: I shall (in this place) take Leave to make an
agreeable Distinction betwixt the different Sorts of Natural BIRTHS,
in order to make every thing the more clear and obvious to the
Conception of the Reader. Upon which Account therefore, I shall
52. reduce These to two Heads, and that under the Titles of Natural
Easy, and Natural Difficult BIRTHS.
T H E FIRST of which I include in this Chapter; but because in this
Case (which I call a Natural Easy B I R T H), Nature alone always
performs the Work, without any Help of ART or Artful Means; and
because also the Midwife (upon this Occasion) has but little or
nothing to do, save only to observe the concluding Chapters of the
last preceding Section; and upon receiving the Child, immediately
to manage and provide both for the Mother and the Infant
according to their several Necessities, as hereafter shall be inculcated
in the respective Chapters of the next following Section: I say, for
these Reasons, I have no Room here to insist farther on this present
Head; wherefore I proceed in course to the SECOND Sort of these
BIRTHS. Namely——
53. T
C H A P . III.
Of Natural Difficult B I R T H S.
H O’ indeed every difficult Expulsion of the INFANT, from
whatsoever Cause it may proceed, is verily a Difficult BIRTH;
yet I shall here distinguish a difficult One from a preternatural
BIRTH; not only that I may thereby, the better avoid the Confusion
which others have led themselves into, by treating of Both
promiscuously, but also that my Method may tend the more to the
peculiar Benefit and Advantage of the Ingenious Reader.
W H E R E F O R E I call that a Difficult BIRTH; where,
notwithstanding the Figure and Dimensions of the C H I L D, answer
in all respects to its proper natural Posture, in a Perpendicular
Womb, duly situated, yet the Exclusion of the INFANT, is retarded,
by some certain Opposition or Difficulty. From hence proceeds the
real Difference between This and the Natural Easy BIRTH,
forasmuch as This always requires less or more skilful Assistance,
according to various Circumstances, and That but Little or none at
all.
N O W the Causes of Difficult BIRTHS are very various, and
according to the Nature of them, This sometimes proves equally as
dangerous as the Preternatural; but when so it happens, I have
commonly observed the Fault to be, for the most Part wholly owing
to the arrogant M I D W I F E, who either knew not how to remove
the Cause and facilitate the B I R T H herself, or delay’d applying
betimes to some Abler Person, for the Relief and Safety of her
Labouring W O M A N.
H E N C E arises a Fundamental Maxim, which I would lay down
for a memorable Rule to all such Ignorants; that no MIDWIFE
54. ought to keep a Woman in this Condition under her Hands
(especially in a Place where extraordinary Help is to be had) any
longer, than she finds the Advances of BIRTH answer to the
Proportion of Time spent about it: But forthwith she ought to deliver
her up to the Care of the more Skilful and Judicious Practiser in this
Art. In which Case, of Compliance and Condescension, she is to be
highly commended for her tender Care, and cautious Concern;
whereas upon acting contrary to this good Rule out of Pride or
Obstinacy, and the fatal Accident ensuing, I have known the
MIDWIFE to have been try’d for her Life in the City of Venice.
B U T that I may render every thing Plain and Easy to the
Apprehension of the weakest Reader, by reason that the Causes of
Difficult BIRTHS are both different and numerous, I shall again
reduce them to Two Classes; namely, External and Internal: The
External, I shall include in the next following Chapter; but the
Internal Causes, requiring a more Curious and Extensive
Dilucidation, may (I hope) be pertinently divided into a Three-fold
Difference; viz. Causes of the Mother, of the Infant, and of the
Passages; which I propose to handle particularly, all in their due
Order. But First,
55. I
C H A P . IV.
Of Difficult B I R T H S, proceeding from
External Causes.
N all difficult Cases, the Cure or Remedy chiefly depends upon
the certain Knowledge of the Nature of the Case, and the Cause
of the Difficulty: Since (according to Celsus[164]
, that noble Roman
Physician) it is not to be suppos’d that He should know how to
remedy Diseases, who knows not their Original Causes.
F O R as in other Cases, so also in MIDWIFERY, the Cause being
known, the Difficulty is easily remov’d; but especially when it only
proceeds from External Causes, it requires no great Art, save only
the MIDWIFE’S particular Notice and discreet Animadversion.
A S, FIRST, for Instance, in Case of any Difficulty, occasion’d by an
Intemperature, or inclement Constitution of Weather and Air; the
more adverse or inclement the Weather is, the more tender Care
ought to be taken of the Labouring Woman: Namely, in Summer,
when the Heat scorches so much as to dissipate the Woman’s
Strength, she ought to Labour in a Ground-Chamber backwards,
which may be strewed (for the Purpose) with Vine or Willow-Leaves,
Rose-Water, and a little Vinegar; as it is customary in hot Countries.
I N Winter, when the Cold pinches so as to condense and astringe
the Womb and the Passages, she ought to Labour in an Upper-
Room, kept moderately warm with one continued Fire; the
MIDWIFE rubbing gently the Hypogastrick and Ischiatick Regions
every now and then with hot Cloathes.
I N Spring and Fall, when parching dry Weather, with North and
East Winds most abound, the M I D W I F E ought not only to rub
56. these Inferiour Regions with hot Cloaths; but also to qualify the
Influences of the Siccid AIR, by anointing the Passages with proper
Unguents.
A Second External Cause may proceed from the Passions of the
Will or Mind, as it often does from Fear and Despair, Dejection and
Pusillanimity: In which Case, it is the MIDWIFE’s Duty to encourage
her Woman by the Hopes of a Speedy DELIVERY, and doing well
under God’s Blessing. When the Cause arises from Anger or Sorrow,
these are to be assuaged by the repeated Christian Exhortations, and
Friendly Admonitions of the Midwife and Gossips. When it comes
from Pride and Obstinacy, as has been the Case of some Lofty
Women; who (deeming themselves too good, to be treated after the
common Course of Mankind) have refused to undergo or permit the
proper Means, absolutely necessary for their own Relief; This ought
to be severely check’d by the Company, especially by the nearest
Friends; the Midwife (by proper Remonstrances) convincing her to
her Shame of her obstinate Sin. When it proceeds, in fine, from
Bashfulness or too strict a Modesty, she may be justly reprehended
of Folly; for no Woman of good Sense (how Modest and Virtuous
soever) will expose her own Life or her Infant’s to Danger, for the
trifling Fancies or Caprices of her own vain Imagination, especially
in a Case where like things happen to All equally of Flesh and Blood.
B U T when it happens to proceed from the Woman’s being ill-
affected, or owing a private Grudge or Hatred to any in the
Company, (as I once knew it to be the Cause of a difficult and
lingring BIRTH) She ought to speak her Mind freely, at least to her
MIDWIFE; who ought to give the Person civil Notice to retire
forthwith, for certain Reasons, &c.
A Third External Cause of a difficult B I R T H may proceed from
a wrong Position, or other sinistrous Methods taken to assist the
Woman: In which Case, such Inconveniencies are to be alter’d, and
better Measures practis’d; for thus the Cause being removed, the
B I R T H differs in Nothing from That of the Natural Easy Case.
W H E N C E I come, in the next Place, to speak of Difficult
BIRTHS, proceeding from Internal Causes; and because they are
Three-fold, as has been before observed, I shall assign them as many
respective Chapters, treating of Each in their due Order, as
mentioned.
57. I
C H A P . V.
Of Difficult B I R T H S, proceeding from
Causes of the M O T H E R.
N this (as in the former Case) the Midwife must use her most
acute and nicest Judgment, to find out the particular Cause of the
Difficulty. Which being done,
I. I F She finds it arises from the Woman’s being too Young, or too
Old, of her first Child, or too Lean at last; she is to anoint the
Passages with proper Unguents, which ought to be done some time
before, as well as in the Hour of LABOUR: When she is likewise to
employ her subtile Hand, in assisting and augmenting the Dilatation
of the Orifice; as is requisite also in Case of the Woman being too Fat
or Gross.
II. I F the Woman be too small, short, crooked, or misshaped, not
having a Breast strong enough to forward and bear down her PAINS;
or if she be over tender, sensible, and apprehensive of PAIN; or too
weak, and not able to contribute or assist by her own forcing
Endeavours; or short-winded, and not capable to constrain her
Spirits downwards: In all these Cases she is to be kept upright, for
the more free Respiration, as well as for encreasing her PAINS,
standing or walking about the Room, according to her Strength,
being supported under her Arms, and not put to Bed until at least
the WATERS are broke. But, in the mean Time, the weak and tender
Woman ought to be now and then comforted and refreshed with
fresh soft Eggs, good Broths, Jellies, a little Wine and Toast, a little
Wine and Water, or such like convenient Things, as well as with the
Hopes of a speedy Delivery.
58. III. W H E N the PAINS are not Natural or Genuine; but Spurious,
Faint and Languid; or Shifting and Tergiversant; such are to be
assuaged by proper Lenitives and Anodynes; which being regularly
done, the Genuine Pains may be excited by proper Clysters, and
divers other Means. But I would advise none to a Profuse Use of
MEDICINES in such Cases, since I well know that many a W o m a n
has lost her Life by using dolorifick Medicines, prescribed by
imprudent MIDWIVES, without considering, or so much as knowing
the true Circumstances of the Condition: Whereas in most Cases, by
the ingenious Motion of an Experienc’d Hand only, the Pains may be
sufficiently awaken’d, and the Birth safely promoted.
IV. W H E N the Difficulty proceeds from the Debility of the
Womb, or its Expulsive Faculty, not being able or capable to Exclude
the INFANT, because of a more strong and valid Retentive Power: In
this Condition, if there be no evident External Cause to be obviated,
it depends chiefly upon the Subtile Hand of the MIDWIFE, to assist
the Womb in its Function; and otherways the PATIENT is only to be
treated as in the Case of the weak and tender Woman above-
mentioned.
V. W H E N the Woman is taken with any Acute Disease, the
BIRTH is to be prompted by all safe Means; and if a Natural
DELIVERY does not presently succeed, an Artificial one must
(without Loss of Time) be undertaken. As in the Case of immoderate
and continual Floodings, with concomitant Convulsions, which
always proceed from the Separation of the SECUNDINE (either in
whole or in part) from the Womb, and happen many different ways,
as already mentioned at large[165]
.
I N these Cases, especially if the Secundine is found (by the
Touch) at the Orifice, there is no Hope of Stopping them by any
other Means, than by delivering the Woman; which now the sooner
done, the better (for saving two Lives) and that whether at full time
of Reckoning or not. But this Operation, I conceive, is to be most
discreetly Undertaken in the manner following, viz.
T H E Woman is to be placed in Bed, with the Upper and Lower
Part of her Body almost equal, then the Midwife is gently and
gradually to introduce her Fingers into the Orifice, dilating it
cautiously with one or two, until she can enter them All; when
opening the Matrix by Degrees, she gets in her Whole Hand, and
59. thereby first carefully tears the Membrane with her Nails, if the
WATERS are not previously broke: Then she puts her Hand in the
same Membrane to the Infant’s Feet, seeking them in their Place,
where they are to be found, when they don’t present themselves at
First: Because, the Hold by the FEET being Better, it is more easy to
deliver by Them, in this Case, than by the HEAD, or any other Part.
After this the FEET being found, the Child is easily turn’d, as long as
the Womb is loose and slippery, and the Humours not quite flown
off; which being nicely done, the FEET are to be drawn out both
together, if possible; but if otherways, they must be drawn down
separately, with great Caution: And so being conjoin’d or held fast
together, they are to be drawn forward with one Hand, whilst the
other is circumspectly thrust towards the Knees or Buttocks of the
Child, in order thereby to turn also the whole Body of the I n f a n t,
so that its Face, Belly, and Toes may tend downwards towards the
RECTUM.
I N this Posture the Child may be gently and gradually extracted
with Ease; next the SECUNDINE must be fetch’d away in its Turn,
and lastly the Womb is to be thoroughly cleans’d of all heterogeneous
Bodies, as formerly directed[166]
. And thus the Womb (having yielded
up its Contents) immediately contracts, by which MEANS of divine
Appointment, the Vessels close and shut firmly, and consequently
the FLUX ceases, together with all the concomitant SYMPTOMS.
B U T it is to be well remembred, that this Operation ought to be
timely perform’d; that is, before the Woman has lost too much
Blood, or is too much spent; in which Condition such a painful
Attempt would but accelerate her Death. As to her Regimen next,
upon this melancholy Occasion, She must be duly provided for
beforehand, that she may be able to undergo and stand out such an
extream difficult DELIVERY; and afterwards, that she may recruit
her Spirits, and retrieve her exhausted Strength: For which
Purposes, she ought to be supplied from time to time with some good
Broths, Jellys, and a little generous Wine, smelling continually Rose-
Vinegar, and applying repeated warm Toasts dipt in Wine (in which
Cinnamon has been infus’d or boil’d) to the Region of her Heart, as
also Napkins dipt in a Mixture of Water and Vinegar about her
Reins, in order for turning the Course of the Flux.
60. T H E S E Things being all duly and artfully perform’d, the Patient
(under God) will soon recover and be in Statu quo. Now These, in
short, are all the principal and most common Causes of difficult
Births proceeding from the part of the Mother; which being thus
discussed with all Brevity, I go on to——
61. I
C H A P . VI.
Of Difficult B I R T H S proceeding from
Causes of the I N F A N T.
T sometimes also happens, that the Difficulty in Labour arises
from the Infant: And that F I R S T when Two or More strive for
Priority in B I R T H.
N O W this Condition the Midwife can no otherways distinguish
or discover, but by the Touch; and when the one is more forward
than the other, ’tis not to be done or known, until she has even
touch’d the very Fund of the Womb: Because sometimes it so
happens, that One Child has its Hands and Feet so intermix’d, that
whatever way She turns her Hand, she finds Legs or Arms, Hands or
Feet, which often deceives Midwives, believing there are TWINS.
But in this perplex’d Case the most sure and only certain Sign, is,
when she feels two Heads or two Backs; for then she cannot be
Mistaken, since one Body cannot have two Heads, unless it be a
Monster, which may be soon discover’d by feeling if the double
Head be fix’d to one and the same Body.
B U T in the Case of TWINS or more Children (as long as they
come right) the Delivery is perform’d, as if the Woman had but
One, in the Natural Case already Stated; so that I shall repeat or
recapitulate Nothing of what I have said, only that the After-Birth,
or Births are not to be touch’d, until all the CHILDREN are Born:
Upon which drawing gently the Navel Strings (in their Turns) with
the One Hand, the Other brings them forth easily and orderly; as is
set forth more fully in Sect. IV. Chap. 18.
A SECOND difficult LABOUR may proceed from the Weakness
and Debility of the Infant, or from its being too Small-grown; in
62. which Case, both the Woman and the Midwife are to use their best
mutual Endeavours to promote the BIRTH, since the CHILD can do
little or nothing for itself, and the Less it is, the less it is affected with
the THROWS of the Mother, and the less Impression her Impulses
make upon it: Whereupon Nature is to be assisted in this weak
Condition by all convenient Means, whereof THAT of the Agile or
Nimble Hand is the most effectual.
A THIRD difficult BIRTH may proceed from the Infant’s being
too Big; In which Place I must previously apprize the READER, that
I no ways mean a MONSTER or Hydropical CHILD, but only One
full, well, or Big-grown, which is only reckoned too Big in regard of
the Maternal Passages, which may be too Small in Proportion.
I N this Case, there is an absolute Necessity for Manual
Assistance, since the PAINS (however penetrating or forcible) cannot
effect the Work. But and if the INFANT is fallen down (well turn’d)
into the Pelvis, the Midwife using her best and most skilful
Endeavours to dilate the Passages below near the Os Coccygis, the
Child may be easily brought forth (without any dangerous
Instrument) by her dextrous Hand only accomplishing the Work. In
the mean Time, however, it is to be minded always, that This is still
more safely and commodiously done by the Feet, than by the Head,
after carefully dilating the Os Coccygis, taking this Opportunity in
the beginning of the Labour, before the I N F A N T is too much
press’d down into the Pelvis.
N O W these are, in fine, the most common Causes on the Part of
the INFANT, whence I come to touch upon difficult BIRTHS,
proceeding from Causes of the Passages; which, because they are
various, I subdivide into a Fivefold Diversity; viz. Difficult
B I R T H S, proceeding from Causes of the Membranes, from Causes
of the Pelvis, from Causes of the Bones of the Pelvis, from Causes
of the Bladder and Rectum, and from Causes of the Vagina: And
because all these require to be singularly explain’d, and particularly
insisted upon, I shall assign them as many respective Chapters. And
First——
63. S
C H A P . VII.
Of Difficult B I R T H S, proceeding from
Causes of the M E M B R A N E S.
U C H Difficulties as These, in BIRTH, may arise, F I R S T from
the Strength and Firmness of the Membranes; when they
happen to be so gross, callous, or thick, that the INFANT cannot
easily break through them.
In this Case, when the MIDWIFE finds the Orifice of the Womb
sufficiently dilated, for the Circumference of the Head, and the
Child so forward in the Passage, that it is ready for BIRTH, and only
impeded by the rigid or stiff Membrane; then she has just Authority
to break it gently with her Nails and Fingers; taking Care in the Act
not to draw the Membrane towards her, because thereby the
S e c u n d i n e (of which the Membrane, tho’ distinguish’d from the
Placenta, is in Effect, but the Thinner Part) would be untimely
separated from the Womb, and the INFANT undone, unless
presently Born.
B U T the MIDWIFE, after All, must always remember, not to
attempt This, before these mentioned Signs are obvious to her
T o u c h; otherways the Waters being too soon discharged, the
C H I L D is left behind, the Passages grow dry, and that which might
have been an Easy and Speedy, proves a Difficult and Lingring
BIRTH.
A N D the self-same Consequences arise from the Weakness and
Tenuity of the MEMBRANES; when they are so thin and soft, that
they break, and the Waters (which are destin’d to lubricate and
moisten the Passages) flow before their Time: In both which Cases,
64. the Office of the Waters must be supply’d by proper Fomentations,
and Oils, which (however costly) falls far short of the Effect of what is
so Natural. However, in short, neither of these Conditions, under the
diligent Hand of the expert Midwife, can differ far from the Case of
an Easy BIRTH, as already defin’d; wherefore I proceed regularly to
——
65. D
C H A P . VIII.
Of Difficult B I R T H S, proceeding from the
Causes of the P E L V I S.
I F F I C U L T BIRTHS on part of the Passages, happen
frequently, because of some perverse Form of the P E L V I S, in
these Respects; as by its being either too Large, too Narrow, or too
Smooth. But that I may be the better understood in this Matter:
FIRST, by a PELVIS too large, I mean such an One, as is so in
comparison with the Womb or I n f a n t; in which Condition, as the
Womb can neither be firmly fix’d, compactly inclos’d, or duly
supported, so neither can the Head of the Infant and the WATERS
be exactly depressed upon the Orifice: Hence it often happens, that
(besides the Midwife’s careful Hand) the Privities are the best, if not
the only Defence, against both the Womb and the Child’s falling out
of the Body.
S E C O N D L Y, By a PELVIS too small, I mean, such an One as is
so, in Consideration of the Size of the whole Body; in which
Condition, the INFANT commonly answering to that Proportion, its
Head can by no Possibility pass thro’ the P E L V I S, in a Womb well
seated, without great Force, by which Means the Womb may be easily
turn’d obliquely: And thus consequently the Smallness of the
PELVIS, may sometimes prove the Cause of a Preternatural, as well
as of a Difficult BIRTH; and not only so, but also the Death of both
the MOTHER and CHILD may ensue thereupon, unless timely
deliver’d by an Artful Hand.
T H I R D L Y, By a PELVIS too smooth, I mean such an One,
whose Distance betwixt the OSSA PUBIS and the prominent Part of
the OS SACRUM is too narrow; in which Condition, tho’ the Womb
66. be well placed, it cannot admit the Head (especially if large and well-
grown) without great Difficulty: And this smooth PELVIS may also
very easily turn the Womb (either way) obliquely, and consequently
prove of the same dangerous consequential Effect with the
preceeding Case.
H E N C E (I think) it evidently appears, how necessary it is that all
MIDWIVES should not only know the Form and Size of the PELVIS,
but also the Situation and Connexion of its B o n e s, as already
describ’d at large[167]
, that she may thereby the better distinguish the
Circumstances by plainly discerning the Causes, and judge
accurately of the Position of both the W O M B and the INFANT; so
that in the beginning of the Labour, she may immediately discover
how the Pelvis and its Entrance is form’d, whether Large or
Narrow, Smooth or Round.
F O R this Reason, the first Thing that the MIDWIFE ought to do,
when she comes to a Woman in Labour, is to try by the Touch, how
all is circumstantiated, with respect to these Things; and This is to be
done before the WOMB and the CHILD are fallen down into the
Pelvis, that she may contrive her Work accordingly. Because
sometimes the Exclusion of the INFANT, is to be hoped for, from the
Pains only; sometimes Nature is to be prudently assisted; sometimes
there is an absolute Necessity for extracting the Child (without loss
of Time) by an Artful Hand, as will hereafter more clearly appear;
and sometimes again the same Necessity obliges us to protract the
BIRTH, than we may save One or Both Lives: As in the Case of a
smooth Pelvis, the Os Pubis and the Vertebræ of the Sacrum being
but little distant, the Child’s Head is stopped; when if the Mother
should labour much, or endeavour to force an expeditious BIRTH, its
tender Head (of course) must suffer in proportion; Or perhaps the
Brain may break, by so hard a Pressure against the Bones; or, finally
(which is worse) it may be so closely squeez’d between the Bones,
that both the MOTHER and the INFANT may peradventure die,
before any BIRTH can possibly succeed or come happily into the
World.
B U T in this critical Condition, the Woman is to labour gently, and
bear her PAINS (how violent soever) patiently; the MIDWIFE always
directing the Head, at the same time by her safe Hand, into the
67. larger Space; by which Means at last, it passes gradually through
that narrow Passage without the least Danger.
T H E same also is the Condition when the PELVIS is too small or
narrow; for by the Woman’s labouring gently and deliberately, the
Head is depressed softly into an oblique Figure, and passes easily by
Degrees: Whereas, on the other hand, if it is forced by Violence, it
becomes flat and broad, and consequently incapable of Passing, if
not also dash’d to Pieces, as aforesaid.
H E N C E we clearly see, how easily Ignorance in this Point, may
lead common Midwives into the grossest of Mistakes; For what is
more ordinary with them, even in all Cases, than to advise the
Woman to strong Labour, and to force her to violent Depressions:
Insomuch that Some have Arrogance enough to carry their Bottles
or Powders about them, of which they neither know the Quality nor
Virtue; taking them only as they are told (by the confident Quacks or
Mercenary Hands which vend them) that they may encrease and
promote the Pains of Labour, and This without having any regard to
the Form of the Pelvis, or the Position of either the WOMB, or the
INFANT.
I N short, the mature Consideration of this very Case, was not the
least Motive which induced me to the Work in Hand; since I cannot
but heartily commiserate so many fine delicate Women, as are thus
every day miserably handled, tormented, and exhausted, by the
preposterous Management of such indiscreet and imprudent
MIDWIVES. I may well say exhausted, or worn-out; This being too
evident, from the vast Number of most beautiful Women, who, by
this ill-manag’d Condition, (notwithstanding they have all along
heretofore, enjoy’d a good State of Health, together with the
Affluence of other Worldly Blessings) have been more dejected and
broken both in Complexion and Constitution, after one or two
BIRTHS, than some others (judiciously and expertly delivered) have
been after Twenty: Such is the great Difference betwixt the unskilful
Hands or Conduct of common Midwives, and those Dextrous
Touches or ingenious Operations of the more judicious Andro-
Boethogynists. Whence I come in Course to——
68. T
C H A P . IX.
Of Difficult BIRTHS, proceeding from Causes
of the Bones of the P E L V I S.
H E Reader may easily conceive, by the way, that these are
neither to be made bigger or lesser by Art; notwithstanding
which, by using them Skilfully, and treating them Judiciously, many
a Difficult B I R T H may not only be prevented, but also many a
L i f e saved, as will manifestly appear from what follows.
N O W the Bones, upon which the Success of the BIRTH chiefly
depends, are the Os Coccygis, and the Point of the Sacrum; which
sometimes bend too much inwards, and thereby obstruct and render
the Passage so narrow, that no BIRTH can possibly succeed. And
again, It sometimes happens, that the INFANT falling down into the
P E L V I S, and presenting itself Head foremost, is oppos’d and
stopped there by the Os Coccygis: As it also sometimes falls out, that
the Shoulders stick fast against the Edge of these Bones; or the
Buttocks falling down and offering themselves first, may be so
fastened or affixed to them, that they can never be extracted.
T H E S E Misfortunes may proceed from Either of these two
different Causes; viz. Either from the Grossness or large Size of these
Parts of the Infant, or from the Narrowness of the P E L V I S,
occasion’d by an ill Position of its Bones, particularly of the Os
Coccygis; which Bone when the Head cannot make it yield or move,
neither can it then possibly reach the Orifice of the Womb, to dilate it
sufficiently: And, in short, if the Head cannot effect this essential
Point, much less can the Buttocks, or any other Part be supposed
capable of doing it.
69. Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookgate.com