Book a Demo

Author Topic: UML to XML  (Read 14232 times)

rmacior

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
UML to XML
« on: December 09, 2010, 12:29:01 pm »
Hi. I'm new to EA and UML and have been trying to create an XML file from a basic Model that I created and also from a more complex model that was sent to me. I know that person can create an  XML schema from his UML model on his machine.
For either model, under the Project Browser, when I right click on the Domain Model and select, Code engineering-Generate XML Schema-then Generate( in the Generate XML Schema Window). I get a message that says "One or more Packages missing Filename".
Can any one point me in the right direction so I can get an XML file from a UML model?
Thanks.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: UML to XML
« Reply #1 on: December 09, 2010, 02:29:16 pm »
I would say that you have not (properly) defined a file path for the XSD file being generated. Please follow this procedure carefully:

http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/software_development/generate_xsd.html

There are a few points where you help the generator locate and use the file path for the generated file.

Let us know if things still don't work.
Best Regards, Roy

rmacior

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: UML to XML
« Reply #2 on: December 16, 2010, 01:33:59 pm »
Ok, I see now that I need to define an .xsd file in the filename. But now I'm getting warnings such as:Adding class attributes...
      Warning no XSD type found for: "char".  Default is: xs:string
      Warning no XSD type found for: "char".  Default is: xs:string
      Warning no XSD type found for: "Security".  Default is: xs:string
      Warning no XSD type found for: "Releasability".  Default is: xs:string
      Warning no XSD type found for: "IDdata".  Default is: xs:string
      Warning no XSD type found for: "DateTimeGroup".  Default is: xs:string

There are more of these type warnings.
Can you give me an idea of why I would be getting those warnings?
Thanks.

rmacior

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: UML to XML
« Reply #3 on: December 16, 2010, 02:13:19 pm »
OK, now I can get it to generate a schema, but when trying to open the file, it tries to open it but just keeps tying to open the file and can't/doesn't. I assume it has something to do with the warnings I got as described in the last posting,



Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: UML to XML
« Reply #4 on: December 16, 2010, 04:54:28 pm »
I think the best approach is to start from a simplified version of your structure in an XSD, and then import that into EA.
That will give you a good idea of how you are supposed to model an xml schema in EA.

Geert

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: UML to XML
« Reply #5 on: December 20, 2010, 09:31:42 am »
I asked one of our engineers to take a quick look, and this is his response:

>> The attribute "e1" is referring to the class "C2". Whereas, the attribute "e2" is referring to "Unknown" which does not exist in the model.

When generating XSD, the XSD Generator could resolve the type of the attribute "e1" (as it exists in the model) and hence it has no trouble validating this attribute.

But, it throws a warning when validating the attribute "e2" because "Unknown" does not exist in the model.<<

There is a screenshot too, but I can't seem to get it into this post. I'll email it to you - if I can.
Best Regards, Roy