Search This Blog

Friday, February 15, 2008

Relax-WS: Trying To Make WSDL Easier To Use?

As with many things concerning Web Services, there are vociferous
arguments for and against WSDL -- even before WSDL 2.0 poured oil on
the fires. One of the main arguments against WSDL is the verbosity and
complexity of what's involved in writing a WSDL for a service. However,
the Relax-WS project is attempting to provide a solution there. The
idea is to extend Relax-NG Compact Syntax by adding support for
services, ports, operations and messages. The project aims to encourage
developers to think about the WSDL from the start, as part of the
service contract and not as an afterthought. From the Google Code
project page 'relax-ws: A relaxing way to create web service
definitions': "WSDL is a key technology for SOA, and yet creating and
editing these files is about as much fun as straightening all the
noodles in a bowl of spaghetti with a pair of tweezers. Relax-ws
provides a simple, compact syntax for generating WSDL's. It does this
by extending RelaxNG Compact syntax with support for services, ports,
operations, and messages. Some teams use code-driven development,
whereby they write Java or C# interfaces and let their framework
generate the WSDL. This is fast for development, but can easily result
in platform-specific features sneaking in, which renders the interface
unusable for cross-platform clients. An even greater problem with
code-driven development is the evaporation of interface metadata that
occurs during translation into WSDL. Comments are not converted, nor
are any but the most simple type declarations (i.e., the length of an
'xsd:string' field, or the number of digits in a decimal field, etc).
These are important attributes for the consumer of the service to know
about. The opposite approach is WSDL-driven development. The programmer
begins with a WSDL file, and as part of the build generates the service
interface that is then implemented by one or more classes. The challenge
here lies in creating the WSDL! Relax-WS aims to provide a simple,
programmer-friendly syntax, without losing any of the metadata..."

No comments: