Ban*_*hee 6 c# soap wsdl web-services
我有一个WSDL,我尝试从Visual Studio 2017中生成客户端代理.
现在我收到1个错误和20个警告
错误
严重级代码描述项目文件行抑制状态错误自定义工具错误:无法为服务引用"ServiceReference1"生成代码.有关详细信息,请查看其他错误和警告消息.WindowsFormsApp1 c:\ users\Me\source\repos\WindowsFormsApp1\WindowsFormsApp1\Connected Services\ServiceReference1\Reference.svcmap 1
警告(其中一些)
严重级代码描述项目文件行抑制状态警告自定义工具警告:无法导入wsdl:port详细信息:导入wsdl:port依赖的wsdl:binding时出错.XPath到wsdl:binding://wsdl:definition [@targetNamespace='MyTest.GetInformation:v2']/wsdl:binding[@name='GetInformationBinding'] XPath到错误源:// wsdl:definitions [@ targetNamespace =' MyTest.GetInformation:v2']/wsdl:service [@ name ='GetInformationService']/wsdl:port [@ name ='GetInformationPort'] WindowsFormsApp1 c:\ users\Me\source\repos\WindowsFormsApp1\WindowsFormsApp1\Connected Services\ServiceReference1\Reference.svcmap 1
严重级代码描述项目文件行抑制状态警告自定义工具警告:无法导入wsdl:binding详细信息:导入wsdl:binding依赖的wsdl:portType时出错.XPath到wsdl:portType://wsdl:definitionf [@targetNamespace ='MyTest.GetInformation:v2']/wsdl:portType [@ name ='GetInformationInterface'] XPath到错误源:// wsdl:definitions [@ targetNamespace =' MyTest.GetInformation:v2']/wsdl:binding [@ name ='GetInformationBinding'] WindowsFormsApp1 c:\ users\Me\source\repos\WindowsFormsApp1\WindowsFormsApp1\Connected Services\ServiceReference1\Reference.svcmap 1
严重级代码描述项目文件行抑制状态警告自定义工具警告:无法导入wsdl:portType详细信息:运行WSDL导入扩展时引发异常:System.ServiceModel.Description.XmlSerializerMessageContractImporter错误:数据类型'MyTest.attentionSignal:v1:II ' 不见了.XPath到错误源://wsdl:definitions[@targetNamespace='MyTest.GetInformation:v2']/wsdl:portType[@name='GetInformationInterface'] WindowsFormsApp1 c:\ users\Me\source\repos\WindowsFormsApp1\WindowsFormsApp1\Connected Services\ServiceReference1\Reference.svcmap 1
SoapUI 5.3.0可以从同一个WSDL生成代理,我也可以通过在VS2017中使用Web Reference(compability mode 2.0)来生成代理.然而,后来的解决方案不适合我,因为我有来自此WSDL的v1的代码,我想重用它.
编辑:
这是WSDL,在VS 2017中将其添加为服务参考,您应该看到问题:https://1drv.ms/u/s !AskujIssKpne6170QEQdCLrkG8-u
laz*_*per -2
更新:如果上述方法不起作用。您可以尝试另一种方法 - 使用以下命令通过 XSD.exe 创建 Web 代理
wsdl.exe [path To Your WSDL File] //in visual studio command line
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1013 次 |
| 最近记录: |