Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Serializing EObjects over a webservice
Serializing EObjects over a webservice [message #639653] Wed, 17 November 2010 10:48 Go to next message
Eclipse UserFriend
Originally posted by: andre.loerchner.david-bs.de

Hi,

I'm a bit stuck atm as I am trying to serialize objects from my model
but not writing the resulting XMI to a file but handing it over to a
webservice which then persists this form in any way it likes.

My current guess is that I should extend the XMIResourceImpl, overwrite
doSave()/doLoad() and implement a class extending XMLSaveImpl which is
responsible for the webservice communication. But then, it is just a
wild guess because admittedly I have no clue as to how this works, how
cross resource references would be resolved via a webservice etc.

If anyone could point me in the right direction or show me nice example
(even using a database instead of the file system would probably do) i'd
be much obliged.

regards
Re: Serializing EObjects over a webservice [message #639654 is a reply to message #639653] Wed, 17 November 2010 10:52 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Andre,
Probably others can give some detailed pointers to. Just so you know I am working on exactly this functionality as part
of the Texo project: http://wiki.eclipse.org/Texo

I hope to have something working next week or so.

As you note, the problem is not soo much sending xmi/xml or json over the wire but more how to prevent the whole
database from being serialized, proxy resolving and efficient updating on the server side when sending an update back to
the server.

See my answer on the GWT thread started yesterday or on a recent thread on EMFT:
http://www.eclipse.org/forums/index.php?t=msg&th=199296

gr. Martin

On 11/17/2010 11:48 AM, Andre Loerchner wrote:
> Hi,
>
> I'm a bit stuck atm as I am trying to serialize objects from my model
> but not writing the resulting XMI to a file but handing it over to a
> webservice which then persists this form in any way it likes.
>
> My current guess is that I should extend the XMIResourceImpl, overwrite
> doSave()/doLoad() and implement a class extending XMLSaveImpl which is
> responsible for the webservice communication. But then, it is just a
> wild guess because admittedly I have no clue as to how this works, how
> cross resource references would be resolved via a webservice etc.
>
> If anyone could point me in the right direction or show me nice example
> (even using a database instead of the file system would probably do) i'd
> be much obliged.
>
> regards


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Serializing EObjects over a webservice [message #639686 is a reply to message #639653] Wed, 17 November 2010 13:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33217
Registered: July 2009
Senior Member
Andre,

Comments below.


Andre Loerchner wrote:
> Hi,
>
> I'm a bit stuck atm as I am trying to serialize objects from my model
> but not writing the resulting XMI to a file but handing it over to a
> webservice which then persists this form in any way it likes.
>
> My current guess is that I should extend the XMIResourceImpl,
> overwrite doSave()/doLoad() and implement a class extending
> XMLSaveImpl which is responsible for the webservice communication. But
> then, it is just a wild guess because admittedly I have no clue as to
> how this works, how cross resource references would be resolved via a
> webservice etc.
In the past when testing support for HTTP PUT, I just used an http URI.
Of course most servers by default only support things like GET and not
PUT, so I had to implement server side support for that...
>
> If anyone could point me in the right direction or show me nice
> example (even using a database instead of the file system would
> probably do) i'd be much obliged.
I imagine that any server can respond to http requests so as long as you
use an http URL. If necessary you could write a specialized
URIHandlerImpl, but start by looking at what the existing one already
does...
>
> regards


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:A "do it again" ChangeRecorder
Next Topic:[CDO] Using a Resource (URI) direct for M2M Transformation with ATL
Goto Forum:
  


Current Time: Mon Sep 23 06:24:18 GMT 2024

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

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

Back to the top