1
返回的jQuery AJAX调用这是我的Ajax调用WebService的-JsonWebService.asmx文件如何将XML数据从web服务
$.ajax({
type: "POST",
async: false,
url: "/blkseek2/JsonWebService.asmx/GetList",
data: keyword2,
contentType: "application/xml; charset=utf-8",
success: ajaxCallSucceed,
dataType: "xml",
failure: ajaxCallFailed
});
这是我成功的方法,我将如何捕捉的成功方法
XML响应function ajaxCallSucceed(response) {
alert(response.d);
/// here i need to write code to capture response xml doc file
}
这是写在Web服务jsonwebservice.asmx.cs文件我的代码,我可以创建XML sucess充分,但我在返回XML回Ajax调用发现难度
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public XmlDocument GetList(string keyword1, string streetname, string lat, string lng, string radius)
{
XmlDocument xmldoc= CreateXML(keyword1,streetname,lat,lng,radius);
return xmldoc;
}
所以......没有帮助? – 2010-09-02 06:25:08