With the limited details provided, it is difficult to understand what the issue is. But here, I am giving an idea based on the general way of calling web service using AJAX.
I assume, the service GetCitiesByCountry, you are trying to call expects a parameter of name CountryName and I guess the issue is in the place where you send this parameter. Try changing the code like this and see if it works.
You can see I used
JSON.stringify
for formatting the input before sending to the service.
var url = "http://www.webservicex.net/globalweather.asmx";
$(document).ready(function () {
var input = { CountryName: "IND" };
$.ajax({
type: "POST",
url: url + "/GetCitiesByCountry",
data: JSON.stringify(input),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccessCall,
error: OnErrorCall
});
function OnSuccessCall(response) {
alert(response.d);
}
function OnErrorCall(response) {
alert(response.status + " " + response.statusText);
}
});