0
votes

I have the ajax call to webservice jsonwebservice.asmx ,my datatype is xml, i have problem with passing data to webservice is thier any syntax problem

$.ajax({ type: "POST", async: false, url: "/blkseek2/JsonWebService.asmx/GetList", datatype:"xml", data: "keyword1="+keyword1+ "streetname="+address1+ "lat="+lat+ "lng="+lng+ "radius="+radius ,

             failure: function(XMLHttpRequest, textStatus, errorThrown) 
                     { ajaxError(XMLHttpRequest,textStatus, errorThrown); },
                success: function(xml) 
                 { ajaxFinish(xml); }



            });
            });
    });
1
What error message do you have? The property 'data' don't seem to be xml.Torbjörn Hansson

1 Answers

1
votes

Try to make the data into xml.

$.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>" ,