john_zakaria
05-03-2010, 05:14 AM
i have a web service at this url http://196.218.16.133/onlinereservation/service.asmx?op=HotelsSearch
i use hotel search file with HotelSearch method and method will retrieve xml file contains the matched data.
the varialbe that i made post with it is named : HotelData
the data of the variable is a string file that contains an xml data like this
<HotelsParameters>
<CityID>388</CityID>
<UserName>admin</UserName>
<UserPassword>admin</UserPassword>
<DateFrom>4/12/2010</DateFrom>
<DateTo>4/13/2010</DateTo>
<NumberOfRooms>2</NumberOfRooms>
<Room>
<RoomSerial>1</RoomSerial>
<Adults>1</Adults>
<Child>
<ChildSerial>1</ChildSerial>
<ChildAge>5</ChildAge>
</Child>
</Room>
<Room>
<RoomSerial>2</RoomSerial>
<Adults>2</Adults>
<Child>
<ChildSerial>1</ChildSerial>
<ChildAge>8</ChildAge>
</Child>
</Room>
<Room>
<RoomSerial>3</RoomSerial>
<Adults>3</Adults>
<Child>
</Child>
</Room>
<CurrencyID>162</CurrencyID>
</HotelsParameters>
i am trying to get the result by posting HotelData but i did not get the xml result file
so can anyone help me
my code is:
<script language="JavaScript">
function InitializeService() {
service.useService("http://196.218.16.133/onlinereservation/service.asmx?WSDL", "HotelsSearch");
}
var StrSearch;
function GetAge() {
StrSearch = document.DemoForm.StringSearch.value;
service.HotelsSearchService.callService("HotelsSearch", StrYear);
}
function ShowResult() {
alert(event.result.value);
}
</script>
<form name="DemoForm">
Hotel Name : <input type="text" name="HotelData"/><br />
<button onclick="GetAge()">Get Data</button>
</form>
the data in input filed is the previous xml file
i use hotel search file with HotelSearch method and method will retrieve xml file contains the matched data.
the varialbe that i made post with it is named : HotelData
the data of the variable is a string file that contains an xml data like this
<HotelsParameters>
<CityID>388</CityID>
<UserName>admin</UserName>
<UserPassword>admin</UserPassword>
<DateFrom>4/12/2010</DateFrom>
<DateTo>4/13/2010</DateTo>
<NumberOfRooms>2</NumberOfRooms>
<Room>
<RoomSerial>1</RoomSerial>
<Adults>1</Adults>
<Child>
<ChildSerial>1</ChildSerial>
<ChildAge>5</ChildAge>
</Child>
</Room>
<Room>
<RoomSerial>2</RoomSerial>
<Adults>2</Adults>
<Child>
<ChildSerial>1</ChildSerial>
<ChildAge>8</ChildAge>
</Child>
</Room>
<Room>
<RoomSerial>3</RoomSerial>
<Adults>3</Adults>
<Child>
</Child>
</Room>
<CurrencyID>162</CurrencyID>
</HotelsParameters>
i am trying to get the result by posting HotelData but i did not get the xml result file
so can anyone help me
my code is:
<script language="JavaScript">
function InitializeService() {
service.useService("http://196.218.16.133/onlinereservation/service.asmx?WSDL", "HotelsSearch");
}
var StrSearch;
function GetAge() {
StrSearch = document.DemoForm.StringSearch.value;
service.HotelsSearchService.callService("HotelsSearch", StrYear);
}
function ShowResult() {
alert(event.result.value);
}
</script>
<form name="DemoForm">
Hotel Name : <input type="text" name="HotelData"/><br />
<button onclick="GetAge()">Get Data</button>
</form>
the data in input filed is the previous xml file