在没有元数据的情况下连接到 Web 服务

编程入门 行业动态 更新时间:2024-10-25 16:19:19
本文介绍了在没有元数据的情况下连接到 Web 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我想连接到这个网络服务

I want to connect to this web-service

https://training-api.temando/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/schema/2009_06/server.wsdl/_vti_bin/ListData.svc/$metadata'.

There was an error downloading 'https://training-api.temando/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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-26 06:19:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1130542.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   情况下   数据   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!