You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by to...@gsk.com on 2004/12/21 09:15:32 UTC

WSDL first - sort of

To my mind, unless you are writing code purely as a web service (that is, 
code that could never possibly be reused), it's best to go with writing 
the business logic separately. In this way, it can be tested without 
needing any web service infrastructure in place, and can be written for 
reusability. Once it's done, a first pass WSDL can be generated from the 
business implementation. That can be used as the starting point for 
developing a fixed WSDL. It might need nothing more than adding some 
comments and separating out the XML schema. But you might need to do more 
work for interoperability. Server skeleton classes can then be generated 
from the WSDL and can be changed to delegate to the business class, 
transforming data, where necessary.

In a sense, the above process is still a WSDL first approach because the 
actual web service implementation class is generated from the WSDL, it is 
just that the WSDL is "written" to call some existing functionality (the 
business stuff that you've just written).

Tony

"Michael Schuerig" <mi...@schuerig.de> wrote on 20/12/2004 20:31:33:

> 
> One thing that didn't become clear for me during this thread is why 
> people are using java2wsdl at all. When I started with Axis and web 
> services, I, too, had the idea of making Axis generate the "right" WSDL 
> for me automagically. I've given up on this idea since. I don't object 
> to generating wsdl from a programming language in general, but to my 
> mind, in cases where interoperability is of supreme importance, a WSDL 
> definition is the starting point. [1]
> 
> The mapping between Java and WSDL involves some loss in either 
> direction; the two languages are different in expressiveness and in 
> what they emphasize. In particular, I wouldn't expect roundtrip mapping 
> to give sensible results.
> 
> Michael
> 
> 
> [1] http://webservices.xml.com/pub/a/ws/2003/07/22/wsdlfirst.html
> -- 
> Michael Schuerig                           The more it stays the same,
> mailto:michael@schuerig.de                        The less it changes!
> http://www.schuerig.de/michael/      --Spinal Tap, The Majesty of Rock
>