Rest – Leveraging SOAP in Classic ASP

asp-classicasp.netrestsoap

Clarification: this is not about user agent calls to pages, but Classic ASP calling ASP.NET!

I have applications that are midway through a transition from Classic ASP to ASP.NET. There are a half million lines of code, so a complete rewrite of everything at once was simply not plausible, or frankly prudent considering that the vast majority of Classic ASP pages work just fine. We translate pages and functionality as they come up for revision anyway, not just because it is "cool".

Now that about half the pages have been converted we have moved some of the key functionality over to ASP.NET. Instead of keeping the legacy versions of this functionality (which means two places to maintain instead of one) I have been moving towards using SOAP to expose this functionality.

Well… not really. Instead, we have been using what I used to call "Poor Man's SOAP", although today it is trendy to call it REST. I have been using ServerXMLHTTP to contact the destination page, bundling up a ball of XML and POSTing it over to the ASP.NET side. For the result I have been bundling up some XML and using XPATH to tear it down into variables.

All of this works surprisingly well. However, I have been contemplating the built in ASP.NET SOAP features, which would seem to remove the need to custom write landing pages for my cross platform calls… but when I look at consuming SOAP from Classic ASP most suggest using the seemingly depreciated Soap Toolkit.

The question is; do any of you have experience with this kind of setup and if so are there any better ways to do it than custom REST pages or Soap Toolkit? I think being able to expose more of the ASP.NET functionality quicker would help with the migration, but I don't want to get myself mired in legacy technology like Soap Toolkit unnecessarily.

Best Answer

Doing a bit more searching I found

Calling REST web services from a classic asp page

which in turn linked to

http://www.aspfree.com/c/a/ASP/Consuming-a-WSDL-Webservice-from-ASP/

This is pretty much how I'm doing things now, so perhaps this is the best solution?