I have some questions regarding the Java classes generated by WSDL2Java. My assumption is that WSDL2Java was written primarily to create a Web Service client. However it is making the maintenance of my business data classes a bit awkward. Let me try to explain...
When I use Java2WSDL followed by WSDL2Java, the classes generated for these types are different from the original Java classes - they have some additional methods (such as equals(), hashCode(), getSerializer(), getDeserializer() etc.) and some methods removed.
1) Does WSDL2Java make any attempt to merge the methods into the original classes?
2) What is the recommended approach to keep one copy of data classes for the client and the server?
3) The getSerializer() and getDeserializer() methods make the data classes SOAP specific. Is there a way to take these methods out of the data classes in order to keep them generic and not tied to SOAP?
If there is a more elegant approach to solving this problem, I would like to hear about it.
Thanks.
Naresh Bhatia