Welcome to Kenn and Mark's SOAP Page
The paint is still wet... :) Sorry.
Here you can download code we developed for Understanding SOAP, ISBN 0-67-231922-5. (The publisher's site is here, which may have additional stuff...) We plan to enhance the code from time to time, so check back to see if things have been updated. Here is what you can download (updated 11/10/00):
Some additional things available here:
Note this implementation uses the STL std::string for convenience, so it's really only appropriate for shorter conversions (i.e.: large buffers of binary data should be encoded using a different implementation). I typically use this to encode typical string data. FYI.
If you download the latest OpenSSL source and compile, this C++ object encapsulates the SSL connection and basic use of the SSL library. Thanks to Simon Fell for his initial demonstration (I would have been clueless without it!). I haven't incorporated this object into any SOAP work yet, but it's cool anyway (and I could if I needed to). :)
Note if you're using Win32, you'll need to place the OpenSSL DLLs (libeay32.dll and ssleay32.dll) in your path so the test app can load and use them. If you're not using Win32, then you'll need to follow the conventions for your OS (and modify the C++ object and test app source accordingly as well [easy]--they're based in Visual C++). BTW, I had no trouble compiling the OpenSSL code--the OpenSSL group did a fine job (!).
I had written this for Visual C++ Developer, just as they stopped publication. Too bad, too...this was fun to write. Since it was for a Visual C++ magazine, the code is C++ based, using ATL (client/server) and MFC (client). As with all book/magazine code, this isn't fully bulletproof and ready for commercial use, but it does give you a fully-implemented client/server application with more than the usual error checking and armor plating. :)
Just download, unzip, and double-click. Windows executable only (sorry, no Motif/Mac version yet!) To exit the game (?), press <ESC>. To switch devices, right-click and select (the machine gun is especially good). This is really fun for all of you Doom/Quake lovers. :) If in the office, be sure to turn down the volume...
Connects to several working SOAP servers for real-world data transfers. To make it work, you must be using IE 5 and have your "access across domains" security setting set to at least "prompt". If you're unsure how to do that, click here. BTW, the ISBN shown is for Professional Visual Basic 6 XML. :)
Awesome presentation by Mark describing the justification for SOAP as well as the mechanisms that make it work. Concise and quite interesting. He used it as the basis for a 2-hour synopsis of SOAP to a group of XML developers interested in the technology.
SOAP 1.0: This code was originally for the book when the 1.0 specification came out. During writing, the specification was upgraded to 1.1, so this code did not ship with the book. However, here it is if you want it. It has the same features as the 1.1 code with the exception that it produces SOAP 1.0-compatible packets.
***NOTE*** The download includes only the client-side code/objects at this time (Mark is on a well-deserved vacation, so I can't get his 1.0 code from him). When the server-side code/ISAPI DLL is available, I'll include it in the download and remove this note.
***NOTE*** This code is considered unsupported (with my apology). Also, the C++ SOAP object model code is slightly different for the 1.0 version. The 1.1 version (that shipped with the book) included some slight changes to the object model that made some aspects a bit easier to use (such as when adding standard SOAP attributes, such as mustUnderstand and root, which was called rootWithId under version 1.0).
SOAP 1.1 (book version): This code was shipped with Understanding SOAP. It encodes certain types of COM interfaces:
Custom interfaces only (can't handle IDispatch in a generic way due to the use of arrays in IDispatch::Invoke()--this version doesn't encode arrays in the general sense)
Interfaces whose signature only uses simple types:
short and short*
int and int*
long and long*
float and float*
double and double*
BSTR and BSTR*
You'll need the type library that contains the interface definition
The code implements an architecture that intercepts or delegates your COM object. Essentially, it replaces DCOM with a SOAP infrastructure (but please don't expect all of the DCOM functionality, such as security).
Interception involves modifying the Registry to replace the COM server filename with our SOAP Object Surrogate such that when you CoCreateInstance() your COM object you instead create our SOAP client that makes the remote method call for you.
Delegation allows you to tailor specific COM interfaces for SOAP use. You do this by CoCreate'ing the SOAP client, and then by creating a SOAP'ed instance of your interface using the SOAP client's ISoapControl::CreateInstance() (click here for a sample). Don't worry...we ship a client application that handles all of this configuration stuff for you.
Thanks! to Mike Parent for finding a bug in the SOAP configuration utility that prevents proper delegation. The code download includes a fixed version of the configuration utility...
The download contains these items:
The SOAP Catalog and Catalog Manager object
The Type Library Encoder object
The SOAP Object Surrogate (client-side resolver) object
The SOAP Activator (server-side ISAPI DLL)
The SOAP Configuration Utility (akin to DCOMCnfg.exe) [fixed]
Installation batch file (hey, the download is cheap!)
Release notes/Installation document (Word 97)
Please do read the installation document, as it tells you a bit more about what you're getting, how to use it, and how to re-compile it.
SOAP 1.1 (enhanced version): Essentially the book's 1.1 code (above), plus support for:
Encoding structs, linked structures
Encoding arrays/byte arrays
Updated HTTP 400/500 error handling and SOAP fault support (per SOAP list discussions!)
(Black items are implemented, gray items are planned.) This code is under development and will be completed as time permits (structs and linked structs are done at ths time...). Note that array support, when implemented, will probably be limited to SAFEARRAYs and their variants because the IDL size_is() attribute is dropped when the type library is compiled (we won't know the method argument is an array, nor will we know how large the array is, just by scanning the type library, which is unfortunate...details when the code is available).
Comments? Questions? Drop us a line:
Kenn (SOAP client-side code) @ firstname.lastname@example.org
Mark (SOAP server-side code) @ email@example.com
This page last updated: 03/05/2015