views:

14

answers:

1

I have jquery ajax call to webservice for which i am passing xml parameters as data ,when i run the code the flow is not reaching webservice GetList method at all, can anyone track what may be the problem should i make any changes to my webconfig file or refer any latest jquery file to get the code running sucessfully

    $.ajax({
                    type: "POST",
                    async: false, 
                    url: "/blkseek2/JsonWebService.asmx/GetList",
                    datatype:"xml",
                    data:"<?xml version='1.0'?><keyword1>"+keyword1+ "</keyword1><streetname>"+address1+ "</streetname><lat>"+lat+"</lat><lng>"+lng+ "</lng><radius>"+radius+"</radius>" ,
                    contentType: "application/xml; charset=utf-8",
                  //  processData: false,
                    failure: function(XMLHttpRequest, textStatus, errorThrown) 
                         { ajaxError(XMLHttpRequest,textStatus, errorThrown); },
                    success: function(xml) 
                     { ajaxFinish(xml); }


//                  success: ajaxCallSucceed,
//                  dataType: "xml",
//                  failure: ajaxCallFailed
                });
                });

This is my method in webservice file

 public XmlDocument GetList(string keyword1, string streetname, string lat, string lng, string radius)
    {
        XmlDocument xmldoc= CreateXML( keyword1,streetname,lat,lng,radius);


        return xmldoc;

    }
+1  A: 

I would recommend you reading this article containing sample code that you could easily adapt to your scenario and compare with your code to understand the multiple issues with it.

Darin Dimitrov