IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Error while invoking the wmtmqueryDocumentQuery service through a java progarm

  • 1.  Error while invoking the wmtmqueryDocumentQuery service through a java progarm

    Posted Fri August 29, 2003 08:19 PM

    Are you calling wm.tm.query.CreateDocumentQuery first? That returns an object in the pipeline that needs to be passed to wm.tn.query:documentQuery.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Error while invoking the wmtmqueryDocumentQuery service through a java progarm

    Posted Fri August 29, 2003 09:15 PM

    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(“wm.tn.query”, “createDocumentQuery”, inputRecord);
    IDataCursor idc=createDQOutput.getCursor();
    idc.first(“query”);
    query=idc.getValue();



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


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Error while invoking the wmtmqueryDocumentQuery service through a java progarm

    Posted Fri August 29, 2003 10:35 PM

    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.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: Error while invoking the wmtmqueryDocumentQuery service through a java progarm

    Posted Fri August 29, 2003 10:49 PM

    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

    Rahul


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods