Passing XMLSchema object using Remoting.

  • Thread starter Thread starter sijo
  • Start date Start date
S

sijo

Hi,

I am using .NET Remoting in a client server environment, and I have
to pass an XmlSchema object to the client using remoting. As this
class (XmlSchema) doesn't extend MarshalByRefObject and not
even serializable, what could be a work around for the same ?

best regards
sijo
 
Hi

I think you may try to wrap the XMLSchema object in a MarshalByRefObject
wrapclass or a wrapclass that has implemented ISerializable interface.
You may have a try and let me know the result.
If you still have any concern please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Huang,

Thank you for the response. I have tried both of them, but didn't work
out. I think, all the objects in the hierarchy must be serializable or
extends
MarshalByRefObject for the system to work out. Any other idea...?
(Between I got a temporary solution which will create a byte array from
the XmlSchema object, and recreate the XmlSchema object in the other
end from this byte array).

best regards
sijo
 
Hi Sijo,

I think directly expose XmlSchema instance as a remoteobject is not
possible since it's not designed for remoting usage. Also, I don't think
make the XmlSchema object as a MarshalByRef (delegatable) object is what
you actually want ot do, because exposing an object as ByRef object means
each call on its client delegater will result a remote method call on the
remote object(through distributed channel) which will have performance
concerns.

However, I think your current approach is reasonable, since the XMLSchema
is infact a Xml Document , we could just transfer it as a xml stream to the
remote side and reconstruct the XmlSchema instance( the XmlSchema have the
read method to fill schema from a stream).

If you have any other ideas, please feel free to post here.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top