COM object -problem with retrieving values.

Hi

i am working on a project where I have to call a COM object and extract data out of it. we are running on V7.1.2 and currently not licensed for WmDotNet package, so I have to build a temporary solution in V6.1 SP2.

I have registered the dlls of the COM object in the windows server machine.

problem:

The COM object has properties like A1…A6 (integers or strings), C1 (Collections in VisualBasic).

I am able to instantiate the COM object, set the properties of A1…A6.

VB Code


‘name’ is input given by user

object is the COM object.
object.A1 =‘D1’
.
.
.
object.A6=‘D6’

object.C1.Add(name)

object.login(username,pwd);
object.method();

Dim returnValue As Object = DBNull.Value
returnValue = object.C1(name).Value // i have problem in this last step while converting in webMethods.


-so in wM , what I did is
created a object of java.Util.list (Suppose List1) and added one string ‘name’ there.
invoked the win32.COM.dispatch:invoke by passing List1 to params, and dispname=C1. It worked as it allowed me to assign the value.

Now I could call the login method of the COM object successfully by passing the pDispatch.

The problem comes when I call the next method (suppose Method1). what this method does is, it does not return the data to me in the “result” field of the win32.COM.dispatch:invoke function. But it actually sets the data in the input Collection object (C1) which I passed as a java.util.list.

Below is corresponding VB code

Dim returnValue As Object = DBNull.Value
returnValue = object.C1(name).Value

So, I called method1. after that I called win32.COM.dispatch:invoke function to get the value in the java.util.list

dispname=C1,
accessType =Get.

but the “result” I get after this call is like win32.COM.WmDispatch in the pipeline. I am not able to understand how to extract the java.util.list that I passed originally.

If you guys have any clue, please reply.

Thanks.
dg

Dim d1 As Variant
Dim d2 As Variant
Dim d3 As Variant

comObject.sampleMethod d1, d2, d3
MsgBox “First value returned is “ & d1(0)

Above is the VB code , where by calling sampleMethod it actually returns the values from the COM Object in d1, d2, d3.

How do I do this in webMethods V6.1 My question is specifically how do I pass the params to the

win32.COM.dispatch:invoke service

(I have tried passing three object List to the params list, but it fails with (null). Error Code = 8002000f.

Thanks
Dg.