--stein
I set up a test method so I can log what's happening between steps. This shows that oService has a NULL value after calling:
oBridge.Loadassembly(cAssemblyPath) oService = oBridge.Createinstance("CourseCatalogAPI.CourseCatalogAPI")
Not sure why that didn't get flagged in the original context.
Anyway, a check of oBridge.cErrorMsg at that point shows the following:
Unable to generate a temporary class (result=1). error CS2001: Source file 'C:\Windows\TEMP\fd83s3n0.0.cs' could not be found error CS2008: No inputs specified
No idea what that means. I did verify that the DLL is in the correct location and that the permissions are OK.
I can send you the WSDL back channel but I'm not sure there's any point. My guess is that it will work fine for you, just like it works on my developer system and on a couple of other servers where we're using this module. It's just this one system that's giving us problems.
--stein
Stein,
What is the value of this.oService in this case? Null? DbNull?
Not sure what would cause that to happen and NOT give an error.
You have a WSDL URL I can try for this?
+++ Rick ---
The code does come from the generated proxy class, but I edited the quoted code to just show the critical lines. The full context is shown below. The generated DLL is coursecatalogapiproxy.dll and the class is defined in coursecatalogapiproxy.prg which my project uses as is.
************************************************************* DEFINE CLASS CourseCatalogAPIProxy AS Custom ************************************************************* *: Generated with West Wind .NET Web Service Proxy Generator *: Created: 07/14/11 12:37:58 AM *: *: It's recommended you don't modify this class as it may be *: regenerated. If you need customization use a subclass in *: separate PRG file that overrides behavior. ************************************************************* *<snip> FUNCTION LoadService(lcDotNetVersion) LOCAL loBridge as wwDotNetBridge IF ISNULL(this.oBridge) THIS.oBridge = CREATEOBJECT("wwDotNetBridge",lcDotNetVersion) IF !this.oBridge.Loadassembly(this.cAssemblyPath) this.cErrorMsg = this.oBridge.cErrorMsg RETURN .F. ENDIF ENDIF IF ISNULL(this.oService) this.oService = this.oBridge.Createinstance(this.cComClass) IF ISNULL(this.oService) this.cErrorMsg = this.oBridge.cErrorMsg RETURN .F. ENDIF *** For some reason accessing URL directly doesnt work - use indirect referencing *this.oService.Url = this.cServiceUrl this.oBridge.SetProperty(this.oService,"Url",this.cServiceUrl) ENDIF
No error was generated when creating the oService object. The actual error is thrown from the wwDotNetBridge SetProperty method:
Message: OLE IDispatch exception code 0 from mscorlib: Method 'System.DBNull.Url' not found...
Program: setproperty
Line No: 468
What generates the error? The last method? Are you sure?
It seems the creation of the this.oService property is what's failing and you should check the error message after that but before the call to .SetProperty().
Where is this code actually coming from? This doesn't come from the generated proxy class which checks for load failures and call failures so you should get a better error message...
+++ Rick ---
We've got one of those cases where code that has been in production is failing after moving the app to a new server. The point of failure is the last line of the following sequence:
THIS.oBridge = CREATEOBJECT("wwDotNetBridge") this.oBridge.Loadassembly(this.cAssemblyPath) this.oService = this.oBridge.Createinstance("CourseCatalogAPI.CourseCatalogAPI") this.oBridge.SetProperty(this.oService,"Url",this.cServiceUrl)
The error is: <b> OLE IDispatch exception code 0 from mscorlib: Method 'System.DBNull.Url' not found...</b>
The assembly being loaded is a web service proxy DLL created by the Proxy Generator. We just copied the DLL into the same relative location from the old server, where it had been working fine, so I don't think it's the issue. The cServiceURL property is hard coded, so that would not have changed.
Any assistance would be appreciated.
--stein