WebServices - Serialization - Versioning

Posts   
 
    
obzekt
User
Posts: 60
Joined: 29-Apr-2004
# Posted on: 02-Sep-2004 15:48:56   

Having LLBLGen entities serialized for use in webmethods means that all client installations need to be updated (LLBLGen DAL assemblies downloaded) whenever the entities change or a new ORM is setup at the server.

Do you guys have any suggestions on how to accomplish that 'active sync' in a web service scenario (Otis had suggested that in an older thread)? An idea is for the client to inject version info in SOAP headers so that the webmethods can check for compatibility and fail with a special code. The client will then have to download the new assemblies. Any idea on how to do that seamlessly?

CodeMonkey
User
Posts: 14
Joined: 30-Aug-2004
# Posted on: 02-Sep-2004 21:45:08   

You may have to look into IXmlSerializable (not officially supported in .NET 1.1 - but is in 2.0) and handle the serialization yourself.

If you have a verson field as the first transmitted field then you coudl use this and create ways of supporting older objects i.e. backward compatibility.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 02-Sep-2004 22:05:45   

You can mimic IXmlSerializable now with the methods ReadXml() and WriteXml() implemented on entities and entitycollections.

There is no version in there though. It might be an idea that a client is pulling the latest assemblies from the server each time it is started... not sure if that is sufficient.

Frans Bouma | Lead developer LLBLGen Pro