Working with the Web Services Response

advertisements

My page must get a response from a web service with the following calls:

GetModBook.InvService.InventoryServiceClient isc = new GetModBook.InvService.InventoryServiceClient();

GetModBook.InvService.GetModBookingsOperationRequest gmoreq = new GetModBook.InvService.GetModBookingsOperationRequest();

GetModBook.InvService.GetModBookingsOperationResponse gmores = new GetModBook.InvService.GetModBookingsOperationResponse();

GetModBookingsOperationResponse has a field called Bookings with an array of Booking as such

public GetModBookingsOperationResponse
{
  public Booking Bookings;
}

I have used the request portion of a web service

example:

gmoreq.RatePackages = new GetModBook.InvService.GetModBookingsOperationRequest[NoofRatePackages]

Editted:

Calling a web service

but I do not know how to call the response portion

Any advise would be greatly appreciated.

Editted:

GetModBookingsResponse GetModBookings(GetModBookingsRequest request)


Here is how you can get response

GetModBook.InvService.InventoryServiceClient isc = new GetModBook.InvService.InventoryServiceClient();

GetModBook.InvService.GetModBookingsOperationRequest gmoreq = new GetModBook.InvService.GetModBookingsOperationRequest();
//set the request parameters if there any

GetModBook.InvService.GetModBookingsOperationResponse gmores =isc.GetModBookings(gmoreq);