Why should it be impossible ?
When you will have to transport class instances by an interface -
you could define a function like
The caller could create an
serialize any object(s, collections) in to the file
and pass the detached
to the interface function
Of course the server must know the trasported objects
and their serializing methods...