views:

15

answers:

1

I have a webmethod which is trying to construct xml data document and return to clientside but i am not able to guess whether the error is on clientside call or webservice return method.please can anyone help to sortout this logic [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Xml)] public XmlDataDocument GetList(string keyword1, string streetname, string lat, string lng, string radius) {

  XmlDataDocument xmlDoc=  CreateXML( keyword1,streetname,lat,lng,radius);
    //save file to application folder which will be refferd by client application
  xmlDoc.Save(@"D:\blockseek7-9-2010\Block3.xml");
   //xmlDoc.LoadXml(
  return xmlDoc;

}

This is my call on clientside var keyword2 = "{\"keyword1\":\"" + keyword1 + "\",\"streetname\":\"" + address1 + "\",\"lat\":\"" + lat + "\",\"lng\":\"" + lng + "\",\"radius\":\"" + radius + "\"}"; $.ajax({ type: "POST", async: false, url: "http://localhost:2330/blockseek7-9-2010/JsonWebService.asmx/GetList", data: keyword2, contentType: "application/json; charset=utf-8", dataType: "json", failure: ajaxCallFailed, success: ajaxCallSucceed

                });
            });

This is the function for the ajaxCallSucceed function ajaxCallSucceed(response) { //alert("hi"); GDownloadUrl(response.xml, function(data) { var xml = GXml.parse(response.xml); var markers = xml.documentElement.getElementsByTagName('marker'); map.clearOverlays();

                var sidebar = document.getElementById('sidebar');
                sidebar.innerHTML = '';
                alert(markers.length);

.......... ............ .......................... ..................................

+1  A: 

Use tool such as Fiddler or FireBug add-on for FireFox - this will allow you to inspect each request/response. By looking at response to your web service call, you will know the xml returned. That will help you in determining whether the issue is on server side or on client side.

VinayC
Is my code on clientside is right to capture the xml and parse the xml output
mahesh
@mahesh - can't help there as I am not familiar with google map API that you seems to be using.
VinayC
I want my data to be placed on the buffer because when i place it to particular folder location the older content is not been replaced when i try to read the file from client side
mahesh