views:

563

answers:

4

We have a three-tier architecture consisting of Classic ASP Frontend, VB COM+ Objects and MSSql Database.

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...

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?

Are there any libraries / classes that make it easier?

All advice, links, code examples and comments are welcome!

A: 

Since it's a Webservice, is there a reason to avoid using ASP.NET for just that layer?

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.

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.

Fred Wilson
It is only the "consuming" bit that we are concerned about... the webservice itself is definately going to be a ASP.NET one.
Ben
+2  A: 

Here is an article on codeproject which should solve your problem.

Vikram
Good Article, thanks. This would mean that we have to rewrite all vbscript code to use this instead of RecordSets though, right? Is there a way for us to stick with RecordSets...?
Ben
Vikram
+1  A: 

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.

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.

BarneyHDog
A: 

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

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...

JonoW