InfoQ

News

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

Posted by Mark Little on Feb 11, 2008 09:06 AM

Community
SOA
Topics
Web Services
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. As the project page so aptly puts it:
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.
They 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 after thought:
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!
So for instance a relatively simple service could be defined as:
#
# This is "hello world" in relax-ws.
#
service Hello {

port {
operation SayHello {
in {
element name {xsd:string}
}

out {
element message {xsd:string}
}

}

}
}
And Relax-WS would then generate the associated WSDL automatically. But does this really help isolate the developer from WSDL? It it sufficient to silence some of the WSDL critics? As one of the comments on James Strachan's blog states:
Definitely cool, but doesn't this suffer from the same shortcomings it claims to fix: "code-driven development........is fast for development, but can easily result in platform-specific features sneaking in, which renders the interface unusable for cross-platform clients."

Don't get me wrong, I despise WSDLs, but I would think auto-generating a WSDL from Java or a relaxng snytax would both result in "unusable cross-platform clients."
Code First, Contract Aware by Francois Ward Posted Feb 11, 2008 2:31 PM
Try it out with Apache Tuscany by ant elder Posted Feb 12, 2008 5:33 AM
  1. Back to top

    Code First, Contract Aware

    Feb 11, 2008 2:31 PM by Francois Ward

    That is an approach I've always used, but at some point read an article defining it using that term, and I always thought it was fitting. Code First, Contract Aware, as a mean to generate WSDLs... Meaning, the developer could make their web service interfaces in code, and have the WSDL autogenerated, but not do so in cowboy style: define specific interfaces/contracts (don't use your internal DTOs straight as return types! never never never!), build those contracts as if they were a UI Model object, return those, and be "aware" of what translates to what, so you get really what you want. Using, for example, WCF from .NET, building contracts that way, using attributes to fine tune your contract, you can have excellent WSDL generated, very easily. They'll also be fully WS-I compliant, so that shouldn't be much of an issue. You still need to have basic knowledge of WSDL, but you don't have to actually use it!

  2. Back to top

    Try it out with Apache Tuscany

    Feb 12, 2008 5:33 AM by ant elder

    ...and if you'd like to try it out in a real runtime there's now an Apache Tuscany module to support Relax WS interfaces. Read about it in this blog post

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.