生成vb文件指令
使用vs开发人员命令提示符 来执行以下指令
1.
-- 指令 wsdl.exe /l:vb /n:webser /out:C:/LoginProxyService.vb http://192.168.1.2/services/Login?wsdl
2.本地的webservice生成wsdl格式
wsdl http://localhost:9352/Xmjd/PlanApprovalService.asmx?wsdl /l:vb /n:NameSpace /out:C:/ExecApprovalService.vb
wsdl http://localhost:8889/PubWebService.asmx?wsdl /l:C# /n:NameSpace /out:C:/PubWebService.cs -- 通过地址生成对应C# 类
将生成的文件拷贝到自己的项目--> 进行调用
string url = "http://" + System.Web.HttpContext.Current.Request.Url.Authority + "/Xmjd/PlanApprovalService.asmx?wsdl"; ExecApprovalService execApprovalService = new ExecApprovalService(); execApprovalService.Url = url; execApprovalService.ExecApproval(JsonConvert.SerializeObject(planIdList));