javaxjcmyeclipse

SchemaGen/XJC in MyEclipse 2017 CI 10


I feel like this should be easy to find, but I haven't been able to yet. I'm using MyEclipse Enterprise Workbench 2017 CI 10 and am looking for the option that allows the creation of xml from a Java Pojo class (or vice versa). It's the MyEclipse functionality that basically wraps SchemaGen/XJC, if I understand correctly. In other versions of MyEclipse/Eclipse I was able to right click on the class and find a "Generate > ..." menu (or something close to that), but I can't seem to find that now.

Perhaps there is a plugin that is needed, but I don't remember having to do that before...

All other questions related to this seem to be not quite related or outdated.

Thanks for your time.


Solution

  • Ok, I found out the solution (with the help of some Eclipse documentation). Here are the steps to generate an xsd from a pojo:

    1. Right click on the pojo
    2. Select New > Other
    3. JAXB folder > Schema from JAXB Classes
    4. Next
    5. Continue with the Wizard as necessary for your use case...

    I think this uses schemagen under the hood actually. I misleadingly put "xjc" in the Title (although that functionality exists as well using steps 1-3 above and then selecting JAXB Classes from Schema); I will alter the title now to reflect both functionalities.

    There may be a way to get the "Generate" option to come up on a right click more easily than using "New", but I wasn't able to find that. It really isn't necessary at this point since this solution works just fine.