apresto
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
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
ASKER
Great thanks, i'll have a look into it tomoro
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.dotnetjohn.com/articles.aspx?articleid=173