服务:
public MoviesResponse GetMoviesList(MoviesRequest request)
{
List<Movie> movies = DataAccess.GetMovies(0);
MoviesResponse response = new MoviesResponse();
response.movies = movies;
return response;
}
[DataContract]
public class MovieResponse
{
[DataMember]
public IList<MovieReview> movieReviews;
}
[DataContract]
public class MoviesResponse
{
[DataMember]
public IList<Movie> movies;
}
[DataContract]
public class MovieRequest
{
[DataMember]
public int movieId;
}
[DataContract]
public class MoviesRequest
{
[DataMember]
public int movieId;
}
客户:
MoviesResponse response = Client.GetMoviesList(request);
服务调用完成但从未返回给客户端。