Thursday, April 23, 2015

Web Service parameter conversion problem

Hi,
   I have written a web service to provision a synchronization scope on a remote SQL Server 2008 database. The database will eventually sync with an SQL CE 3.5 database.


[WebMethod]
public bool ProvisionSQLRemoteScope(string remoteSQLConnStr, string scopeName, Microsoft.Synchronization.Data.DbSyncScopeDescription scopeDescCE)


In my desktop application I call the web method as below.

...

PEWebServiceReference.PEWebService ws = new PEWebServiceReference.PEWebService();

//Create a connection to the desktop site database (SQL CE 3.5)
SqlCeConnection desktopConnection = new SqlCeConnection(desktopConnStr);

//Get the description from the desktop sdf site database
Microsoft.Synchronization.Data.DbSyncScopeDescription scopeDescCE = SqlCeSyncDescriptionBuilder.GetDescriptionForScope(scopeName, desktopConnection);

bool ProvisionRequired = ws.ProvisionSQLRemoteScope(remoteSQLConnStr, scopeName, scopeDescCE);

...

But I get the below error?

Cannot convert from 'Microsoft.Synchronization.Data.DbSyncScopeDescription' to 'PEWebServiceReference.DbSyncScopeDescription'

Any help appreciated.
Thanks
Paul. 


Paul Wainwright

No comments:

Post a Comment