Error invoking the wm.tm.query.DocumentQuery service from a

I am trying to invoke the wm.tm.query.DocumentQuery service from a java program, but iam uable to do so . I get an error that is stated below

com.wm.app.tn.err.EXMLException:

wm.tn.query:documentQuery

java.lang.ClassCastException
com.wm.util.Values
java.lang.ClassCastException: com.wm.util.Values
at wm.tn.query.documentQuery(query.java:143)
at java.lang.reflect.Method.invoke(Native Method)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:281)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:688)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:480)
at com.wm.app.b2b.server.HTTPInvokeHandler.process(HTTPInvokeHandler.java:168)
at com.wm.app.b2b.server.HTTPDispatch.run(HTTPDispatch.java:457)
at com.wm.util.pool.PooledThread.run(C:/NT/Perforce/basis/4.1.0-terra/module/core/source/com/wm/util/pool/PooledThread.java:103)
at java.lang.Thread.run(Unknown Source)




at com.wm.app.b2b.client.BaseContext.throwIfError(BaseContext.java:1012)
at com.wm.app.b2b.client.Context.checkError(Context.java:1073)
at com.wm.app.b2b.client.Context.invoke(Context.java:1041)
at com.wm.app.b2b.client.Context.invoke(Context.java:348)
at RecordFromTNDB.docQuery(RecordFromTNDB.java:59)
at RecordFromTNDB.getRecordsFromTNDB(RecordFromTNDB.java:92)
at RecordFromTNDB.main(RecordFromTNDB.java:101)