degarg - 2012-07-09

I am using Jacob (java com bridge) to access MicroStrategy objects.
I have 2 classes IDSSObjectInfo  & IDSSFolder and IDSSFolder is a subclass of IDSSObjectInfo (as per the MicroStrategy API).

I do the following:
IDSSObjectInfo objInfo = new IDSSObjectInfo();
IDSSFolder folder = new IDSSFolder(objInfo);
folder.findTypedObjects(8, 0);

Even though IDSSFolder class has the findTypedObjects() method defined, I get the following error on line 3
SEVERE: Can't map name to dispid: FindTypedObjects
com.jacob.com.ComFailException: Can't map name to dispid: FindTypedObjects

This is the snippet of generated code from jacobgen for these classes:

public class IDSSObjectInfo extends Dispatch {

public static final String componentName = "DSSCOMMasterLib.IDSSObjectInfo";

public IDSSObjectInfo() {
super(componentName);
}
.
.
.
}

public class IDSSFolder extends Dispatch {

public static final String componentName = "DSSCOMMasterLib.IDSSFolder";

public IDSSFolder() {
super(componentName);
}

/**
* This constructor is used instead of a case operation to
* turn a Dispatch object into a wider object - it must exist
* in every wrapper class whose instances may be returned from
* method calls wrapped in VT_DISPATCH Variants.
*/
public IDSSFolder(Dispatch d) {
// take over the IDispatch pointer
m_pDispatch = d.m_pDispatch;
// null out the input's pointer
d.m_pDispatch = 0;
}

public IDSSFolder findTypedObjects(int objectType, int flags) {
return new IDSSFolder(Dispatch.call(this, "FindTypedObjects", new Variant(objectType), new Variant(flags)).toDispatch());
}
.
.
.
}

Any help will be greatly appreciated. Thanks!