cancel
Showing results for 
Search instead for 
Did you mean: 

returning an array with XI

Former Member
0 Kudos

hello

I am recieving 4 strings and I would like to map it to a one array output. I am trying to write a mapping with Java that recieves the 4 strings, put them in an array and send out the array. the thing is becuase the java class define as string, I cannot return the array as it is only as a string.

appreciate if some one know how can I define the 4 strings to go out as an array.

(if it is possible to do it in the mapping section, it is better.)

Thanks

Kfir

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you are using java Mapping then you can simply use it.

	String one="one";
	String two="two";
	String three="three";
	String four="four";
	
	//Add it into array...
	String a[] =  new String[4];
	a[0]=one;
	a[1]=two;
	a[2]=three;
	a[3]=four;
	
	return a;

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

Why do u want to use an array? Make the target field copies by right clicking and repeating the node. Map all the four to each target copied field.

VJ