Hi Paul,

You're right that the problem is the one described in TUSCANY-22 ... it's 
just not implemented yet. For now, you can use XMLHelper.save(DataObject, 
...) to serialize your object.

Frank.


Paul Tomsic <[EMAIL PROTECTED]> wrote on 04/04/2006 05:06:07 PM:

> i can't seem to serialize a dataobject w/o first
> having a datagraph on the dataobject.
> 
> i did find the following:
> 
> http://issues.apache.org/jira/browse/TUSCANY-22
> 
> I'm getting the same stack trace that's listed in that
> jira posting. 
> Is there a way around this?
> 
> Here's my code:
> 
> ---------------
>         DataGraph dataGraph =
> SDOUtil.createDataGraph();
>         DataObject errorList =
> dataGraph.createRootObject(TEST_NAMESPACE, "foo");
>         errorList.setString("bar", "alpha");
>         errorList.setString("baz", "bravo");
>         File tmpFile = new
> File(System.getProperty("java.io.tmpdir") +
> "/foo.xml");
>         FileOutputStream fos = new
> FileOutputStream(tmpFile);
>         ObjectOutputStream out = new
> ObjectOutputStream(fos);
>         out.writeObject(errorList);
>         out.close();
> 
> ---------------
> 
> thx
> 

Reply via email to