SQL Server 2008 数据库能否在两个不同端点中同时支持 REST 和 SOAP Web 服务?
假设您有一个 SQL Server 2008 数据库。您构建 SOAP Web 服务。然后,您可以使用 Visual Studio 2010 在一个网站中部署或发布此内容。现在,您可以使用相同的数据库在不同的解决方案中构建 REST Web 服务。您将其部署在另一个网站上。
您是否可以使用 SOAP 和 REST Web 服务的端点和/或 .svc 文件,尽管它们引用相同的 SQL Server 2008 数据库?
我不明白为什么不,但在我走这条路并花几天时间之前,我想确定一下。
此外,如果数据库同时运行 SOAP 和 REST,性能也会受到影响——同样,我不明白为什么这很重要,但我必须确保。谢谢。
Say you have a SQL Server 2008 database. You build a SOAP web service. You then deploy or publish this using Visual Studio 2010 in one website. Now, using the same database, you build a REST web service, in a different solution. You deploy this on another website.
Can you consume the endpoints and/or .svc file of both the SOAP and REST web services, though they reference the same SQL Server 2008 database?
I don't see why not, but before I go down this path and spend days I'd like to make sure.
Also if there's a performance hit to the database if it is running both SOAP and REST at the same time--again, I don't see why it would matter, but I must make sure. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
数据库完全不知道您的客户如何提交请求。它看到的只是运行查询的 ODBC(或其他)连接。即使有 20 个人坐在 SQL Developer 中手动输入这些查询,它也不会知道任何更好的信息。
所以是的,你是对的,你的问题没有意义——你可以拥有任意数量的不同接口,性能/负载将仅由执行的查询决定。
The database is completely oblivious of how your clients submit requests. All it sees is ODBC (or whatever) connections running queries. You could have 20 people sitting in SQL Developer typing these queries manually, it wouldn't know any better.
So yes, you are right, your question makes no sense -- you can have as many different interfaces as you want, performance/load will be determined only by the queries executed.
SQL Server 不会了解您的 Web 服务的任何信息 - 它只会接收查询并将数据返回到调用连接(在本例中为您的服务器端代码)。
它并不关心查询是否源自 VBA、Mgmt Studio、您的 SOAP 服务或全部三者。
SQL Server won't know anything of your web service - it will just receive queries and return the data to the calling connection (your server-side code in this case).
It doesn't care whether the query originated in VBA, Mgmt Studio, your SOAP service or all three.