Not able to put and get Document in hashtable.

I am trying to put a Document (which has a document list in it) in a Hashtable but getting a class cast exception when running this code in webmethods. Please take a look at the code and let me know why it is so. I am able to run the same code in Eclipse by creating the pipeline data and passing it as an input to this service.

// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();

// docInput
Hashtable hashTable = (Hashtable) IDataUtil.get( pipelineCursor, “Hashtable” );

IData docInput = IDataUtil.getIData( pipelineCursor, “Hashout” );
String Key = IDataUtil.getString( pipelineCursor, “key” );

pipelineCursor.destroy();

hashTable.put(Key, docInput);

IDataCursor pipelineCursor_1 = pipeline.getCursor();
IDataUtil.put( pipelineCursor_1, “Hashtable”, hashTable);
pipelineCursor_1.destroy();

What’s the following in your code? Do you have an input Hashtable? Is it really a Hashtable object or a StringTable(String)?

// docInput
Hashtable hashTable = (Hashtable) IDataUtil.get(pipelineCursor, “Hashtable” );

Yeah actually I am creating a Hashtable object called Hashtable but in one of the prior steps I had created a document with the same name. When I saw that I renamed the variable to Hashout but it still was creating a Hashtable Document and it was being passed to the java service. So it was throwing a class cast exception because its not hashtable object any more. I had to delete the step which is creating the Hashout and remap all the inputs and outputs to get this resolved.

We got the issue resolved yesterday but thanks for the reply and direction. You pointed out at the right place where the error could have been.