/// <summary>
        /// Searches for the given user using the given Midpoint model port.
        /// Returns the UserType object for the user if they exist.
        /// </summary>
        /// <param name="modelPort">The model port used to run search Midpoint.</param>
        /// <param name="username">The username to search for.</param>
        /// <returns>The UserType object for the requested user, or null if not found.</returns>

        public static MidpointModel3WebService.UserType searchUserByName(MidpointModel3WebService.modelPortType modelPort, String username)
        {
            MidpointModel3WebService.QueryType query = new MidpointModel3WebService.QueryType();
            query.filter = createNameFilter(username);

            MidpointModel3WebService.searchObjects         request  = new MidpointModel3WebService.searchObjects(USER_TYPE, query, null);
            MidpointModel3WebService.searchObjectsResponse response = modelPort.searchObjects(request);
            return((MidpointModel3WebService.UserType)getOneObject(response, username));
        }