Tag: nancy

将parameter passing给Nancy Route

我有一个Web服务,有一个方法如下: public class DxDService : System.Web.Services.WebService { [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true)] public string GetSData(string strFirstName, string strLastName, string strDOB, string strSource, SortDetails sortDetails, string ID) { //manipulate the params and used to return data } } 我用下面的一段代码在我的NodeJS应用程序中使用了这个Webservice 。 var soap=require('soap') var url = 'http://serverName/DxDService.asmx?wsdl'; var args={'strFirstName':req.actions.firstName,'strLastName':req.actions.lastName, 'strDOB':req.actions.dob, 'strSource':'PtSearch','sortDetails':sort,'ID':''}; soap.createClient(url, function(err, client) { […]