I have a DLL or assembly that I created in .NET that calls a webservice. I registered this as a COM Interop using regasm. I then opended the registry to check the objects and saw that one of the proxy classes that is part of the webservice I am connecting to has an entry in the registry like so -
[HKEY_CLASSES_ROOT\WebserviceModule.WebReference.customer_profile]
@="WebserviceModule.WebReference.customer_profile"
i.e. to create an object in VBScript I refer to the ProgID as -
Set CProfile =
CreateObject("WebserviceModule.WebReference.customer_profile")
................
WScript.StdOut.WriteLine "Last Name:" & CProfile.LastName
My problem is that the above line works but if I try to get the "Last Name" value of this class in in ASP -
Set CProfile =
Server.CreateObject("WebserviceModule.WebReference.customer_profile")
..............
Response.write CProfile.LastName
it gives me error:
Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: WebserviceModule.WebReferenc'
/site/test1.asp, line 17
The error is not at the "Server.CreateObject" line but when I call a value of this 'CProfile' class. If I comment the "Response.write CProfile.LastName" line it works, but if I try to retrieve the value it gives me the error above.
Any idea whyis this so? Am I creating the object properly? And am I retrieving the value properly too? It works in VBScript after all.
FYI
WebserviceModule - My .NET Project namespace WebReference - The Proxy class for the webservice that I am calling customer_profile - One of the classes of the webservice proxy
[HKEY_CLASSES_ROOT\WebserviceModule.WebReference.customer_profile]
@="WebserviceModule.WebReference.customer_profile"
i.e. to create an object in VBScript I refer to the ProgID as -
Set CProfile =
CreateObject("WebserviceModule.WebReference.customer_profile")
................
WScript.StdOut.WriteLine "Last Name:" & CProfile.LastName
My problem is that the above line works but if I try to get the "Last Name" value of this class in in ASP -
Set CProfile =
Server.CreateObject("WebserviceModule.WebReference.customer_profile")
..............
Response.write CProfile.LastName
it gives me error:
Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: WebserviceModule.WebReferenc'
/site/test1.asp, line 17
The error is not at the "Server.CreateObject" line but when I call a value of this 'CProfile' class. If I comment the "Response.write CProfile.LastName" line it works, but if I try to retrieve the value it gives me the error above.
Any idea whyis this so? Am I creating the object properly? And am I retrieving the value properly too? It works in VBScript after all.
FYI
WebserviceModule - My .NET Project namespace WebReference - The Proxy class for the webservice that I am calling customer_profile - One of the classes of the webservice proxy