Book a Demo

Author Topic: [SOLVED] Java API. Generate XML Schema  (Read 13046 times)

gervais.b

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
[SOLVED] Java API. Generate XML Schema
« on: January 27, 2015, 11:08:21 pm »
Hello,

I'm using the Java API/Sdk to generate our services documentation and scaffold the projects. During this process, I need the XML Schemas.
At this time, we have to generate them previously in a given location. But I would like to skip this manual step.

Can I reuse the "XML Schema generator" ? And how ?

Thanks a lot
« Last Edit: February 11, 2015, 10:07:12 pm by gervais.b »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Java API. Generate XML Schema
« Reply #1 on: January 28, 2015, 12:09:55 am »
I guess you're out of luck here. There's Respository.CustomCommand which can do some magic, but AFAIK no XML Schema Generation - unless some kind Sparxian will tell us how.

I once created the schema programmatically. It was not that difficult. Maybe you do that too.

q.
« Last Edit: January 28, 2015, 03:57:25 am by qwerty »

gervais.b

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Java API. Generate XML Schema
« Reply #2 on: January 28, 2015, 02:27:15 am »
Quote
I once created the schema programmatically. ... Maybe you do that too.

Yes. Unless someone can give ma a better solution I think I'm going to do that

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Java API. Generate XML Schema
« Reply #3 on: January 28, 2015, 04:02:44 am »
Just stumbled over ProjectInterface.GenerateXSD. That's probably what you need.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Java API. Generate XML Schema
« Reply #4 on: January 28, 2015, 03:05:11 pm »
If it's not in the Java API for your version and you can't upgrade to 12. You could probably get the jar and dll for the Java API from the v12 trial.

gervais.b

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Java API. Generate XML Schema
« Reply #5 on: February 11, 2015, 10:06:53 pm »
So finally,

After having installed the trial version of EA 11, I was able to extract the Dll and the Jar in order to access the "Project" class.
With this class I'm able to generate the Xsd. It's really easy.

Thanks a lot.