java - JiBX binding - root object extends an object -


Is it possible to pair root objects with super fields?

I have a very complex unit (institutions). I've already lost it):

This is my code status:

  public class CoreRestWrapper {Private integer page; Private integer per page; } Public class UserWrapper CoreRestWrapper Extended {Private Collection & lt; UserCVO & gt; Users; } Public class UserCVO {Personal UserVO userVO; Private map & lt; String, Usmata & gt; Meta; } The public class extends up to the UserVO baseview {// nothing here} public square bsebio {private integer ID; Private string nomenclature; } Public class UserMeta Meta {// nothing here} Public class meta {Private string key; Private object value; Private string type; // string, integer, boolean, date}  

UserWrapper is my root object. I want to see my response XML like this:

   

Or maybe & lt; User page = "1" perPage = "2" & gt; And then just the user tag ...

Is it also possible (to handle the beginner in GBX)?

You can, but you have to define mapping for everything in the hierarchy. The complicated complexity that ran away in the matter is that I simply simplify to map a JIBX wrapper object (eg. UserJibxWrapper), then type a small code to map to the internal object.

In your case however, the object itself is quite simple, so you can generate all necessary mappings. I will work below and take the base class and map it, do the mapping work, then add to the sub-class And change your mapping as needed, and continue to work in that way. Since Mapping JIBX has to know everything in the hierarchy, it is easy to map down-down to the top-bottom.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -