简体   繁体   English

在VS2010中创建Web服务包装的最佳实践?

[英]Best practice on creating a webservice wrapper in VS2010?

Background - We are consuming a webservice issued by a telco operator. 背景-我们正在使用由电信运营商发行的Web服务。 Any apps consuming their WS needs to be tested on their staging IP, and this creates an unpredictable overheads on our project timeline as the turnaround time of the operator varies case by case but usually long, without mentioning the red tapes one has to go thru. 消耗WS的所有应用都需要在其暂存IP上进行测试,这会在我们的项目时间线上产生不可预测的开销,因为运营商的周转时间会因情况而异,但通常会很长,而无需提及繁琐的繁文s节。

Can we create a wrapper for this WS such that we only need to pass their staging test at once, after that any new apps will consume the service offer by this wrapper instead of coupling with their own copy of the WS calls? 我们是否可以为此WS创建包装器,以便我们只需要一次通过它们的阶段测试,之后任何新应用程序都将使用此包装器消耗服务提供的内容,而不是与自己的WS调用副本耦合?

So essentially it's a web service wrapping another web service, however they will be hosted on the same server. 因此,从本质上讲,它是包装另一个Web服务的Web服务,但是它们将托管在同一服务器上。

I'm using VS2010 but the production server is an IIS6 on WS2K3. 我正在使用VS2010,但生产服务器是WS2K3上的IIS6。

When I create a new project in VS2010... shall I give WCF Service Application a try? 在VS2010中创建新项目时...是否可以尝试WCF服务应用程序

Or just stick to ASP.NET Web Application ? 还是只坚持使用ASP.NET Web应用程序

I have rule out the possibility to do it as a Windows Service but I could be wrong. 我已经排除了将其作为Windows服务进行操作的可能性,但我可能是错的。

Any helps appreciated. 任何帮助表示赞赏。

TIA TIA

To expose a service to another applications (wrapping the staging WS), I would use WCF if in WS2003 has 3.5 Framework (or 4) installed. 要将服务公开给另一个应用程序(包装暂存WS),如果在WS2003中安装了3.5 Framework(或4),我将使用WCF。 Using WCF you can expose many endpoints - such as TCP if it's affordable in your enviroment - and is the evolution of simple ASP.NET WebServices / Remoting. 使用WCF,您可以公开许多终结点 (例如TCP,如果在环境中可以承受的话),这是简单的ASP.NET WebServices / Remoting的演变。

I would try not to use Windows Services, since it's not flexible and can't be exposed as a service. 我会尽量不要使用Windows服务,因为它不灵活并且不能作为服务公开。

您可以简单地创建一个独立的Windows Forms桌面应用程序并将Web参考添加到该Web服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM