Error while invoking the wmtmqueryDocumentQuery service through a java progarm

Are you calling first? That returns an object in the pipeline that needs to be passed to

Hi Rob,

Thanks for your response.

Yes Iam calling the CreateDocumentQuery and the output query obj is passed on to the DocumentQuery input record.

Herez a portion of the code

IData createDQOutput = context.invoke(“”, “createDocumentQuery”, inputRecord);
IDataCursor idc=createDQOutput.getCursor();

public IData setInputForDocumentQuery()
throws IOException, ServiceException
IData out = IDataFactory.create();
IDataCursor idc = out.getCursor();
idc.insertAfter(“aggregate”, “false”);
idc.insertAfter(“disablePaging”, “true”);
idc.insertAfter(“pageSize”, null);
idc.insertAfter(“maxRowCount”, null);
idc.insertAfter(“queryTimeout”, null);
idc.insertAfter(“threshold”, null);
return out;

Hmmm. Given the exception states “java.lang.ClassCastException: com.wm.util.Values” you might try using a Values object for the pipeline vars instead of IData.

Hi Rob,

No Luck. I get the same error message after using values.
I beleive that since the output of CreateDocumentQuery is ComplexDocQuery and the input required for Document is SimpleDocQuery, this error is thrown up.
Do we have any way wherin we can get SimpleDocQuery from ComplexDocQuery.

Thanks and regards