What is the Tabby/WS library?
Tabby Web Services (Tabby/WS) is a Tabby servlet library that implements Web Services using servlets that exchange SOAP 1.1 XML messages (SOAP Web
Services) and servlets that respond to simple HTTP requests (REST Web Services). You can use the Tabby/WS library to implement SOAP 1.1
and/or REST Web Services using Tabby.
Support for WSDL and DISCO
Tabby/WS provides support for WSDL and DISCO. To obtain the WSDL for a Web Service, simply add a query string parameter of 'wsdl'
to the end of a service Http GET request, as follows:
http://localhost:8989/Tabby.WebServices.Soap11.PingService.scx?wsdl
Download Tabby/WS
Current Version: Beta 2.1.0
Tabby/WS comes as a .zip archive with source code and binaries included. Please use the following link to download Tabby/WS:
[tabby.ws.b2.1.0.zip] (374KB).
Tabby/WS is supplied under a BSD licence which can be found here:
Martin Hunter Source Code Licence.
Installing Tabby/WS
To install Tabby/WS, you will need to:
- Download the Tabby/WS .zip file from this web site.
- Copy the file bin\Tabby.WebServices.dll file from the .zip to the Tabby installation directory on your target machine (e.g. "C:\Program Files\Martin Hunter\Tabby").
- Open the Tabby.exe.config file from the Tabby installation directory, and add "Tabby.WebServices.dll" to the "ServletClassLibraries" <AppSettings> key.
- Restart the Tabby service.
Implementing a Soap 1.1 Web Service
To implement a Soap 1.1 Web Service using Tabby/WS you will need to follow these steps:
- Create a new Class Library Visual Studio project.
- Add references in the project to the Tabby.WebServices.dll and Tabby.Runtime.dll assemblies in the Tabby installation directory.
- Create a new class which extends (inherits from) the class Tabby.WebServices.Soap11.Soap11Servlet.
- Add the attribute "ServiceContract" to your new class.
- Write a "Hello World" operation to test your class. This will require an "OperationContract" attribute.
- Your code should look something like the following example:
using Tabby.WebServices.Contract;
using Tabby.WebServices.Soap11;
[ServiceContract]
public class MyWebService : Soap11Servlet
{
[OperationContract]
public string HelloWorld()
{
return "Hello World!";
}
}
Note: All of the public operations you declare in your new class will be executable via SOAP!
- Build your class library (to Release) and copy your assembly's .dll file to the Tabby installation directory.
- Add your assembly .dll name to the "ServletClassLibraries" <AppSettings> key in the file Tabby.exe.config.
- Restart the Tabby service.
- You should now be able to execute your Web Service using SOAP over HTTP. To help you test your web service, I have included
a sample HTTP POST request here: Tabby.WebServices.ExamplePOST.txt. This
file is also available in the Tabby Web Services download.