1

I have a java class which is used to retrieve objects (Assume foo from Foo class is used for this)

For example

ComplexObject cObject=foo.getMeAnObject(param);

will return me an object.

This object itself consists of properties which could be hashmaps, Lists or could be some other objects

For example

Map<String,AnotherObject> aObjects=cObject.getSomeFields();
AnotherObject2 aObject2=cObject.getDifferentFields();

I need to create individual XML Schema Definitions (XSDs) for these object properties. This has to be automatically generated. Eventually those individual XSDs will be used to create the XSD for ComplexObject

Can anybody suggest me a technology or library which I should use to solve this problem

gihanmu
  • 136
  • 1
  • 12
  • 2
    You can use JAXB 2.0 – V__ Feb 26 '15 at 05:43
  • @VasudevPathak - I read about JaXB. It has xjc and schemagen commands to convert java->xml and vice versa, but I don't think that it can be applied for this scenario – gihanmu Feb 26 '15 at 05:46
  • 1
    @gihanmu: Are you sure you can't use JAXB? See http://stackoverflow.com/questions/7212064/is-it-possible-to-generate-a-xsd-from-a-jaxb-annotated-class and https://jaxb.java.net/guide/Invoking_schemagen_programatically.html – dbank Mar 10 '15 at 05:32

0 Answers0