Consuming Wcf from classic asp (with datacontract)

I am currently developing a WCF service (Service.svc) and I would like to use it with classic ASP. Naturally, I first checked how to do this on Google and Mdsn Library. I managed to connect my service.

But here's the problem, I can call a simple method like:

string GetData(int i)

      

But I have some DataContracts also methods signed like this:

IsAvailRef[] AreAvailable(MyInType data)

      

\ With IsAvailRef as DataContract as well as MyInType. And when I call these methods, I have an Asp error "ASP 0106: 80020005" saying "Data type not supported".

So here's my question: Can't we use DataContract with a VB script?

This is the signature of my function in the library generated by regasm.exe as described in this article: http://msdn.microsoft.com/en-us/library/ms752245.aspx

[id(0x60020000)]
HRESULT AreReferencesAvailable([out, retval] SAFEARRAY(_IsAvailRef*)* pRetVal);

      

+3


source to share


1 answer


I believe DataContract is a class and is not a valid VBScript subtype:

http://www.csidata.com/custserv/onlinehelp/vbsdocs/vbs6.htm



Perhaps you can call it methods, however I doubt you can keep it in one of the options.

+1


source







All Articles