Here is the solution to my problem if anyone is interested. The service takes a document as the input and the output is a propertySet.
//Convert document to PropertySet
// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
// Get document
Object document = IDataUtil.getIData( pipelineCursor, “document” );
IData doc = (IData)document;
IDataCursor docCursor = doc.getCursor();
String element = new String();
String value = new String();
Properties properties = new Properties();
docCursor.first();
while(docCursor.next()) // get name value pair for each element in the record
{
element = docCursor.getKey();
value = IDataUtil.getString(docCursor,element);
properties.setProperty(element, value);
}
docCursor.destroy();
pipelineCursor.destroy();
// pipeline
IDataCursor pipelineCursor_1 = pipeline.getCursor();
Object propertySet = new Object();
IDataUtil.put( pipelineCursor_1, “propertySet”, properties );
pipelineCursor_1.destroy();
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services