locked
Windows Mobile: Dynamic Web Reference Address for SyncFx RRS feed

  • Question

  • I've been looking everywhere for a solution to this...

    I currently have a WCF service hosting a Sync Framework project to by synced with from windows mobile devices.  We are getting ready to put it into QA.  I guess I assumed it was possible to change the web reference address in the device application at runtime but that does not seem to be the case.

    Has anyone else released a SyncFx application for windows mobile using WCF and found a way to dynamically set the web reference?

    Is there a better way to do this other than with WCF?

    Thursday, September 16, 2010 9:48 PM

Answers

  • have you set the URL behaviour property of the Web Reference to Dynamic and then change the url property by code?
    • Marked as answer by cmparsons Friday, September 17, 2010 5:13 PM
    Friday, September 17, 2010 1:24 AM

All replies

  • have you set the URL behaviour property of the Web Reference to Dynamic and then change the url property by code?
    • Marked as answer by cmparsons Friday, September 17, 2010 5:13 PM
    Friday, September 17, 2010 1:24 AM
  • Yes Dynamic web references do not seem to behave the same in the compact framework as they do in the full framework.  It changes the base address but all the other url references remain.
    Friday, September 17, 2010 3:45 AM
  • that's strange, what error are you getting? am pretty sure i've done this more that a couple of times and it should connect to what the endpoint you specified in the url property.
    Friday, September 17, 2010 6:59 AM
  • I have a SF project that also uses Windows Mobile clients.

    In my client objects, I have two classes that are created from the WCF export tool - CFCientBase.cs and SyncService.cs (the latter of which includes the service interface and the SyncServiceClient class).

    When I create an instance of the SyncServiceClient, I use the following syntax (in VB.Net):

    oSyncService = New SyncServiceClient(SyncServiceClient.CreateDefaultBinding(), New EndpointAddress(m_sSyncServiceRootURL)) 

    ...where m_sSyncServiceRootURL is the URL of the Sync Service (hosted in WCF).

    Hope that helps.

    PaulM

    Friday, September 17, 2010 8:20 AM
  • It does work perfectly... I just failed to set the ip address on one of my calling forms... 

    Thank you for the help.

    Friday, September 17, 2010 5:13 PM