Forum OpenACS Development: Help with Web Service Development Tools Comparison

For several weeks I have been trying to find examples of tools which provide the same functionality as TWiST. The big players are:

* ASP.NET
* Apache AXIS
* JAX-WS/JAXB

I have identified three independent bodies of code which are involved in providing a web servce:

1. The actual internal code which does real work,
2. Bridge/Configuration code, and
3. Protocol code: HTTP/SOAP/XML/WSDL/WS-I.

The comparison is completely external: I'm not interested in the internal, non-API details. I want to know how easy it is to provide typical web services, from the perspective of the person writing the code.

For instance:

* How easy is "hello, world".
* How are the three code areas integrated: is each configured separately? How do they mesh up?
* Which comes first: 1,2 or 3.
* How are 1, 2 and 3 kept synchronized?
* How easy are derived types?
* How easy are complexTypes?
* How easy are return types?
* How easy is validation?
* Where does validation take place?
* How are faults handled, which code area(s)?

So far I have found several helpful sites for the very simple examples of adding two numbers or a stock quoting service. These are:

http://msdn.microsoft.com/msdnmag/issues/03/07/XMLSchemaValidation/default.aspx
http://www.ibm.com/developerworks/library/j-cwt08025.html
http://www-128.ibm.com/developerworks/webservices/library/ws-castor/
http://java.sun.com/developer/technicalArticles/WebServices/jaxb/

But these examples barely scratch the surface and I would like to find more real world examples to work with.

What I have found so far, something which sets TWiST apart from what I have seen, is that TWiST doesn't confuse type definition with type mapping. This is probably going to be a huge benefit for TWiST. Basically, the situation is that for the most part Tcl doesn't care about types. Being a glue language, and as used in AOLserver and OpenACS, Tcl just passes data from one endpoint to another, kind of like a courier service. Unless asked, Tcl doesn't do any type checking.

In typed languages, the apparent goal of web service packages is to map the language type to a more-or-less corresponding XML-Schema type. For basic types, this works pretty well, for complexTypes, not so much. An additional wrinkle is that some packages try to do this automatically up to a certain point, which then requires hand coding. But the fundamental problem is in describing the type, not mapping it. For instance, base64Encoded is mapped to byte in java and C#. Obviously lots of bad data would pass through here, although there would be no storage problems.

TWiST allows the developer to describe the types as they derive from the XML-Schema types (or combine them as complexTypes). This is easier than it might appear, as there are only a few methods you can use to restrict types. Tcl does not have to create a new type of storage to stuff the data into, it just has to store the data, like a package. TWiST can then measure it, weigh it, etc., and then pass it on. So TWiST is the shipping/receiving department: making sure the right stuff goes into the right box, or receiving the package and checking for tampering, missing or broken contents, then giving it to the intended recipient.

Now everybody knows that you don't want the CEO handling shipping and receiving, and you don't want shipping and receiving playing with the expensive equipment that passes through their hands. But this is exactly what seems to happen in ASP.NET, Apache AXIS and JAX-WS/JAXB, causing an uncomfortable mixing of these three code areas. But I don't want to get too far ahead of myself, to compare these with TWiST I need more complete examples, or some environment which handles the details. Anyone have experience with other web service environments?

I've also added a step-by-step example for the stockQuoter service at:

http://junom.com/document/tWSDL/user-guide/stockQuoter-example.tcl

The example shows the result of each command on the resultant WSDL for the service. Eventually I'll add links to the code generated, but these are currently at the example service:

http://junom.com/ws/stockquoter2/