Hi Gayatri,
You need a triggering event from ECC.
1. "Now please tell me, how do I call this java code in PI?"
ans)
Thus scenario can be like this
ECC--->proxy--->PI--->java mapping---->request--->REST webservice--->response---->same java mapping---->proxy---->ECC.
2. Is it Java mapping and along with SOAP/Axis Adapter for invoke that webservice?
ans) only java mapping is sufficient.
Challenges
1. when you send the request to REST webservice from PI server , the firewall may stop our request and you will get an exception
solution: Network team consultation is necessary in this regard
else all is well.
Regards
Anupam