We solve this problem by using an object which implements the Memento design pattern. Here is an example of doing this (in C#, but it is easy for Java-ites to read). You can then make the Memento a bean, so your serializer can be quite simple.

http://www.ondotnet.com/pub/a/dotnet/2002/09/09/memento.html

M.




At 02:54 PM 24/10/2002 -0400, you wrote:
Hey guys,
 
Thanks for the help last week with registering my complex class as a SOAP transferable object. I was able to do it using the BeanSerializer class. However, I was forced to change my complex class into a Bean to use it.
 
Now that I've demonstrated to myself that it can be sent as a Bean, I really need to get it back to it's original non-bean form. To do this I realize that I need to write a custom (de)serializer. I've looked at the ones in the AddressBook2 samples, but they use classes that have all their member fields as being public. How can I do it if the fields are all PRIVATE, and there aren't accessor/mutator methods for each of the fields?
 
Thanks!
 
--Mike

Reply via email to