WSDL first for existing service layer
- by Jurgen H
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.