RESTful Web服务自动生成WADL [英] RESTful web service auto-generate WADL

查看:348
本文介绍了RESTful Web服务自动生成WADL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立在C#中的RESTful Web服务,并已部署到IIS。当我访问服务HeadOffice.svc,我一定要查看WSDL(HeadOffice.svc?WSDL)的选项。我想这样做的是有观看WADL(例如HeadOffice.svc?WADL)的选项。这可能吗?

I have created a RESTful web service in C# and have deployed it to IIS. When I access the service HeadOffice.svc, I have the option to view the WSDL (HeadOffice.svc?wsdl). What I would like to do is have the option of viewing the WADL (e.g. HeadOffice.svc?wadl). Is this possible?

我身边有,一般的看法是,这是不是最好的做法的地方读取。不过,我需要的WADL一所学校分配,因此任何帮助,将不胜感激。

I have read around the place that the general opinion is that this is not the best practice. However, I need the WADL for a school assignment, so any help would be much appreciated.

推荐答案

假设你已经知道WADL是不是非标准,不广泛支持。而当有人需要WADL,然后可以更好地使用WS * / SOAP服务+ WSDL。所以,你的任务看起来很奇怪。

Suppose you already know that WADL is not standart, is not supported widely. And when somebody needs WADL, may be then better to use WS*/SOAP service + WSDL. So your task looks like very strange.

反正不支持WADL开箱即用,在微软,无论是WCF 3.5休息入门套件,无论是WCF的REST实现4 REST和ASP.NET的WebAPI。

Anyway WADL is not supported "out of the box" in any REST implementation from Microsoft, neither WCF 3.5 Rest Starter Kit, neither WCF 4 REST, and ASP.NET WebAPI.

有对WADL没有可靠的工具.NET。

There are no reliable tools for WADL for .NET.

如果你的目标是使用WADL生成C#的客户端代码,相信我,你会花更多的时间由自己编写客户端代码。而也有对更好的解决方案。

When your goal is to generate C# client code using WADL, believe me, you will spend more time as writing client code by yourself. And there are better solutions for that.

您可以使用新类像的 HttpClient的类或 RestSharp 或类似库轻松手动编写你的客户,这将是更快然后使用Google为.NET

You can use new classes like HttpClient class or RestSharp or similar libraries to easily manually write your client and it will be even faster then googling for reliable WADL solution for .NET

在计算器类似问题的可靠解决方案WADL:的 RESTful服务在.NET中使用WADL而不是WSDL

Similar question on stackoverflow: Restful service in .NET with WADL instead of WSDL

这篇关于RESTful Web服务自动生成WADL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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