コード例 #1
0
        public Dictionary <Device, GeoCoordinate> GetLatestGeoCoordinatesByUserName(string userName, string password, string queryingUserName)
        {
            Dictionary <Device, GeoCoordinate> dic = null;

            try
            {
                ZiZhuJYLocationService.LocationServiceClient client = new LocationServiceClient();
                client.ClientCredentials.UserName.UserName = userName;
                client.ClientCredentials.UserName.Password = password;

                dic = client.GetLatestGeoCoordinatesByUserName(queryingUserName);
                client.Close();
            }
            catch (Exception ex)
            {
                throw new FaultException(ex.GetDebugString());
            }

            return(dic);
        }