Custom XML serialization

Open discussion on QxOrm library

Custom XML serialization

Postby exilef » Wed Sep 24, 2014 4:06 pm

Hello QxOrm experts,

first of all: The framework is great, thanks for having created such a powerful and well documented tool!

I have a question regarding serialization, and specifically XML serialization.

The setting is the following:
There exist a number of nodes that exchanges messages via the QxService interface.
Furthermore each node provides a REST-like HTTP-based interface that provides acccess to XML-serialized database entries.

Some questions that I could not answer myself are:

- Can the QxOrm / QxService serialization be customized in a way so that more "reduced" forms of XML are produced? The serialization through QxService contains a lot of meta information that should not be visible in the output by the REST server

- Many of the data object (models) that are to be exchanged between services are directly pulled from a database (using code produced by QxEntityEditor with schema from MySQL). Can this code be reused as data model definitions for the service communication?

- Can there be different forms of XML serialization per object, one for parceling over a service connection, another for serialization in REST requests?


I assume that obtaining some type of synergy should be possible, but I could not find an obvious way (most likely also because I am realtively new to QxOrm).

Every help is appreciated!
exilef
 
Posts: 3
Joined: Tue Sep 23, 2014 9:22 pm

Re: Custom XML serialization

Postby qxorm » Wed Sep 24, 2014 7:32 pm

Hello,

first of all: The framework is great, thanks for having created such a powerful and well documented tool!

Thank you !

Can the QxOrm / QxService serialization be customized in a way so that more "reduced" forms of XML are produced? The serialization through QxService contains a lot of meta information that should not be visible in the output by the REST server

No : QxOrm serialization engine is based on boost serialization, and there is no way to customize the generated XML.
But you could imagine develop your own serialization process (using introspection engine of QxOrm library for example), or use a XSLT transformation process.

Can this code be reused as data model definitions for the service communication?

Sorry I don't understand, could you please give an example ?

Can there be different forms of XML serialization per object, one for parceling over a service connection, another for serialization in REST requests?

No, there is only 1 XML form per instance.
With QxService module, you have the choice : to have the best performance, you can choose to serialize your data in a binary format.
To get different XML forms, you have to write your own process (your own serialization engine, or a XSLT transformation for example).
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Open discussion

Who is online

Users browsing this forum: No registered users and 7 guests