We have a three-tier architecture consisting of Classic ASP Frontend, VB COM+ Objects and MSSql Database.
我们有一个三层架构,包括经典ASP前端,VB COM +对象和MSSql数据库。
We are going to replace the VB COM by ASP.NET Webservice layer soon but we are not in the position to replace the Classic ASP with new .NET code (yet) and we're therefore going to need a way to consume webservices in Classic ASP...
我们将很快用ASP.NET Webservice层替换VB COM,但我们无法用新的.NET代码替换Classic ASP,因此我们需要一种在Classic中使用Web服务的方法。 ASP ...
We know it's possible but unsure what the best way is to do this...
我们知道这是可能的,但不确定这样做的最佳方式是什么......
Can we return VBScript RecordSets in a webservice call? (All of our Classic ASP Frontend uses Recordsets at the moment). If not what would the easiest way to use consume the results?
我们可以在Web服务调用中返回VBScript RecordSets吗? (我们所有的经典ASP前端目前都使用Recordset)。如果没有,最简单的使用方法会消耗结果?
Are there any libraries / classes that make it easier?
是否有任何库/类使其更容易?
All advice, links, code examples and comments are welcome!
欢迎所有建议,链接,代码示例和评论!
4 个解决方案
#1
Here is an article on codeproject which should solve your problem.
这是一篇关于codeproject的文章,可以解决你的问题。
#2
I suggest that you write a .NET client and compile it with a COM interface so that you can invoke it from classic asp just like any other COM component.
我建议您编写一个.NET客户端并使用COM接口进行编译,以便您可以像使用任何其他COM组件一样从经典的asp中调用它。
Depending on what your webservice returns/requires you may need to write a layer around the the .NET client to make the input\output VB Script friendly. If you are using recordsets in your VB code you could fabricate these inside this layer.
根据您的webservice返回/要求的内容,您可能需要在.NET客户端周围编写一个图层,以使输入\输出VB脚本友好。如果您在VB代码中使用记录集,则可以在此层中制作这些记录集。
#3
Since it's a Webservice, is there a reason to avoid using ASP.NET for just that layer?
既然它是一个Web服务,是否有理由避免仅为该层使用ASP.NET?
It is certainly possible to return a recordset using VBscript, but I'm not sure why you would want to go this route since you would have to convert the recordset to XML, etc.
使用VBscript肯定可以返回一个记录集,但我不确定为什么你想要这条路由,因为你必须将记录集转换为XML等。
Just kicking this out in VB.NET, which is extremely well documented, will probably take less time and energy than all of the crazy debugging you will end up doing in VBScript.
只是在VB.NET中解决这个问题,这个文档记录得非常好,可能比在VBScript中最终完成的所有疯狂调试花费更少的时间和精力。
#4
There is a Microsoft SOAP client COM component you can use in ASP/VBScript, called MSSOAP.SoapClient, you can get it here - http://www.driverskit.com/dll/mssoap30.dll/2342.html
你可以在ASP / VBScript中使用一个名为MSSOAP.SoapClient的Microsoft SOAP客户端COM组件,你可以在这里找到它 - http://www.driverskit.com/dll/mssoap30.dll/2342.html
I don't think MS is particularly supporting this component anymore, the link to the download on their site now redirects to the WCF home page. You'd have to dig for some documentation on it's use as well...
我不认为MS特别支持这个组件,他们网站上的下载链接现在重定向到WCF主页。你必须挖掘一些关于它的使用的文件......
#1
Here is an article on codeproject which should solve your problem.
这是一篇关于codeproject的文章,可以解决你的问题。
#2
I suggest that you write a .NET client and compile it with a COM interface so that you can invoke it from classic asp just like any other COM component.
我建议您编写一个.NET客户端并使用COM接口进行编译,以便您可以像使用任何其他COM组件一样从经典的asp中调用它。
Depending on what your webservice returns/requires you may need to write a layer around the the .NET client to make the input\output VB Script friendly. If you are using recordsets in your VB code you could fabricate these inside this layer.
根据您的webservice返回/要求的内容,您可能需要在.NET客户端周围编写一个图层,以使输入\输出VB脚本友好。如果您在VB代码中使用记录集,则可以在此层中制作这些记录集。
#3
Since it's a Webservice, is there a reason to avoid using ASP.NET for just that layer?
既然它是一个Web服务,是否有理由避免仅为该层使用ASP.NET?
It is certainly possible to return a recordset using VBscript, but I'm not sure why you would want to go this route since you would have to convert the recordset to XML, etc.
使用VBscript肯定可以返回一个记录集,但我不确定为什么你想要这条路由,因为你必须将记录集转换为XML等。
Just kicking this out in VB.NET, which is extremely well documented, will probably take less time and energy than all of the crazy debugging you will end up doing in VBScript.
只是在VB.NET中解决这个问题,这个文档记录得非常好,可能比在VBScript中最终完成的所有疯狂调试花费更少的时间和精力。
#4
There is a Microsoft SOAP client COM component you can use in ASP/VBScript, called MSSOAP.SoapClient, you can get it here - http://www.driverskit.com/dll/mssoap30.dll/2342.html
你可以在ASP / VBScript中使用一个名为MSSOAP.SoapClient的Microsoft SOAP客户端COM组件,你可以在这里找到它 - http://www.driverskit.com/dll/mssoap30.dll/2342.html
I don't think MS is particularly supporting this component anymore, the link to the download on their site now redirects to the WCF home page. You'd have to dig for some documentation on it's use as well...
我不认为MS特别支持这个组件,他们网站上的下载链接现在重定向到WCF主页。你必须挖掘一些关于它的使用的文件......