Link to home
Start Free TrialLog in
Avatar of apresto
aprestoFlag for Italy

asked on

Serialising objects to pass over a webservice

Hi All.

I have a class library which i use as a kind of virtual database so i can store generic info in them,

something like:

CDataTableCollection
CDataTable
CDataRow
CDataElement

the heirarchy is as above also.

What i'm trying to do is convert the above into a base64string (or xml) so that i can pass the result to a webservice, and when its received, reconvert it back to as it was before the base64 conversion.

I have been looking into the system.runtime namespace trying to serialise using binaryFormatter and memory stream but i am gettig errors when i try to convert the top object (CDataTableCollection) and all subsequent objects within it.

Question:

How do i convert these objects?
Would i need a method in each object to convert each object individually or can i simply conver the top and the rest is done?

My knowledge of this namespace and serialization in general is quite poor.

Any help in resolving this is greatly appreciated, thanks for your time

Apresto
Avatar of vo1d
vo1d
Flag of Germany image

here is a good example, which shows you how to serialize objects to xml:
http://www.dotnetjohn.com/articles.aspx?articleid=173
Avatar of apresto

ASKER

Great thanks, i'll have a look into it tomoro
ASKER CERTIFIED SOLUTION
Avatar of AGBrown
AGBrown
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial