>>>Reading XML tag from InputStream
is it from the response message?
>>>Kindly help with the java code for mapping.
Where do you stuck with the code? have you already started working on it?
If you have a mapping for response message, then within that mapping write a UDF to write the required content on file system.
below wiki is for reading..