There must be multiple overloads of the method you're trying to call because the method generated has 8 parameters while the .NET method you show has only 6. Check in Reflector to make sure you got the right signature - my guess is the one with 8 parameters has something different.
Part of the problem is that these parameters are reference parameters - I suspect that might cause problems when using InvokeMethod_ParameterArray because it won't know how to set the values back. I would try using InvokeMethod instead and passing the parameters in by refence.
FWIW, I can't help but marvel at the design of this service :-) Why would anybody create a service that has a bunch of out parameters when they could just return an object? Out parameters on a service are just never a good idea.
I have downloaded the shareware version of the Proxy generator and I'm at the moment trying it out. It works like a charm
for other Web Service methods, that don't expect a string array passed in.
Have tried to read the documentation thoroughly, so I hope I haven't missed something obvious...
I receive a Type mismatch error back from the 'GetListSite2' method.
/Pål
The method 'GetListSite2' I'm talking to expect this:
int GetListSite2(string User, string Pwd, ref string IdTypeCA, ref string DefaultIdSite, ref string[] ListIdSite, ref string[] informationSite)
The proxy generated code:
FUNCTION GetListSite2(User as String,Pwd as String,IdTypeCA as String,DefaultIdSite as String,ListIdSite as StringArray,informationSite as StringArray,GetListSite2Result as Int32,GetListSite2ResultSpecified as Boolean) as Void
LOCAL loException as Exception, lvResult as Void
THIS.lError = .F.
this.cErrorMsg = ""
lvResult = .F.
TRY
lvResult = this.oService.GetListSite2(User,Pwd,@IdTypeCA,@DefaultIdSite,@ListIdSite,@informationSite,@GetListSite2Result,@GetListSite2ResultSpecified)
CATCH to loException
THIS.GetErrorDetail(loException)
ENDTRY
RETURN lvResult
ENDFUNC
The test code from VFP:
LOCAL loArr as Westwind.WebConnection.ComArray
loArr = loProxy.oBridge.CreateInstance("Westwind.WebConnection.ComArray")
loArr.Create("System.Object")
loArr1 = loProxy.oBridge.CreateArray("System.String")
loArr2 = loProxy.oBridge.CreateArray("System.String")
? loArr1.AddItem('')
? loArr2.AddItem('')
loArr.AddItem(' ')
loArr.AddItem(' ')
loArr.AddItem(m.IdTypeCA)
loArr.AddItem(m.DefaultIdSite)
loArr.AddItem(loArr1)
loArr.AddItem(loArr2)
loArr.AddItem(m.GetListSite2Result)
loArr.AddItem(m.GetListSite2ResultSpecified)
lcResult = loProxy.oBridge.InvokeMethod_ParameterArray(loProxy, "GetListSite2",loArr)