Book a Demo

Author Topic: EA. generated XSD file without operation  (Read 5156 times)

Jsc

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
EA. generated XSD file without operation
« on: August 06, 2020, 06:05:20 pm »
Hi, everyone

I have a question about the generated .xsd file from uml class diagramm.
I have noticed ,the generated xsd file for class diagramm in EA contains only the information about class, attribute, and enum datatype.
Is it also possible to generate the information about operation into xsd file ? ( or even state machine)

Meanwhile i also tried to import xsd file from outside into EA to get a uml diagramm (reverse engineering) . Is it a possible way for reverse engineering? I have wroten a parser in c# to generate the xsd file depends on my code. Or are there other better ways for reverse engineering.
Because the code i used is not a common code (it is PLCopen open XML file)

horszasz

  • EA User
  • **
  • Posts: 22
  • Karma: +6/-0
  • My name is Gergely :)
    • View Profile
Re: EA. generated XSD file without operation
« Reply #1 on: August 06, 2020, 07:43:52 pm »
Hi Jsc, 

XSD file is about defining XML data structures. It cannot contain any operations.     

If you want to see the operations in the generated file, you probably need a WSDL file. Look at EA documentation about how to generate WSDL from class model with EA. It's quite simple.   

Importing and reverse engineering an XSD file (or even a WSDL) is definitive possible with EA.   

Regards, Gergely

Jsc

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: EA. generated XSD file without operation
« Reply #2 on: August 11, 2020, 06:13:59 am »
Hi, Gergely

thanks for the reply. It is helpfull.
I have finally chosen XMI to realize the reverse engineering from other XML files. And now i have met another problem.
By import XMI into EA i can get the class elements with attributes, operations from outside. (only shown in project browser and not in domain model)
Is there a way to create uml class in domain model accroding to the class elements is project browser?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: EA. generated XSD file without operation
« Reply #3 on: August 11, 2020, 07:13:24 am »
Quote
accroding to the class elements is project browser?
What do you mean by that?

q.

horszasz

  • EA User
  • **
  • Posts: 22
  • Karma: +6/-0
  • My name is Gergely :)
    • View Profile
Re: EA. generated XSD file without operation
« Reply #4 on: August 11, 2020, 04:08:11 pm »
i can get the class elements with attributes, operations from outside. (only shown in project browser and not in domain model)
Is there a way to create uml class in domain model accroding to the class elements is project browser?

Hi,

actually, your writing is a bit confusing for me. What do you understand under "domain model" in this context? Do you think on the class diagram?

Please, don't forget, the diagram is just a view of the model, it is not the model itself! If you can't see something on a diagram, it doesn't mean, it is not in the model.

If you import data from xmi, EA will not generate diagrams for the imported element - except if the diagram definition is also part of the xmi. You have to construct the diagrams with using the imported element.

If you are using the standard RE toolset of EA (like XML import, WSDL import, etc.), EA will create some default views (diagrams) automatically - but no garantee, these are suitable for you.

If I missunderstood your writing, please make it more clear, what actually the problem is.

Bests,
Gergely


Jsc

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: EA. generated XSD file without operation
« Reply #5 on: August 11, 2020, 04:28:04 pm »
Hi Gergely,

sorry that i did not explained it very clear.
You are right. I create the XMI file with c#. Because the part for diagramm definition in XMI is a little bit complex, so i did not generate the information like the position of class diagramm in XMI file.
Just like you have said, right now i can get a uml project (class, attribute, operation) through import from xmi. But i can not see the diagram.
My goal for the reverse engineering is to make the plc program more readable and easy to understand. Without a diagram is difficult to reach the goal.

horszasz

  • EA User
  • **
  • Posts: 22
  • Karma: +6/-0
  • My name is Gergely :)
    • View Profile
Re: EA. generated XSD file without operation
« Reply #6 on: August 11, 2020, 04:47:54 pm »
It's a really hard topic. In my experience no generated diagram can be expressive enough for human understanding. (The exception can be some very simple diagrams, of course, but I assume you have ones from the more complicated type.)

I have only two tipps:
1. try out the standard XSD import, and look at the generated diagram, if they are suitable for you.
2. generate a very simple diagram into XMI with all defaults, and afterwards  try out EA's diagram layouting tools.

// Generally, I find to be better the forward progress in modeling: first I construct the model and the illustrating diagram in the planning / elaboration phase, and the code is generated from the model - not backwards :) But i know, this argument will here not help you :) 

Maybe there are some more sophistycated tools for this thing, but I have no expereience with that.   

G.

Jsc

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: EA. generated XSD file without operation
« Reply #7 on: August 11, 2020, 05:16:13 pm »
Hi Gergely,

Thanks for the reply.
you are right. Actually it is a dilemma for me. With .xsd import i can not get the operation information.
with .xmi import i must define the diagram definition.
I would like to create a  closed loop between code and uml model (like forward and backward). Before i created a template to generate plc code from model. It would be very nice  if the reverse engineering  is also possible.