WSDL first for existing service layer

Posted by Jurgen H on Stack Overflow See other posts from Stack Overflow or by Jurgen H
Published on 2009-02-09T17:40:54Z Indexed on 2010/05/28 5:01 UTC
Read the original article Hit count: 203

Filed under:
|
|
|

I am working on an existing Java project with a typical services - dao setup for which only a webapplication was available. My job is to add webservices on top of the services layer, but the webservices have their own functional analysis and datamodel. The functional analyses ofcource focuses on what is possible in the different service methods.

As good practice demands, we used the WSDL first strategy and generated JAXB bound Java classes and a SEI for the webservices. After having implemented the webservices partially, we noticed a 70% match between the datamodel. This resulted in writing converters which take the webservice JAXB classes and map them with the service layer classes.

Customer customer = new Customer();
customer.setName(wsCustomer.getName());
customer.setFirstName(wsCustomer.getFirstName();
..

This is a very obvious example, some other mappings where little more complicated. Can anyone give his best practices, experiences, solutions to this kind of situations?

Are any of these frameworks usefull? http://transmorph.sourceforge.net/wiki/index.php/Main_Page http://ezmorph.sourceforge.net/

Please don't start a discussion about WSDL first vs code first.

© Stack Overflow or respective owner

Related posts about java

Related posts about wsdl