Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [texo] JSONEMFConverter from texo web service response
[texo] JSONEMFConverter from texo web service response [message #1746705] Thu, 03 November 2016 13:31 Go to next message
Peter Friedland is currently offline Peter FriedlandFriend
Messages: 6
Registered: November 2016
Junior Member
Hi,

I already found some topics here, but it seems none of seem are about the exactly same issue.

I have an ecore model, generating texo JPA classes. The texo web service also runs properly and I can get proper responses from the service. Now I need to convert the response json string to EObject instances. The following code breaks with the following message:

final JSONObject responseJsonObject = new JSONObject(result.toString());
final JSONObject rootObjectJson = responseJsonObject.getJSONArray("data").getJSONObject(0);
final JSONEMFConverter converter = new JSONEMFConverter();
rootObject = converter.convert(rootObjectJson);


Error: Quote:
No EClass(ifier) found using name com.mycompany.fileSystem|Root


I already found out to have a resolver for the types, but it is straight forward modeled classes from the same service. I thought the ModelFactory of the com.mycompany.fileSystem implements a resolver or someone else.

Do I need to write my own resolver or is there another, easier solution around?

Best Regards

Peter Friedland

[Updated on: Thu, 03 November 2016 13:42]

Report message to a moderator

Re: [texo] JSONEMFConverter from texo web service response [message #1746851 is a reply to message #1746705] Sun, 06 November 2016 13:19 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Peter,
No need to write a resolver afaics. It could be that somehow the ModelResolver does not know about your ModelPackage (yet). The ModelPackage is registered when touching/using the ModelPackage instance or alternatively you can register it explicitly: ModelResolver.getInstance().registerModelPackage(modelPackage). It could be that your code above not yet uses the ModelPackage instance, so you can try registering it explicitly.

gr. Martin
Re: [texo] JSONEMFConverter from texo web service response [message #1747248 is a reply to message #1746851] Fri, 11 November 2016 09:21 Go to previous message
Peter Friedland is currently offline Peter FriedlandFriend
Messages: 6
Registered: November 2016
Junior Member
Ok that may be the problem, I'll give it a try. Thank you!
Previous Topic:[EMF Forms] Hide fields/controls programmaticaly in views
Next Topic:[EMF Forms] Save as XMI removes context menu commands
Goto Forum:
  


Current Time: Tue Jul 17 19:33:24 GMT 2018

Powered by FUDForum. Page generated in 0.01529 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top