Model server for an xsd generated ecore model #66
Replies: 4 comments
-
[Martin Fleck] Hello @nicolacalgaroenyr! Do you get any errors in the log or are the children simply missing? We did not have this use case yet so I can only speculate but since the |
Beta Was this translation helpful? Give feedback.
-
[nicolacalgaroenyr] |
Beta Was this translation helpful? Give feedback.
-
[nicolacalgaroenyr] First of all thanks for your feedback! Answering to your first question I confirm that there are no errors on console log neither when I configure the server nor when I ask for models. Children are simply missing as you can see in the attached screenshot. I will try to customize the JsonCodec and create an issue on model server repo as you suggest. |
Beta Was this translation helpful? Give feedback.
-
[nicolacalgaroenyr] Hi, as suggested I've created a custom JSON codec in which I've overidden the encode method in the following way:
Now the whole content of the model is encoded but I've got another issue concerning the eClass attribute inside JSON encoded objects. The eClass attribute is generated only for root object and only few other elements of the model (just a pair over thousands!!!). I think the eClass attribute on JSON objects is crucial for ModelServerClients like TreeEditors and GLSP servers in order to make them works right. Are there some EMFJsonConverter/EMFJsonModule configuration to do in order to have eClass attribute on every JSON encoded objects? |
Beta Was this translation helpful? Give feedback.
-
Hi! I've got some problem regarding model server configuration for a model that comes from XSD file. I've generated java code by emf .genmodel file setting it to manage XML serialization (and not XMI). After that I've adjusted the Application.java and xxxPackageConfiguration.java files in order to point to generated model and everything went ok. After launching the model server I've tried to configure it by API with PUT request for a given URI and also this step went well but afterwards when I've sent the 'GET Models' request, the response of the server contains only the DocumentRoot element and nothing else. Instead when I search for a given element name inside the model server it returns a correct JSON for that element. It seems that there are some problems on FeatureMaps elements management. Having a DocumentRoot element containing FeatureMaps elements is quite a typical situation in case of models generated from XSD with XML serialization. Is there any solution to this problem?
Thank you in advance!
original thread by nicolacalgaroenyr
Beta Was this translation helpful? Give feedback.
All reactions