eclipse-emfcloud / emfcloud-modelserver

Modelserver component
Other
43 stars 21 forks source link

when l convert the EMF xml file to the json type ,seemly not converted successfully(only left "eClass" property) #154

Closed davidxwwang closed 2 years ago

davidxwwang commented 2 years ago

l copy the plugin and dependency from others it ok now, but when l convert the EMF xml file to the json type ,seemly not converted successfully(only has the "eClass" property, other properties is losted), so l donot know why. the original xml file :

<?xml version="1.0" encoding="UTF-8"?> <AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_00049.xsd"> <AR-PACKAGES> <AR-PACKAGE UUID="6ad69a4a-9da9-49aa-b75b-c99cfebaa0b6"> <SHORT-NAME>ARRoot</SHORT-NAME> <AR-PACKAGES> <AR-PACKAGE> <SHORT-NAME>P1</SHORT-NAME> <ELEMENTS> <BSW-MODULE-DESCRIPTION> <SHORT-NAME>des1</SHORT-NAME> </BSW-MODULE-DESCRIPTION> </ELEMENTS> </AR-PACKAGE> </AR-PACKAGES> </AR-PACKAGE> </AR-PACKAGES> </AUTOSAR>

but when its converted json form is , some data is disappeared, its json form data is : {"jsonrpc":"2.0","id":1,"result":{"body":{"eClass":"http://autosar.org/schema/r4.0/autosar40/atls#//AUTOSAR"},"statusCode":200,"statusMessage":"OK"}}

eneufeld commented 2 years ago

Hi @davidxwwang , this looks like your model is not known to the modelserver. Did you register it? See https://github.com/eclipse-emfcloud/coffee-editor/blob/03539ebfb62ede5454858e67887231458ab180a7/backend/plugins/org.eclipse.emfcloud.coffee.modelserver/src/org/eclipse/emfcloud/coffee/modelserver/CoffeeModelServerModule.java#L32

davidxwwang commented 2 years ago

@eneufeld we already register it, is the "emfjson-jackson" not support subPackages in EMF models, as mentioned in https://github.com/eclipse-emfcloud/emfcloud/discussions/41 ?

eneufeld commented 2 years ago

@davidxwwang, if you have subpackages in your model, then this is definitely a possible source of the error.

davidxwwang commented 2 years ago

@eneufeld thanks, could you get some advice how can l convert such EMF model that have subpackages( l am a newer of EMF ), to the JSON form, thanks a lot!

eneufeld commented 2 years ago

As I don't know your model and there might be a reason for the existence of your subpackages, I recommend to check this blogs and tutorials:

If you are stuck and need professional support, you can find different offerings online.

EclipseSource also offers support you can check here: https://eclipsesource.com/services/developer-support/

davidxwwang commented 2 years ago

As I don't know your model and there might be a reason for the existence of your subpackages, I recommend to check this blogs and tutorials:

If you are stuck and need professional support, you can find different offerings online.

EclipseSource also offers support you can check here: https://eclipsesource.com/services/developer-support/

thanks!

eneufeld commented 2 years ago

Issue seems resolved. Please open a new one if you encounter issues.