无法为 wsdl 文件创建服务引用 [英] Unable to create service reference for wsdl file

查看:50
本文介绍了无法为 wsdl 文件创建服务引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的本​​地机器上有 wsdl 文件和 xsd 文件.我想在项目中添加服务引用.我没有网络服务,我只有 wsdl 文件.

I have wsdl file and xsd files at my local machine. I want to add service reference in project. I don't have web service I only have wsdl file.

我收到以下错误:

The document was understood, but it could not be processed.
  - The WSDL document contains links that could not be resolved.
  - There was an error downloading 'http://localhost/DService/AllService.svc?xsd=xsd0'.
  - The request failed with HTTP status 404: Not Found. 

推荐答案

您的设置已通过一个 wsdl 文件和几个 xsd 文件完成.您遇到该问题的原因是链接 'http://localhost/DService/AllService.svc?xsd=xsd0'. 已损坏.

Your setup is complete with a wsdl file and a couple of xsd files. The reason you're having that problem is because the link 'http://localhost/DService/AllService.svc?xsd=xsd0'. is broken.

解决方案是在包含 AllService 的 xsd 文件的文件夹中搜索.为方便起见,请将所有文件放在一个文件夹中.接下来是复制包含搜索短语 AllService 的文件的绝对路径,用文件的绝对路径替换 localhost url.

The solution is to search the folder that has the xsd files for AllService . To make it easier, place all the files in a single folder. Next is that you copy the absolute path to the file that contain the search phrase AllService, replace the localhost url with the absolute path to the file.

再次运行命令并观察它的工作情况.

Run the command again and watch it work.

注意:不要删除网址,因为这对于制作完整的代理至关重要.

Note: Do not remove the url as this is essential in making your complete proxy.

这篇关于无法为 wsdl 文件创建服务引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆