Skip to Content

UDF Function not processing Second record in the extracted list

we have JDBC to SOAP Scenario where We have successfully extracted Data from an SQL Table using JDBC Adapater , we are using a SOAP Receiver Channel to send the data in a below format

<Data>COL1;COL2;.......;COL18

DATA1[1];DATA2[1];......;DATA18[1]

DATA1[2];DATA2[2];......;DATA18[2]

</Data>

For this i had created a UDF function however the function only seems to process a single row of data not multiple.

public void FN_UDFConCat(String[] rowCount, String[] COL1, String[] COL2, String[] COL3, String[] COL4,.. STRING COL18, ResultList result, Container container) throws StreamTransformationException{

String delimiter = " ; ";

String columnHeader = "COL1;COL2;COL3;.......COL18";

String newLineCharacter = "\n";

String finalOutput = " ";

String value;

int i = 0;

finalOutput = columnHeader + newLineCharacter ;

//value = "IN";

//MappingTrace mt = container.getTrace();

for ( i = 0; i < rowCount.length; i ++)

{

//mt.addInfo(value);

finalOutput = finalOutput +

COL1[i] + delimiter +

COL2[i] + delimiter +

COL3[i] + delimiter +

COL4[i] + delimiter +

COL4[i] + delimiter +

COL5[i] + delimiter +

COL6[i] + delimiter +

COL7[i] + delimiter +

COL8[i] + delimiter +

COL9[i] + delimiter +

COl10[i] + delimiter +

COl11[i] + delimiter +

COl12[i] + delimiter +

COl13[i] + delimiter +

COL14[i] + delimiter +

COl15[i] + delimiter +

COl16[i] + delimiter +

COl17[i] + delimiter +

COL18[i] + delimiter +newLineCharacter;

}

result.addValue(finalOutput);

}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers