From: | Rick Strahl |
To: | Brian Abbott |
I can take a look. Give me a call:
http://west-wind.com/contact.aspx
+++ Rick ---
Hi Rick
Still not getting anywhere with this.
Do you have time to spare to take a look at it on a chargeable basis? I'm sure you'd be able to sort it out a lot lot quicker than me :-)
Brian
Brian,
In order to pass a ComArray instance you have to use the latter syntax. The former will definitely not work because the .NET target method knows nothing about the ComArray object. InvokeMethod() fixes up the method call and passes the raw Array to .NET. So definitely use that.
My guess is the problem is the @oBody parameter you're passing. What is that parameter expecting? If that item you're passing is an object don't pass it with @ since it's already an object. In general it's pretty rare that a service will return a ref out parameter.
+++ Rick ---
Hi
I'm trying to create an array of objects to pass as a parameter to a web service. The code I have is like this:
oTask = oProxy.oBridge.CreateInstance("Service.COINSInterfaceFMTask") oTask.Company = 'Company' oTask.Contract = 'Contract' oTask.JobNumber = 'job number' oTaskArray = oProxy.oBridge.CreateArray("Service.COINSInterfaceFMTask") lOK = oTaskArray.AddItem(oTask) && lOK returns .T.
Even though lOK returns .T. on the above line, in the debugger whilst oTaskArray shows as an object, I can't drill down into it and I suspect this is where it's going wrong.
Then both of these calls below fail with 'The parameter is incorrect.' :
oResult = oProxy.doAction(oHeader, oTaskArray, @oBody1) OR oResult = oProxy.oBridge.InvokeMethod(oProxy, 'doAction', oHeader, oTaskArray, @oBody1)
I must have the syntax wrong somewhere, but can't see where ...
West Wind Technologies
Making waves on the Web