Hi,
we had the same problem and here is the service.
NOTE: The service name is initRecord, plz keep as it is
or modify the code as well
System.out.println(“Hello world In Init record”);
// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
Object tempObj = null;
String tempKey = null;
//System.out.println(“Size is :”+IDataUtil.size(pipelineCursor));
while(pipelineCursor.hasMoreData())
{
System.out.println(“MOVING NEXT RECORD >>>>>>>>>>>>>>>>>>>>>>>>>>”);
pipelineCursor.next();
tempObj = pipelineCursor.getValue();
tempKey = pipelineCursor.getKey();
System.out.println("Rec Key: "+tempKey);
System.out.println("Rec Value: "+tempObj);
System.out.println("IS STRING: "+(tempObj instanceof String));
if(tempObj instanceof IData)
{
System.out.println(“THIS IS A RECORD >>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>”);
initRecord((IData)tempObj);
}
else
{
if(tempObj instanceof IData)
{
System.out.println("Its a record array: “);
IData recs = (IData)tempObj;
for(int i=0; i>>>>>>>>>>>>>>>>>>>>>>>>>”);
IDataUtil.put( pipelineCursor, tempKey, “” );
}
catch(Exception ex)
{
System.out.println(“ERROR:”+ex);
}
}//if
}//else
}//else
}//while
pipelineCursor.destroy();
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services