Jump to Downloads | Online Documentation | Samples | FAQ
This is an Open Source [MPL] SOAP client COM component for the Windows family, originally targeted at PocketPC (hence the name), there is also a Win32 version that works on Windows 95/98/Me/NT4/2000/XP/2003. The package includes a HTTP 1.1 transport for making HTTP based SOAP requests, however the transport is separate from the main SOAP core, so any other transports can be easily added. James Clark's excellent Expat XML Parser is used for parsing the response SOAP messages.PocketSOAP includes the following features
- Support for SOAP 1.1 and SOAP 1.2
- SOAP 1.1 Section 5 encoding support, including simple types, base64 binary, arrays, multi-dim arrays, partial & sparse arrays, nil's, complex types, root handling and multi-references (including circular references)
- Support for document/literal style SOAP services (such as ASP.NET)
- Attachments support via both DIME and SOAP with Attachments
- Support for SOAP headers
- Full support for pluggable serializers, replace any of the standard serializers with your own (e.g. you could provide a serializer that maps collection objects to/from SOAP Arrays). The serializer engine include multi-ref support for both serialization & deserialization.
- Comes with a propertyBag serializer, serialize any persistant VB object to/from a SOAP complex type out of the box with no extra code !.
- Support for both 1999 & 2001 Schema versions.
- Efficient stream based parsing.
- HTTP 1.1 support including persistent connections, SSL, proxies, authentication, proxy authentication, redirects, cookies and compression.
PocketSOAP is desgined for interop, and is regularly test with over 30 of the leading SOAP tools, including
- Apache SOAP and Apache Axis
- Microsoft SOAP Toolkit v3.0
- Microsoft ASP.NET Webservices
- IONA's XMLBus
- Plus many more from the SOAPBuilders interop effort.
As easy as 1,2,3
This will call the getQuote SOAP service available at XMethods, and display the results.
Set pf = CreateObject("pocketsoap.Factory") Set sp = pf.CreateProxy("http://services.xmethods.net/soap", "urn:xmethods-delayed-quotes") msgbox sp.getQuote(symbol:="AMD")
Using the Core ComponentsThe core object is the Envelope class, this provides access to all the interesting stuff, here's an example VBScript that makes a call to a 4s4c server
This creates and sends the following SOAP request (you can see this with pcapTrace)
Function Test4s4c() dim soap, t set soap = CreateObject("PocketSOAP.Envelope.11") soap.methodName = "Add" soap.URI = "http://simon.fell.com/calc" soap.Parameters.Create "a", 100 soap.Parameters.Create "b", 20 set t = CreateObject("PocketSOAP.HTTPTransport") t.Send "http://soap.4s4c.com/ssss4c/soap.asp", soap.serialize soap.parse t ' jump into the return parameters collection to get the results wscript.echo "4s4c at soap.4s4c.com result (expecting 120) : " & _ soap.Parameters.ItemByName("added").Value end Function
<S:Envelope S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' xmlns:a='http://simon.fell.com/calc' xmlns:XS='http://www.w3.org/2001/XMLSchema' xmlns:XI='http://www.w3.org/2001/XMLSchema-instance'> <S:Body><a:Add> <a XI:type='XS:short'>100</a> <b XI:type='XS:short'>20</b> </a:Add> </S:Body></S:Envelope>
Data TypesAll the major data types are supported, including mutli-dimensional arrays, partial and sparse arrays, as well as complex types. The whole serialization architecture is pluggable, need to write your own custom serializers, no problem !, don't like one of the standard serializers, simply replace it. Support for both the 1999 & 2001 schema's is included, as is a scripting friendly mode, which generates all arrays as arrays of variants for easy use from VBScript and other scripting languages.
SamplesSamples written in VBScript, VB6.0, C++, eVB, eVC and C# for various services are available on the samples page.
New Feature TourSee the new feature tour for info on all the new features.
MigrationCode based on PocketSOAP 0.9.x will need to be modified to work against PocketSOAP 1.x. However the Win32 version can be installed along side the 0.9 version to make migration easier. See the migration guide for tips on converting v0.9 based code to v1.x.
TransportPak BetaA beta version of the TransportPak is now available, this adds some additional transports to the existing HTTP transport. Mozila Public License v1.1 (MPL)
Note: As of v1.4.0, the installers are now using NSIS, rather than MSI.
|Win32 Version v1.5.5 Packaged Install||800||supports Windows 95 OSR2 / 98 / Me / NT4 / 2000 / XP / 2003||
Windows 95 requires DCOM95 Installing first
Windows 95/98 requires additional installs for SSL support, see the docs for details.
|PocketPC Version v1.5.5 Packaged Install||2050||supports ARM, SH3 & MIPS running PocketPC and ARM devices running PocketPC / 2002 / 2003||requires ActiveSync 3.0 or greater to install, tested on Compaq iPaq H3650 (ARM) with a CF wireless network card|
|v1.5.5 Source Code||2483||Single source tree for both PocketPC & Wintel versions||Read the building the source notes first !
Source code is also available via the SVN repository at google code.
|binaries for PocketPC 2000 emulator||386||Built binaries suitable for installation into the pocketPC 2000 emulator.||you'll need to run regsvrce on pocketHTTP.dll, psoap.dll & psdime.dll|
|binaries for PocketPC 2002 emulator||379||Built binaries suitable for installation into the pocketPC 2002 emulator||you'll need to run regsvrce on pocketHTTP.dll, psoap.dll & psdime.dll|
|binaries for Win32||325||supports Windows 95 OSR2 / 98 / Me / NT4 / 2000 / XP / 2003||The Win32 build of PocketSOAP without an installer, all the DLL's in the zip file need registering with regsvr32.exe|
- Added support for milliseconds to the dateTime & time serializers/deserializers (due to a lack of millisecond accessors in the COM dateTime functions, you'll likely need to be in c++ for this to be useful).
- Updated to the latest version of PocketHTTP.
- Fixed a bug where it would try and read past the end of the HTTP response, which would cause an access violation in PocketHTTP.
- Added improved support for xsd:long (a 64 bit integer) via a new object that wraps its and provides various accessors, useful for environments that don't support VT_I8.
- Re-packaged with PocketHTTP 1.2.6 which fixes a problem with logging the HTTP response when the tracing option is turned on.
- A fix for a problem recieving small attachments when the server is using a chunked response with a small chunk size.
- A fix for the problem deserializing soap messages that contain an xmlns="" attribute.
- SOAP faults could result in the entire HTTP response not being read, causing problems with PocketHTTPs tracing, and causing the connection to not get re-used correctly.
- Upgraded to PocketHTTP 1.2.5.
- SOAP 1.2 Support.
- Reduced memory footprint during serialization & messaging sending/receiving.
- Streaming parsing of the response soap envelope.
- Support for gzip in addition to deflate compression.
- Improve performance of base64 handling.
- upgraded to zlib 1.2.1 for improved compression performance.
- zlib & expat dependencies are now staticlly linked for easier deployment and less dll hell.
- handle memeory allocation failures better.
- SOAPAction property would appear wrong when accessed. (but was correct on the wire)
- Fixes to the null de-serializer.
- Fixed memory leak in DIME handling.
- fixed memory leak in deserializing multi-ref arrays.
- fixed memory leak in deflate handling.
- fix for intermitent gzip decompression failures.
- Installer upgraded to NSIS 2.0.
- Fixed a bug with the Nil property not being set properly during deserialization on Win9x.
- The serializer factory now holds a list of known soap headers, and will fault during de-serialization if an unknown header with mustUnderstand='1' is encountered.
- The performance problem when lots (1000's) of forward references are outstanding during de-serialization is fixed.
- the MIME support has been modified to accept responses that don't use a start attribute on the content-type header.
- there are now builds for the PocketPC 2002 Emulator (Thanks to Sergei Bobronnikov for work on the emulator targets).
- connections are now pooled correctly when DIME or MIME attachments are used.
- a crashing bug with handling MIME responses is fixed.
- This now uses PocketHTTP for its HTTP transport (this provides a couple of HTTP related fixes).
- a bug with handling whitespace around HTTP header values is fixed. (pocketHTTP fix)
- a bug with multiple concurrent requests to the same server/port is fixed. (pocketHTTP fix)
- Fixed a bug de-serializing deeply nested id/href references.
- Fixed a bug handling HTTP/1.1 responses that use a connection:close header.
- Fixed a bug with handling trailing white space on HTTP chunk size headers.
- Fixed a bug handling the HTTP headers returned by Weblogic based servers.
- Fixed a bug when local type mappings are using and the response contains multi-ref encoded elements.
- Fixed a potential bug in the win32 SSL handling.
- Added support for deflate compression in the HTTP transport.
- Added support for timeouts in the PocketPC HTTP Transport.
- A bug fix for the psProxy object.
- Improved COM/XSD type mappings.
- Installer switched from MSI to NSIS.
- All 2xx HTTP Status codes are now treated as success.
- A crash during process shutdown when a pooled connection was still open was fixed.
- Added use of CAdapt<T> where required (Thanks to Peter Jonsson for the patch).
- Fix for problem when the server closes a persistent connection before PocketSOAP does.
- Fix for problem re-using the HTTP object over multiple requests.
- Added HTTP/1.1 support including persistent connections and chunked transfer encoding.
- DIME support updated to the June 17 revised specs for DIME and WS-Attachments.
- First step towards having the serializer generate canonical XML.
- Added support for xsd:date and xsd:time types.
- Added missing soap-enc type mappings to the default serializerFactory configuration.
- DIME and SwA Attachments support added.
- Improved document/literal support added [you can now handle typed attributes via the serializer interfaces]
- Improved serialization control.
- Support for streaming transports added.
- SSL over Proxy support added to the HTTP stack.
- A bug in the bounds generation in the Array Serializer was fixed. (only occured if the serializer got pooled and re-used).
- a bug in the base64 decoded was fixed.
- A couple of places needed to call VariantInit before assigning to the variant.
- A bug with serializing VT_NULL variants was fixed.
- Arrays of objects ( VT_ARRAY | VT_DISPATCH ) were not getting their contents serialized.
- Added support for QNames via QName object and QName serializer. Note that the faultcode field of a SOAPFault is now returned as a QName not a string, if you are navigating the SOAPFault object after a fault has being returned, this will probably affect you.
- Added fix for the serialization root not being properly detected when its not the first item in the body.
- ISOAPNamespace interface pointer wasn't being passed to the serializers during serialization.
- Added fix for single item arrays not being serialized correctly. [introduced in 1.2.2]
- Added support for the xsd:hexBinary Schema datatype.
- Fixed a bug serializing arrays with no elements.
- Fixed a bug with de-serializing arrays of strings, when using the unbound array syntax (e.g. arrayType="xsd:string")
- Fixed a couple of bugs in the propertybag serializer relating to it getting pooled.
- Migrated to the Nov 2001 Platform SDK for the Win32 Build.
- Support for deserializing xsi:nil / xsi:null to VT_NULL added.
- A bug in the buffer management for the HTTP authentication support fixed.
- Improved encoding style support added, each node can now set its own encoding Style. setting the encodingStyle to something other than the SOAP section 5 URI, disables the section 5 encoding, making generating schema based messages easier.
- Support for defining local type mappings added to the serializerFactory. (These are element type mappings that are scoped by their containing type, rather than global)
- RawTCP Transport added [from the TransportPak beta], this works with the TcpServer module in SOAP::Lite.
- Migrated from internal collection classes to STLPort 4.5.
- Serializer are now pooled and re-used during [de]serialization.
- Numerous performance tweaks.
- A couple of memory leaks fixed.
- Bug in SerializerFactory causing it be be re-initialized multiple time per requrest fixed.
- SerializerFactory was missing default serializer entries for VT_DECIMAL.
- Fix for empty arrays with a specificed offset throwing an error.
- Memory leak in array de-serializer fixed.
- Bug in HTTP transport regarding empty SOAPActions potentially causing a crash fixed.
- Major new release, far too many changes to list !
- This fixes a couple of critical pocketPC problems
- stack corruption problems with responses greater than 64k (typically locks up your device)
- calling send will randomly fail with "failed to set timeout" error.
- Added Proxy Server support, Proxy Authentication support, Server Authentication support, and settable time outs to the HTTP Transport.
- Fixed a bug in the high level proxy which would fail to correctly propigate all the error info if a SOAP-FAULT was received.
- Added high level proxy object to the Win32 version (EVB doesn't support named arguments, so there is no pocketPC version of this)
- Added support for single dimension arrays (of VARIANTs only)
- Added Host header to outgoing request in HTTP Transport
- Modified the way the SOAPAction proeprty on the HTTP Transport works to be more in line with the Spec (Thanks to Tony Hong for pointing this one out)
- Fixed an interface leak in Envelope::Parse
- Modified the IDispatch implementation so that it works better when late bound in VB / VBA