locked
implementing a N-Tier-Peer-to-Peer szenario RRS feed

  • Question

  • Hello,

    i am trying to implement an N-Tier-Peer-to-Peer szenario as described in the MSF-documentation ("Architecture and Classes for Peer-to-Peer Synchronization").

    I planned to use the

     

    Code Block
    public PeerSyncProviderProxyObject serviceProxyPeerType peerType)

     

     

    constructor to make it use a web service.

    The code for the basic web service is shown below.

    However when I try to use the web service (browsing the SyncService.asmx) I get the error that the SyncKnowledge class annot be serialized because it doesnt have a deault constructor.

     

    Surely I am doing something wrong here. Is SyncKnowledge really not serializable and if that is the case how do I implement a N-Tier-Peer-to-Peer szenario?

     

    Thanks,

     

    Michael

    Code Block

    [WebService(Namespace = "http://tempuri.org/")]

    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

    public class SyncService : WebService

    {

     

    DbPeerSyncProvider _provider;

     

    public SyncService()

    {

    _provider = new DbPeerSyncProvider(); //TODO: setup a proper instance

    }

     

    [WebMethod]

    public SyncContext GetChanges(SyncScopeMetadata scopeMetadata, SyncSession syncSession)

    {

    return _provider.GetChanges(scopeMetadata, syncSession);

    }

     

    [WebMethod]

    public SyncContext ApplyChanges(SyncScopeMetadata scopeMetadata, DataSet dataSet, SyncSession syncSession)

    {

    return _provider.ApplyChanges(scopeMetadata, dataSet, syncSession);

    }

     

    }

     

     

    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:20 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Friday, November 30, 2007 11:46 AM

Answers

  • Hi Michael,

     

    Yes, SyncKnowledge object is not XML serializable and we are working on if for the next CTPs. Now, you can easily get around this by writing a little more code, basically you can serialize the knowledge as binary and send it to the other side the deserialize it.

     

    Thanks

    Friday, November 30, 2007 10:04 PM

All replies

  • Hi Michael,

     

    Yes, SyncKnowledge object is not XML serializable and we are working on if for the next CTPs. Now, you can easily get around this by writing a little more code, basically you can serialize the knowledge as binary and send it to the other side the deserialize it.

     

    Thanks

    Friday, November 30, 2007 10:04 PM
  •  

    Thanks for your feedback,

     

    looking forward to the next version of MSF. Exciting stuff!

    Tuesday, December 4, 2007 8:09 AM