you could also usem this code snippet as a shared resource to deal with the ampersand
public static String encodexml(String xmldata) {
xmldata=findnreplace(“&”, “&”, xmldata);
return xmldata;
}
public static String findnreplace(String ch, String ent, String xmldata) {
int L=ent.length();
if (xmldata.indexOf(ch)>0) {
int lastpos=0;
int currentpos=xmldata.indexOf(ch);
while (currentpos>0) {
xmldata =xmldata.substring(0,currentpos) + ent + xmldata.substring(currentpos+1);
lastpos=currentpos+L;
currentpos=xmldata.indexOf(ch, lastpos);
}
}
return xmldata;
}
#Integration-Server-and-ESB#Flow-and-Java-services#webMethods