在没有元数据的情况下连接到 Web 服务 [英] Connecting to web-service without metadata

查看:42
本文介绍了在没有元数据的情况下连接到 Web 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想连接到这个网络服务

I want to connect to this web-service

https://training-api.temando.com/schema/2009_06/server.wsdl

我尝试了添加服务引用"和添加 Web 引用",但在这两种情况下都出现此错误:

I have tried to both of "Add Service Reference" and "Add Web References", but in both cases got this error:

下载时出错'https://training-api.temando.com/schema/2009_06/server.wsdl/_vti_bin/ListData.svc/$metadata'.

There was an error downloading 'https://training-api.temando.com/schema/2009_06/server.wsdl/_vti_bin/ListData.svc/$metadata'.

请求失败,HTTP 状态为 404:未找到.

The request failed with HTTP status 404: Not Found.

这个额外的 URL 部分是一般用于 Web 服务还是专门用于 WCF?

Is this extra part of URL generically for web services or is specially for WCF?

我该怎么办?

提前致谢.

推荐答案

您应该做的是将 WSDL 文件下载到您的机器上,并使用 svcutil.exe 工具直接从WSDL.

What you should do is download the WSDL file on to your machine and use the svcutil.exe tool to generate code directly from the WSDL.

这个问题是如何完成的一个例子.

See This Question for an example of how this is done.

我相信您所做的称为 WSDL-First 开发.更详细的链接是 此处.

I believe what you are doing is called WSDL-First development. A more detailed link on that is here.

这篇关于在没有元数据的情况下连接到 Web 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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