winrt 添加服务引用(json 不是 asmx)
winrt adding service reference (json not asmx)
我想添加服务参考,但是当我复制我的 url 时,它说:
"There was an error downloading metadata from the address. Please
verify that you have entered a valid adress."
我的 url 不是 asmx,它是 json,详细信息:
"... was not recognized as a known document type."
有人知道如何在 winrt 中引用 json 吗?
我的 url 不是 asmx 它是 json
表示你使用的是WCF Rest Service(Json),如果是WCF Rest Service我们就不能添加服务引用,需要使用HttpClient/HttpWebRequest来帮助我们在 Windows 运行时使用服务。
有关如何从 Winrt 使用 Json 服务的更多信息,请尝试查看此 MSDN 示例:
How to use HttpClient to post Json data to WebService in Windows Store apps
祝你有愉快的一天。 :)
我想添加服务参考,但是当我复制我的 url 时,它说:
"There was an error downloading metadata from the address. Please verify that you have entered a valid adress."
我的 url 不是 asmx,它是 json,详细信息:
"... was not recognized as a known document type."
有人知道如何在 winrt 中引用 json 吗?
我的 url 不是 asmx 它是 json
表示你使用的是WCF Rest Service(Json),如果是WCF Rest Service我们就不能添加服务引用,需要使用HttpClient/HttpWebRequest来帮助我们在 Windows 运行时使用服务。
有关如何从 Winrt 使用 Json 服务的更多信息,请尝试查看此 MSDN 示例:
How to use HttpClient to post Json data to WebService in Windows Store apps
祝你有愉快的一天。 :)