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