I am new to map struct. I am try to convert JSON to XML. My XML component looking for XSI type. I have done the custom mapping with the cast the XSI type object. But the XML is missing the XSI type. which is leading in the sub systems.
default com.test.sales.types.Order map(com.test.order.types.Order value) {
if (value != null) {
com.test.sales.types.Order mapping = null;
if (value instanceof com.test.order.types.X)
mapping = map((com.test.order.types.X) value);
else if (value instanceof com.test.order.types.Y)
mapping = map((com.test.order.types.Y) value);
return mapping;
}
return null;
};
It is working fine if you set the object on the root element object.
};
};
} else {
} }