Hi Abhay,
you can add one more graphical mapping after your final mapping in operation map.
Please add the below code in Attributes and Methods section of graphical mapping
/*--------------------------------------------------------------------------------------------------*/
public void transform(TransformationInput in, TransformationOutput out)
throws StreamTransformationException {
try {
String sourcexml = ""; String targetxml =""; String line ="";
InputStream ins = in.getInputPayload().getInputStream();
BufferedReader br = new BufferedReader( new InputStreamReader(ins));
while ((line = br.readLine()) != null)
sourcexml +=line;//+"\n";
br.close();
targetxml =sourcexml;
targetxml = targetxml.replaceAll("http://beans.oms.ecom.ecc.com/xsd", "http://services.oms.ecom.ecc");
out.getOutputPayload().getOutputStream().write(targetxml.getBytes());
} catch (Exception e) { throw new StreamTransformationException(e.getMessage()); }
}
public String concate(String str1, String str2, Container container) throws StreamTransformationException{
return (str1+str2);
}
/*--------------------------------------------------------------------------------------------------*/
Please let me know if it works.
regards,
Harish