Hey,
During the Christmas vacation I tried to consume a web service. However I am stuck on how to parse the result,
I've been trying for some evenings now to get how to do it but I haven't managed to find something that shows me how to do it. Just examples showing simpler things like returning an int or writing something to the browser.
Could anyone show me how they would consume a web service like this to help me get out of the hole?
When I try something like this it won't work. I've tried using xmldocument with no luck.. :upset:
Sorry for this coming off as a "give me the solution!" but I just can't seem to figure it out and have tried during Christmas before family duties took all the time and I've picked it up again this week, without getting any further. :disgust:
Thanks!
During the Christmas vacation I tried to consume a web service. However I am stuck on how to parse the result,
I've been trying for some evenings now to get how to do it but I haven't managed to find something that shows me how to do it. Just examples showing simpler things like returning an int or writing something to the browser.
Could anyone show me how they would consume a web service like this to help me get out of the hole?
C#:
[FONT='inherit']HTTP/1.1 200 OK[/FONT]Content-Type: text/xml; charset=utf-8
Content-Length: [COLOR=darkblue]length[/COLOR]
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RoomBookingStatusByIdResponse xmlns="http://tempuri.org/">
<RoomBookingStatusByIdResult>
<BookingPayment>
<RoomId>[COLOR=darkblue]int[/COLOR]</RoomId>
<RoomType>[COLOR=darkblue]string[/COLOR]</RoomType>
<BookingStatus>[COLOR=darkblue]string[/COLOR]</BookingStatus>
</BookingPayment>
<BookingPayment>
<RoomId>[COLOR=darkblue]int[/COLOR]</RoomId>
<RoomType>[COLOR=darkblue]string[/COLOR]</RoomType>
<BookingStatus>[COLOR=darkblue]string[/COLOR]</BookingStatus>
</BookingPayment>
</RoomBookingStatusByIdResult>
</RoomBookingStatusByIdResponse>
</soap:Body>
</soap:Envelope>
When I try something like this it won't work. I've tried using xmldocument with no luck.. :upset:
C#:
protected void Button1_Click(object sender, EventArgs e)
{
hotelService.PaymentWebService test = new hotelService.PaymentWebService();
var result = test.RoomBookingStatusById(0345);
}
Sorry for this coming off as a "give me the solution!" but I just can't seem to figure it out and have tried during Christmas before family duties took all the time and I've picked it up again this week, without getting any further. :disgust:
Thanks!