![]() |
These packages are Dolphin 5 packages.
In the instructions that follow, the "A Dolphin 5 Image" directory contains a fresh Dolphin 5 image. The name of this directory is not significant, it is the image directory; the "$" folder in the Package Browser.
Download the zip file to your image directory.
In the above screenshot, "A Dolphin 5 Image" is my image directory.
Expand the zip file in the image directory . This will create a "Steve Waring" directory, and a number of sub-directories.
Important: the "Steve Waring" directory must be a sub-directory of your image directory.
There are 2 "Install" packages in the "Steve Waring" directory that can be used to install Spray and the samples.
The "SW Install Spray (clients only)" will install Spray and the client samples.
The "Clients" folder contains a number of sample clients.
Included are the packages used to deploy the Client apps.
The "XMethods" folder contains the code used to produce the XMethods interop report.
The sample clients are installed as Sample Applications.
The "SW Install Spray (all)" will install Spray and the client and server samples.
The "Services" folder contains a number of sample services.
These services can be used to create both Spray clients and servers.
Included are various Interop services.
Most of the samples included are running on dolphinharbor. For the full list see services.
The "FS FastCGI" and "Swazoo" folders contain packages used by Spray HTTP servers.
The "Yaxo" folder contains the YAXO xml parser which is Spray's default xml parser.
The "Auth" folder contains packages for soap digest authentication.
The "Core" folder contains the core Spray and Splash packages.
The "Transport" folder contains transport packages for various protocols.
The "XMLEncoding" folder contains the packages used to serialize/deserialize xml.
Tests should run at 100%. See Test package comments for more information.
I recommend firstly installing the "SW Install Spray (clients only)" package and using the Dolphin 5 SystemBrowser to view the classes in different folder scopes. Then install the "SW Install Spray (all)" package and again use the SystemBrowser to view the relationship of the classes in the different scopes.
Most classes now have class comments and you can browse the "spray examples" method category for example code.
If you are interested in writing a client, I recommend installing the "SW Install Spray (clients only)" package for examples. You can install a single sample client package into a fresh image to see the minimum set of required classes/packages.
You need to choose between Spray and Splash. Using Spray is less work, but results in executables approximately 100k larger than Splash. Splash requires you to read and understand a WSDL, while Spray does this automatically. I recommend looking at the SprayCachedService class and the "SW WC Google (Spray)", "TB SoapCurrency", "SW WC Terra" and "SW WC Xara 3D (Spray)" samples.
The "ClientInterop\XMethods\SW Interop XMethods" package contains sample code for accessing many of the XMethod's listed services.
If you are interested in writing a service, I recommend installing the "SW Install Spray (all)" package for examples. You can also install packages from the "server" folder which contain SessionMangers that will deploy services as Swazoo or FastCGI executable applications.
The SprayService, SprayLocalService, SprayOperationModel class comments should be reviewed.
The packages in the "Services\Temperatures" folder provide good examples of services. The same service is implemented twice; using both of Spray's methods of generating a service interface. It also has operations that decode/encode simple values, arrays and classes.
The packages in the "Services\ServerInterop\*" folders provide many examples of services implemented using various techniques.
If you are interested in deploying a service as a server, you need to choose between Swazoo and FS FastCGI. Most of the examples use Swazoo as a demonstration server, as Swazoo is easier to configure and test. The advantage of FastCGI is that your server application can be deployed as a WinNT service behind an Apache WebServer.
When working with a client, you can log all activity to the Transcript by evaluating "SptEnvironment current beLoggingWire".
When working with a Swazoo server, you can see an error stack dump in your browser by evaluating "HTTPResponse isDebug: true".