webmethods java services

can any one know the method for converting IDataArray into StringArray and StringArray to IDataArray???

Review pub.list:stringListToDocumentList in the docs.

For the reverse, you’ll need something like:

IDataCursor idc = pipeline.getCursor();
IData[] documents = IDataUtil.getIDataArray(idc, "documents");
String fieldName = IDataUtil.getString(idc, "fieldName");

String[] strList = new String[documents.length];
for (int i=0; i < documents.length; i++)
{
      IDataCursor dc = documents[i].getCursor();
      strList[i] = IDataUtil.getString(dc, fieldName);
      dc.destroy();
}
IDataUtil.put(idc, "strList", strList);

You could make this a bit more sophisticated with a fieldListType input but I’ll leave that to you if you want that.

Thanks For your reply,your Coding working finee.For Sorting numeric values i used Array.sort it not wrking properly…for string only it works.

This doesn’t do sorting.

If you’re sorting the resulting string array, any sorting you’re doing is “working properly.” You’re sorting strings, not numbers. If you need a numeric sort you’ll need code that treats the elements as numeric types instead of strings. There are existing threads that cover this. Please search the forums.