[Simple-support] Beginner Question
Brought to you by:
niallg
|
From: Graham S. <gr...@mo...> - 2008-06-10 19:36:48
|
First let me say that simple looks great - it's refreshing to find a java serialization tool that works without 5 megs of dependencies! I'm trying to use Simple in a situation very similar to this tutorial example http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php#override I have two classes that implement TaskInterface, Task1 and Task2 and i'd like to be able to serialize the TaskInterface and get usable XML. Putting the class name in the xml seems to work and both of these deserialize fine: <task1 class="com.somispo.om.tasks.Task1" a="14" b="13"/> <task2 class="com.somispo.om.tasks.Task2" c="15" d="16"/> TaskInterface o = (TaskInterface) serializer.read(TaskInterface.class, serializedText); What I can't figure out is how to get that class attribute in the xml output from the Persister? It seems like it should be straightforward, but I can't get it to show when I try to persist a TaskInterface. thanks, Graham |