views:

273

answers:

1

Does anyone have any good examples of calling a WCF service from a classic asp page? I looked at

Calling REST web services from a classic asp page [closed]

and it got me closer but I need to pass parameters to the service and I'm not sure how to do that with a wcf? Currently I'm just getting back the wsdl.

Thanks Robert

+1  A: 

The best way to do this will be to create a class in C# or VB.NET. This class will expose its public methods as a COM object. All the class will do is to call the web service and return the results.

You'll then be able to use this COM object from Classic ASP, which will have no idea that it's in touch with the 21st Century.

BTW, this is a good way to refactor functionality out of VBSCRIPT and into the modern world of .NET - do it one COM object at a time. Later, if you ever want to convert pages to ASP.NET (or its successor ten years from now), you'll at least have all the busineess logic factored out, and ASP.NET will be able to call it.

John Saunders
thanks, I was afraid of that but it will work.
Robert