Please look at org.apache.cxf.aegis.standalone.StandaloneReadTest. It only reads.
Then read the javadoc for org.apache.cxf.aegis.AegisWriter. Note that Aegis has no concept of a root element, so your code has to choose the QName for the element. Passing null to the Type parameter will cause Aegis to choose the type mapping class for itself, which is probably what you want. On Wed, Jun 18, 2008 at 7:26 AM, Sergey Beryozkin <[EMAIL PROTECTED]> wrote: > I'd also appreciate though if you could please post a simple example. > For ex, the task is to serialize a class x.y.Foo into the output stream, > how one can do ? > Same for the deserialization.... > > Thanks, Sergey > > > The recent refactor of Aegis was intended to allow this sort of thing. >> Keep >> in mind, however, that there's no code generator. >> >> For now, all I can recommend is that you read the source. >> >> Start with three classes: >> >> org.apache.cxf.aegis.AegisContext, and then the stream reader and writer >> in >> the same package. >> >> Aegis is a particularly bad example of internal and external classes >> sitting >> in the same Java package. >> >> There are also some tests with 'Standalone' in their names, they might >> prove >> useful examples. >> >> >> On Wed, Jun 18, 2008 at 5:17 AM, Mickael Istria < >> [EMAIL PROTECTED]> >> wrote: >> >> Hello, >>> >>> I would like to use Aegis to generate XML from objects, and vice-versa. >>> In >>> fact, I would like to use CXF instead of JaxB to do marshalling and >>> unmarshalling. I want the same kind of results as explained at >>> >>> http://cwiki.apache.org/CXF20DOC/aegis-databinding.html#AegisDatabinding-Class%3C%3EXMLMappingOverview >>> >>> However, I just want to use the databinding, so that I want to use Aegis >>> out of CXF, as a standalone "databinder". >>> >>> I did not find any useful information on this topic over CXF or XFire >>> sites. >>> >>> Then, I have the classical 2 questions: >>> - Is it possible? >>> - If yes, can you point me a document, or give me a clue on how to do >>> this? >>> >>> >>> Thanks in advance >>> Mickael >>> >>> >>> >> > ---------------------------- > IONA Technologies PLC (registered in Ireland) > Registered Number: 171387 > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland >
