Thanks a lot to Vartan, Dies and Robert for your comments. I seem to have missed Dies' message the first time round, so I am glad that Robert took it up.
The situation as described by Dies is perfectly correct. As for mapping Hibernate collections to arrays, I think I could replace the existing set with arrays. (the only limitation being this: " Please note that Hibernate does not support bidirectional one-to-many associations with an indexed collection (list, map or array) as the "many" end, you have to use a set or bag mapping."). In this case however, I'd lose the code generation capabilities from the Hibernate tool I'm working with, which for some reason assumes Set as the default for collections. I presume going down the adapter road might the most feasible. I have some manager classes for the POJOs, which provide a facade to the database (add, delete, update etc.). These classes could also serve as the adapters to convert the WSDL2Java generated objects that are used on the client side to POJOs used on the server side. I hope this makes sense, I don't really have that much experience (as you may have guessed). Cheers, Martin > I agree with dies - just one small caveat. I use hibernate with axis quite a > bit: > You can use xs:dateTime > <http://www.w3.org/TR/xmlschema-2/#dateTime> with > java.util.Calendar<http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html>- > its pretty easy to get from there to > java.util.Date . Some databinding frameworks - JWSDP for example - support > java.util.Date directly. > The way I use Hibernate collections is to map them to Arrays. WSDL handles > array well. java.util.List and java.util.Set works well in that regard > directly via Collection.toArray() . For java.util.Map, I create a complex > type that has an array each of the keys and values, and then just compare > the size to make sure they're equal. > For Hibernate based POJO's with lots of fields - you need to map one to one > the POJO to a complex object. I typically do this in an Adapter. > HTH, > Robert > http://www.braziloutsource.com/