LocationServiceSoap.UpdateContact Method

Updates the specified contact in the contact list of the current user (the original submitter of the request).

Public Function UpdateContact (domainAlias As System.String, _      isActive As System.Boolean, _      notifyOnLocate As System.Boolean)

      _ As LocationServiceSoap.LocatableContact
public LocationServiceSoap.LocatableContact UpdateContact (System.String domainAlias,      System.Boolean isActive,      System.Boolean notifyOnLocate);


  • domainAlias
    The domain and alias of the contact for the current user, in the format "domain\user". The domainAlias parameter is required and must be passed as a string. For information about the maximum length of the domainAlias argument, see MapPoint Location Server Parameter Lengths.
  • isActive
    A flag that indicates whether this contact relationship is active.
  • notifyOnLocate
    A flag that indicate if the user should be notified when the contact tries to locate him or her. This flag is set to True if the user wants to receive a notification and False if the user does not. The default value of this parameter is True.


This method returns an instance of LocatableContact class upon successfully updating an existing contact.

If the value of the domainAlias parameter is the same as the value of the contactDomainAlias parameter, a SelfReferentialContactException exception is thrown.


[Visual Basic]
    'Create a LocationServiceSoap proxy instance.
    Dim MyLocationService As New LocationServiceSoap
    'Create and add the credentials required to access the Web service.
    Dim MyCredentials As New NetworkCredential("user", "password", "DOMAIN")
    MyLocationService.Credentials = MyCredentials

        'Update an existing contact for the current user
        Dim MyLocatableContact As LocatableContact = MyLocationService.UpdateContact("DOMAIN\contactuser", False, False)

    Catch MyException As SoapException
        'Your exception processing goes here.
        If ((Not MyException.Detail Is Nothing) And (Not MyException.Detail("Type") Is Nothing)) Then
        End If

        'Your cleanup goes here
        MyLocationService = Nothing
    End Try

  //Create a LocationServiceSoap proxy instance.
  LocationServiceSoap MyLocationService = new LocationServiceSoap();
  //Create and add the credentials required to access the Web service.
  NetworkCredential MyCredentials = new NetworkCredential("user", "password", "DOMAIN");
  MyLocationService.Credentials = MyCredentials;

   //Update the contact
   LocatableContact MyLocatableContact = MyLocationService.UpdateContact(@"DOMAIN\contactuser", false, false);
  catch(SoapException MyException)
   //Your exception processing goes here.
   if (MyException.Detail != null && MyException.Detail["Type"] != null)
   //Your cleanup goes here
   MyLocationService = null;

See Also

LocatableContact Class  |  Location Service Class  |  Using Soap Headers